Kaim::NavHalfEdgePtr Class Reference
#include <navhalfedgeptr.h>
Each instance of this class uniquely identifies a single NavHalfEdge in a NavFloor.
Instances of this class can be safely stored and used in subsequent frames.
Kaim::NavHalfEdgePtr::NavHalfEdgePtr |
( |
| ) |
|
|
inline |
Creates a new NavHalfEdgePtr referring to the provided NavHalfEdgeIdx in the provided NavFloorPtr.
- Parameters
-
navFloorPtr | The NavFloor that contains the edge this object should refer to. |
halfEdgeIdx | The index of this edge within the NavFloor. |
Creates a new NavHalfEdgePtr copying information from the provided one.
const CellPos & Kaim::NavHalfEdgePtr::GetCellPos |
( |
| ) |
const |
|
inline |
Returns a const reference to the CellPos that indicates the position of the cell that contains this edge within the grid of NavData cells.
- Precondition
- This object must be valid. Its validity is not checked.
KyFloat32 Kaim::NavHalfEdgePtr::GetEndVertexAltitude |
( |
| ) |
const |
|
inline |
Returns the altitude (z coordinate) of the ending vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked
CoordPos64 Kaim::NavHalfEdgePtr::GetEndVertexCoordPos64 |
( |
| ) |
const |
|
inline |
Returns the x,y integer coordinates of the ending vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
CoordPos Kaim::NavHalfEdgePtr::GetEndVertexCoordPosInCell |
( |
| ) |
const |
|
inline |
Returns the 2D integer coordinates of the ending vertex of this edge in its NavCell.
- Precondition
- This object must be valid. Its validity is not checked.
Vec3f Kaim::NavHalfEdgePtr::GetEndVertexPos3f |
( |
| ) |
const |
|
inline |
Returns the coordinates of the ending vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
Returns the index of this edge within its NavFloor.
NavFloor * Kaim::NavHalfEdgePtr::GetNavFloor |
( |
| ) |
const |
|
inline |
Returns a pointer to the NavFloor that contains this edge. Returns KY_NULL if this object is not valid.
NavFloor * Kaim::NavHalfEdgePtr::GetNavFloor_Unsafe |
( |
| ) |
const |
|
inline |
Returns a pointer to the NavFloor that contains this edge.
- Precondition
- This object must be valid. Its validity is not checked.
const NavFloorBlob * Kaim::NavHalfEdgePtr::GetNavFloorBlob |
( |
| ) |
const |
|
inline |
Returns a const pointer to the NavFloorBlob that contains this edge. Returns KY_NULL if this object is not valid.
const NavFloorBlob * Kaim::NavHalfEdgePtr::GetNavFloorBlob_Unsafe |
( |
| ) |
const |
|
inline |
Returns a const pointer to the NavFloorBlob that contains this edge.
- Precondition
- This object must be valid. Its validity is not checked.
const NavTag & Kaim::NavHalfEdgePtr::GetNavTag |
( |
| ) |
const |
|
inline |
Retrieves the NavTag associated to the NavFloor that contains this halfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavHalfEdgePtr::GetNextHalfEdgePtr |
( |
NavHalfEdgePtr & |
resultPtr | ) |
const |
|
inline |
Updates resultPtr to identify the next edge in the triangle.
- Precondition
- This object must be valid. Its validity is not checked.
template<class TraverseLogic >
NavHalfEdgePtr Kaim::NavHalfEdgePtr::GetNextNavHalfEdgePtrAlongBorder |
( |
void * |
traverseLogicUserData | ) |
const |
|
inline |
Returns the next edge along the border of the NavMesh according to TraverseLogic.
- Parameters
-
traverseLogicUserData | A pointer to a traverseLogicUserData |
- Precondition
- This object must be valid. Its validity is not checked.
-
This object must be on the border of an area of the NavMesh according to TraverseLogic. It may not be paired with another triangle with a traversable NavTag. That means we must have
IsHalfEdgeCrossable<TraverseLogic>() == false
.
- Postcondition
- The returned edge is not paired with another triangle with a traversable NavTag.
void Kaim::NavHalfEdgePtr::GetPairHalfEdgePtr |
( |
NavHalfEdgePtr & |
resultPtr | ) |
const |
|
inline |
Updates resultPtr to identify the edge in the next adjacent triangle that borders this edge.
- Precondition
- This object must be valid. Its validity is not checked.
-
The type of the edge returned by a call to NavHalfEdge::GetHalfEdgeType() must not be EDGETYPE_OBSTACLE.
void Kaim::NavHalfEdgePtr::GetPrevHalfEdgePtr |
( |
NavHalfEdgePtr & |
resultPtr | ) |
const |
|
inline |
Updates resultPtr to identify the previous edge in the triangle.
- Precondition
- This object must be valid. Its validity is not checked.
template<class TraverseLogic >
NavHalfEdgePtr Kaim::NavHalfEdgePtr::GetPrevNavHalfEdgePtrAlongBorder |
( |
void * |
traverseLogicUserData | ) |
const |
|
inline |
Returns the previous edge along the border of the NavMesh according to TraverseLogic.
- Parameters
-
traverseLogicUserData | A pointer to a traverseLogicUserData |
- Precondition
- This object must be valid. Its validity is not checked.
-
This object must be on the border of an area of the NavMesh according to TraverseLogic. It may not be paired with another triangle with a traversable NavTag. That means we must have
IsHalfEdgeCrossable<TraverseLogic>() == false
.
- Postcondition
- The returned edge is not paired with another triangle with a traversable NavTag.
Constructs and returns a NavHalfEdgeRawPtr that refers to the same NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
KyFloat32 Kaim::NavHalfEdgePtr::GetStartVertexAltitude |
( |
| ) |
const |
|
inline |
Returns the altitude (z coordinate) of the starting vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked
CoordPos64 Kaim::NavHalfEdgePtr::GetStartVertexCoordPos64 |
( |
| ) |
const |
|
inline |
Returns the x,y integer coordinates of the starting vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
CoordPos Kaim::NavHalfEdgePtr::GetStartVertexCoordPosInCell |
( |
| ) |
const |
|
inline |
Returns the 2D integer coordinates of the starting vertex of this edge in its NavCell.
- Precondition
- This object must be valid. Its validity is not checked.
Vec3f Kaim::NavHalfEdgePtr::GetStartVertexPos3f |
( |
| ) |
const |
|
inline |
Returns the coordinates of the starting vertex of this NavHalfEdge.
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavHalfEdgePtr::GetTriangleVerticesPos3f |
( |
Vec3f & |
v0Pos3f, |
|
|
Vec3f & |
v1Pos3f, |
|
|
Vec3f & |
v2Pos3f |
|
) |
| const |
|
inline |
Updates the parameters to identify the vertices in the specified triangle.
- Parameters
-
[out] | v0Pos3f | The 3D position of the start vertex of the edge. |
[out] | v1Pos3f | The 3D position of the end vertex in the edge. |
[out] | v2Pos3f | The 3D position of the third vertex in the triangle. |
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavHalfEdgePtr::GetVerticesPos3f |
( |
Vec3f & |
v0Pos3f, |
|
|
Vec3f & |
v1Pos3f |
|
) |
| const |
|
inline |
Updates the parameters to identify the start and end vertices of the specified edge.
- Parameters
-
[out] | v0Pos3f | The 3D position of the start vertex of the edge. |
[out] | v1Pos3f | The 3D position of the end vertex in the edge. |
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavHalfEdgePtr::Invalidate |
( |
| ) |
|
|
inline |
template<class TraverseLogic >
bool Kaim::NavHalfEdgePtr::IsHalfEdgeCrossable |
( |
void * |
traverseLogicUserData | ) |
const |
|
inline |
Returns true if this edge can be traversed according the TraverseLogic.
- Parameters
-
traverseLogicUserData | A pointer to a traverseLogicUserData |
- Precondition
- This object must be valid. Its validity is not checked.
bool Kaim::NavHalfEdgePtr::IsHalfEdgeCrossable |
( |
| ) |
const |
|
inline |
Returns true if this edge is not on an external boundary of the NavMesh and not a internal edge that is not correctly stitched.
- Precondition
- This object must be valid. Its validity is not checked.
template<class TraverseLogic >
bool Kaim::NavHalfEdgePtr::IsHalfEdgeCrossable |
( |
NavHalfEdgePtr & |
resultPtr, |
|
|
void * |
traverseLogicUserData |
|
) |
| const |
|
inline |
Returns true if this edge can be traversed according the TraverseLogic and updates resultPtr.
- Parameters
-
[out] | resultPtr | The edge in the next adjacent triangle that borders this edge. |
| traverseLogicUserData | A pointer to a traverseLogicUserData |
- Precondition
- This object must be valid. Its validity is not checked.
bool Kaim::NavHalfEdgePtr::IsHalfEdgeCrossable |
( |
NavHalfEdgePtr & |
resultPtr | ) |
const |
|
inline |
Returns true if this edge is not on an external boundary of the NavMesh and not a internal edge that is not correctly stitched, and updates resultPtr.
- Parameters
-
[out] | resultPtr | The edge in the next adjacent triangle that borders this edge. |
- Precondition
- This object must be valid. Its validity is not checked.
bool Kaim::NavHalfEdgePtr::IsValid |
( |
| ) |
const |
|
inline |
bool Kaim::NavHalfEdgePtr::operator!= |
( |
const NavHalfEdgePtr & |
rhs | ) |
const |
|
inline |
Returns true if this object identifies a different edge from rhs.
bool Kaim::NavHalfEdgePtr::operator== |
( |
const NavHalfEdgePtr & |
rhs | ) |
const |
|
inline |
Returns true if this object identifies the same edge as rhs, or if both are invalid.
Clears all information maintained by this object.
- Parameters
-
navFloorPtr | The NavFloor that contains the edge this object should refer to. |
halfEdgeIdx | The index of this edge within the NavFloor. |
CompactNavHalfEdgeIdx Kaim::NavHalfEdgePtr::m_halfEdgeIdx |
The index of this edge within its NavFloor.
The documentation for this class was generated from the following file: