se_basic::NavMesh Class Reference

#include <NavMesh.hpp>

List of all members.

Public Member Functions

 NavMesh (short controlPointCount, short triangleCount)
 NavMesh (const void *data)
 ~NavMesh ()
void walls (se_core::AreaEdge &areaEdge) const
int isInLineOfSight (const se_core::Pos &from, const se_core::Pos &to) const
int isInLineOfSight (const se_core::Point3 &from, short fromIndex, const se_core::Point3 &to, short toIndex) const
int farthestLineOfSightXZ (int fromIndex, const se_core::Point3 &from, const se_core::Point3 &to, short toIndex, se_core::Point2 &dest) const
bray_t slideAngle (const se_core::Point3 &from, short fromIndex, const se_core::Point3 &to) const
bray_t wallAngle (const se_core::Point3 &from, short fromIndex, const se_core::Point3 &to) const
bool doesTouchVoid (const se_core::Point3 &p, short pIndex, const coor_t radius) const
short path (short from, short to) const
 Returns index of neighbour to go via.
void center (short tri, se_core::Point3 &out) const
short type (short triangle)
void barycentric (const se_core::Point2 &q, const se_core::Point3 &c1, const se_core::Point3 &c2, const se_core::Point3 &c3, se_core::Tuple3 &out) const
void barycentric (short tri, const se_core::Point2 &q, se_core::Tuple3 &out) const
coor_t height (short tri, const se_core::Tuple3 &barycentric) const
bool isInsideTriangle (se_core::Tuple3 &barycentric) const
bool isInsideTriangle (se_core::Point2 &q, se_core::Point3 &c1, se_core::Point3 &c2, se_core::Point3 &c3) const
 Barycentric test.
bool isInsideTriangle (se_core::Point2 &q, se_core::Point3 *corners) const
 Clockwise test.
short find (const se_core::Point2 &q) const
 Find the index of a triangle that the point is above.
short find (short from, const se_core::Point2 &q) const
 Find the index of a triangle that the point is above.
short findExit (const se_core::BoundingBox &bounds, se_core::Point3 &out) const
coor_t findNearest (const se_core::Point3 &p, se_core::Point3 &out) const

Protected Attributes

bool doDestroy_
short controlPointCount_
short triangleCount_
short exitCount_
se_core::Point3controlPoints_
Triangletriangles_
Pathpaths_
Wallwalls_
Exitexits_


Constructor & Destructor Documentation

se_basic::NavMesh::NavMesh short  controlPointCount,
short  triangleCount
[inline]
 

Definition at line 184 of file NavMesh.hpp.

se_basic::NavMesh::NavMesh const void *  data  )  [inline]
 

Definition at line 195 of file NavMesh.hpp.

se_basic::NavMesh::~NavMesh  )  [inline]
 

Definition at line 230 of file NavMesh.hpp.


Member Function Documentation

void se_basic::NavMesh::barycentric short  tri,
const se_core::Point2 q,
se_core::Tuple3 out
const [inline]
 

Definition at line 284 of file NavMesh.hpp.

References coor_t, se_core::Tuple2::x_, se_core::Tuple3::x_, se_core::Tuple3::y_, se_core::Tuple2::y_, and se_core::Tuple3::z_.

void se_basic::NavMesh::barycentric const se_core::Point2 q,
const se_core::Point3 c1,
const se_core::Point3 c2,
const se_core::Point3 c3,
se_core::Tuple3 out
const [inline]
 

Definition at line 275 of file NavMesh.hpp.

References coor_t, se_core::Tuple2::x_, se_core::Tuple3::x_, se_core::Tuple3::y_, se_core::Tuple2::y_, and se_core::Tuple3::z_.

void se_basic::NavMesh::center short  tri,
se_core::Point3 out
const [inline]
 

Definition at line 260 of file NavMesh.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

bool se_basic::NavMesh::doesTouchVoid const se_core::Point3 p,
short  pIndex,
const coor_t  radius
const
 

Definition at line 138 of file NavMesh.cpp.

References Assert, coor_double_t, se_core::Point3::distanceSquared(), and se_core::Point3::nearestPoint().

int se_basic::NavMesh::farthestLineOfSightXZ int  fromIndex,
const se_core::Point3 from,
const se_core::Point3 to,
short  toIndex,
se_core::Point2 dest
const
 

Definition at line 194 of file NavMesh.cpp.

References se_basic::Triangle::controlPoints_, coor_double_t, coor_t, se_core::Point2::lineIntersect(), se_basic::Triangle::linkTo_, se_basic::Triangle::linkType_, se_core::Tuple2::set(), se_core::Tuple2::x_, se_core::Tuple3::x_, se_core::Tuple2::y_, and se_core::Tuple3::z_.

Referenced by se_basic::NavMeshArea::farthestLineOfSight().

short se_basic::NavMesh::find short  from,
const se_core::Point2 q
const [inline]
 

Find the index of a triangle that the point is above.

Definition at line 364 of file NavMesh.hpp.

References Assert, coor_t, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

short se_basic::NavMesh::find const se_core::Point2 q  )  const [inline]
 

Find the index of a triangle that the point is above.

Definition at line 348 of file NavMesh.hpp.

short se_basic::NavMesh::findExit const se_core::BoundingBox bounds,
se_core::Point3 out
const
 

Definition at line 402 of file NavMesh.cpp.

References se_core::Tuple3::add(), se_core::BoundingBox::center(), se_core::BoundingBox::isTouching(), se_core::Tuple3::reset(), and se_core::Tuple3::scale().

Referenced by se_basic::NavMeshArea::farthestLineOfSight().

coor_double_t se_basic::NavMesh::findNearest const se_core::Point3 p,
se_core::Point3 out
const
 

Definition at line 452 of file NavMesh.cpp.

References coor_double_t, se_core::Point3::distanceSquared(), se_core::Point3::nearestPoint(), and se_core::Tuple3::set().

coor_t se_basic::NavMesh::height short  tri,
const se_core::Tuple3 barycentric
const [inline]
 

Definition at line 297 of file NavMesh.hpp.

References coor_t, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

int se_basic::NavMesh::isInLineOfSight const se_core::Point3 from,
short  fromIndex,
const se_core::Point3 to,
short  toIndex
const
 

Definition at line 99 of file NavMesh.cpp.

References se_basic::Triangle::controlPoints_, se_basic::Triangle::linkType_, and se_basic::willLineAIntersectBXZ().

int se_basic::NavMesh::isInLineOfSight const se_core::Pos from,
const se_core::Pos to
const
 

Definition at line 93 of file NavMesh.cpp.

References se_core::Pos::index(), and se_core::Pos::localCoor().

bool se_basic::NavMesh::isInsideTriangle se_core::Point2 q,
se_core::Point3 corners
const [inline]
 

Clockwise test.

Definition at line 324 of file NavMesh.hpp.

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

bool se_basic::NavMesh::isInsideTriangle se_core::Point2 q,
se_core::Point3 c1,
se_core::Point3 c2,
se_core::Point3 c3
const [inline]
 

Barycentric test.

Definition at line 316 of file NavMesh.hpp.

bool se_basic::NavMesh::isInsideTriangle se_core::Tuple3 barycentric  )  const [inline]
 

Definition at line 310 of file NavMesh.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

short se_basic::NavMesh::path short  from,
short  to
const [inline]
 

Returns index of neighbour to go via.

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

Definition at line 253 of file NavMesh.hpp.

bray_t se_basic::NavMesh::slideAngle const se_core::Point3 from,
short  fromIndex,
const se_core::Point3 to
const
 

Definition at line 268 of file NavMesh.cpp.

References abs, bray_t, se_basic::Triangle::controlPoints_, se_basic::doLinesIntersectXZ(), se_basic::left(), se_basic::Triangle::linkTo_, and se_core::Point3::yawTowards().

short se_basic::NavMesh::type short  triangle  )  [inline]
 

Definition at line 271 of file NavMesh.hpp.

bray_t se_basic::NavMesh::wallAngle const se_core::Point3 from,
short  fromIndex,
const se_core::Point3 to
const
 

Definition at line 323 of file NavMesh.cpp.

References abs, Assert, bray_t, se_basic::left(), se_core::Point2::lineIntersect(), LogFatal, scale_t, se_core::Point2::willAIntersectB(), and se_core::Point3::yawTowards().

void se_basic::NavMesh::walls se_core::AreaEdge areaEdge  )  const
 

Definition at line 246 of file NavMesh.cpp.

References se_core::AreaEdge::addLink(), se_core::Tuple3::x_, and se_core::Tuple3::z_.


Member Data Documentation

short se_basic::NavMesh::controlPointCount_ [protected]
 

Definition at line 409 of file NavMesh.hpp.

se_core::Point3* se_basic::NavMesh::controlPoints_ [protected]
 

Definition at line 413 of file NavMesh.hpp.

bool se_basic::NavMesh::doDestroy_ [protected]
 

Definition at line 408 of file NavMesh.hpp.

short se_basic::NavMesh::exitCount_ [protected]
 

Definition at line 411 of file NavMesh.hpp.

Exit* se_basic::NavMesh::exits_ [protected]
 

Definition at line 417 of file NavMesh.hpp.

Path* se_basic::NavMesh::paths_ [protected]
 

Definition at line 415 of file NavMesh.hpp.

short se_basic::NavMesh::triangleCount_ [protected]
 

Definition at line 410 of file NavMesh.hpp.

Triangle* se_basic::NavMesh::triangles_ [protected]
 

Definition at line 414 of file NavMesh.hpp.

Wall* se_basic::NavMesh::walls_ [protected]
 

Definition at line 416 of file NavMesh.hpp.


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

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