se_basic::Path Class Reference

#include <NavMesh.hpp>

List of all members.

Public Member Functions

 Path (int triangleCount, unsigned char *paths=0)
 Constructs and initialises a Path object.
 ~Path ()
 Destructor.
void set (short from, short to, int neighbourIndex)
 Set the neighbour creatures should walk through to get to a given destination triangle.
int path (short from, short to) const
 Returns the neighbour index of 1, 2 or 3.
int dataSize ()
 Returns the size of the char array that holds the navigation matrix.
unsigned char * data ()
 Return a pointer to the data holding the navigation matrix.
void lineIntersect (const se_core::Point2 &p0, const se_core::Point2 &p1, const se_core::Point2 &p2, const se_core::Point2 &p3, se_core::Point2 &out)


Constructor & Destructor Documentation

se_basic::Path::Path int  triangleCount,
unsigned char *  paths = 0
[inline]
 

Constructs and initialises a Path object.

Parameters:
tringleCount number of triangles in navigation mesh
paths path lookup table data. Empty array created if null.

Definition at line 55 of file NavMesh.hpp.

se_basic::Path::~Path  )  [inline]
 

Destructor.

Definition at line 65 of file NavMesh.hpp.


Member Function Documentation

unsigned char* se_basic::Path::data  )  [inline]
 

Return a pointer to the data holding the navigation matrix.

You probably only need this when saving or copying its content. The data is encoded with 4 values inside each byte.

Definition at line 122 of file NavMesh.hpp.

int se_basic::Path::dataSize  )  [inline]
 

Returns the size of the char array that holds the navigation matrix.

Definition at line 110 of file NavMesh.hpp.

void se_basic::Path::lineIntersect const se_core::Point2 p0,
const se_core::Point2 p1,
const se_core::Point2 p2,
const se_core::Point2 p3,
se_core::Point2 out
[inline]
 

Definition at line 126 of file NavMesh.hpp.

References se_core::Tuple2::x_, and se_core::Tuple2::y_.

int se_basic::Path::path short  from,
short  to
const [inline]
 

Returns the neighbour index of 1, 2 or 3.

Parameters:
from index of triangle to move from
to index of triangle to move to

Definition at line 97 of file NavMesh.hpp.

void se_basic::Path::set short  from,
short  to,
int  neighbourIndex
[inline]
 

Set the neighbour creatures should walk through to get to a given destination triangle.

The neigbourIndex is an index into the from triangles neighbours_ array.

See also:
Triangle class.
Parameters:
from index of triangle to move from
to index of triangle to move to
neighbourIndex must be 0, 1 or 2

Definition at line 79 of file NavMesh.hpp.


The documentation for this class was generated from the following file:

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:21 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo