#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.
Public Member Functions | |
NavHalfEdgePtr () | |
Creates an invalid NavHalfEdgePtr. More... | |
NavHalfEdgePtr (const NavFloorPtr &navFloorPtr, NavHalfEdgeIdx halfEdgeIdx) | |
Creates a new NavHalfEdgePtr referring to the provided NavHalfEdgeIdx in the provided NavFloorPtr. More... | |
NavHalfEdgePtr (const NavHalfEdgeRawPtr &navHalfEdgeRawPtr) | |
Creates a new NavHalfEdgePtr copying information from the provided one. More... | |
void | Set (const NavFloorPtr &navFloorPtr, NavHalfEdgeIdx halfEdgeIdx) |
Clears all information maintained by this object. More... | |
bool | IsValid () const |
Returns true if this object refers to a valid edge: i.e. an edge in a valid NavFloor. see NavFloorPtr::IsValid() More... | |
void | Invalidate () |
Invalidates this object. More... | |
bool | operator== (const NavHalfEdgePtr &rhs) const |
Returns true if this object identifies the same edge as rhs, or if both are invalid. More... | |
bool | operator!= (const NavHalfEdgePtr &rhs) const |
Returns true if this object identifies a different edge from rhs. More... | |
NavHalfEdgeIdx | GetHalfEdgeIdx () const |
Returns the index of this edge within its NavFloor. More... | |
NavFloor * | GetNavFloor () const |
Returns a pointer to the NavFloor that contains this edge. Returns nullptr if this object is not valid. More... | |
const NavFloorBlob * | GetNavFloorBlob () const |
Returns a const pointer to the NavFloorBlob that contains this edge. Returns nullptr if this object is not valid. More... | |
Public Attributes | |
NavFloorPtr | m_navFloorPtr |
The NavFloor that contains this edge. More... | |
CompactNavHalfEdgeIdx | m_halfEdgeIdx |
The index of this edge within its NavFloor. More... | |
Member Functions for valid instance | |
NavFloor * | GetNavFloor_Unsafe () const |
All these function should be called only if IsValid() returns true. More... | |
const NavFloorBlob * | GetNavFloorBlob_Unsafe () const |
Returns a const pointer to the NavFloorBlob that contains this edge. More... | |
NavHalfEdgeRawPtr | GetRawPtr () const |
Constructs and returns a NavHalfEdgeRawPtr that refers to the same NavHalfEdge. More... | |
const CellPos & | GetCellPos () const |
Returns a const reference to the CellPos that indicates the position of the cell that contains this edge within the grid of NavData cells. More... | |
const NavTag & | GetNavTag () const |
Retrieves the NavTag associated to the NavFloor that contains this halfEdge. More... | |
void | GetTriangleVerticesPos3f (Vec3f &v0Pos3f, Vec3f &v1Pos3f, Vec3f &v2Pos3f) const |
Updates the parameters to identify the vertices in the specified triangle. More... | |
void | GetVerticesPos3f (Vec3f &v0Pos3f, Vec3f &v1Pos3f) const |
Updates the parameters to identify the start and end vertices of the specified edge. More... | |
Vec3f | GetStartVertexPos3f () const |
Returns the coordinates of the starting vertex of this NavHalfEdge. More... | |
Vec3f | GetEndVertexPos3f () const |
Returns the coordinates of the ending vertex of this NavHalfEdge. More... | |
CoordPos64 | GetStartVertexCoordPos64 () const |
Returns the x,y integer coordinates of the starting vertex of this NavHalfEdge. More... | |
CoordPos64 | GetEndVertexCoordPos64 () const |
Returns the x,y integer coordinates of the ending vertex of this NavHalfEdge. More... | |
KyFloat32 | GetStartVertexAltitude () const |
Returns the altitude (z coordinate) of the starting vertex of this NavHalfEdge. More... | |
KyFloat32 | GetEndVertexAltitude () const |
Returns the altitude (z coordinate) of the ending vertex of this NavHalfEdge. More... | |
CoordPos | GetStartVertexCoordPosInCell () const |
Returns the 2D integer coordinates of the starting vertex of this edge in its NavCell. More... | |
CoordPos | GetEndVertexCoordPosInCell () const |
Returns the 2D integer coordinates of the ending vertex of this edge in its NavCell. More... | |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData) const |
Returns true if this edge can be traversed according the TraverseLogic. More... | |
bool | IsHalfEdgeCrossable () const |
Returns true if this edge is not on an external boundary of the NavMesh and not a internal edge that is not correctly stitched. More... | |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (NavHalfEdgePtr &resultPtr, void *traverseLogicUserData) const |
Returns true if this edge can be traversed according the TraverseLogic and updates resultPtr. More... | |
bool | IsHalfEdgeCrossable (NavHalfEdgePtr &resultPtr) const |
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. More... | |
void | GetPairHalfEdgePtr (NavHalfEdgePtr &resultPtr) const |
Updates resultPtr to identify the edge in the next adjacent triangle that borders this edge. More... | |
void | GetNextHalfEdgePtr (NavHalfEdgePtr &resultPtr) const |
Updates resultPtr to identify the next edge in the triangle. More... | |
void | GetPrevHalfEdgePtr (NavHalfEdgePtr &resultPtr) const |
Updates resultPtr to identify the previous edge in the triangle. More... | |
template<class TraverseLogic > | |
NavHalfEdgePtr | GetNextNavHalfEdgePtrAlongBorder (void *traverseLogicUserData) const |
Returns the next edge along the border of the NavMesh according to TraverseLogic. More... | |
template<class TraverseLogic > | |
NavHalfEdgePtr | GetPrevNavHalfEdgePtrAlongBorder (void *traverseLogicUserData) const |
Returns the previous edge along the border of the NavMesh according to TraverseLogic. More... | |
|
inline |
Creates an invalid NavHalfEdgePtr.
|
inline |
Creates a new NavHalfEdgePtr referring to the provided NavHalfEdgeIdx in the provided NavFloorPtr.
|
inlineexplicit |
Creates a new NavHalfEdgePtr copying information from the provided one.
|
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.
|
inline |
Returns the altitude (z coordinate) of the ending vertex of this NavHalfEdge.
|
inline |
Returns the x,y integer coordinates of the ending vertex of this NavHalfEdge.
|
inline |
Returns the 2D integer coordinates of the ending vertex of this edge in its NavCell.
|
inline |
Returns the coordinates of the ending vertex of this NavHalfEdge.
|
inline |
Returns the index of this edge within its NavFloor.
|
inline |
Returns a pointer to the NavFloor that contains this edge. Returns nullptr if this object is not valid.
|
inline |
|
inline |
Returns a const pointer to the NavFloorBlob that contains this edge. Returns nullptr if this object is not valid.
|
inline |
Returns a const pointer to the NavFloorBlob that contains this edge.
|
inline |
Retrieves the NavTag associated to the NavFloor that contains this halfEdge.
|
inline |
Updates resultPtr to identify the next edge in the triangle.
|
inline |
Returns the next edge along the border of the NavMesh according to TraverseLogic.
traverseLogicUserData | A pointer to a traverseLogicUserData |
IsHalfEdgeCrossable<TraverseLogic>() == false
.
|
inline |
Updates resultPtr to identify the edge in the next adjacent triangle that borders this edge.
|
inline |
Updates resultPtr to identify the previous edge in the triangle.
|
inline |
Returns the previous edge along the border of the NavMesh according to TraverseLogic.
traverseLogicUserData | A pointer to a traverseLogicUserData |
IsHalfEdgeCrossable<TraverseLogic>() == false
.
|
inline |
Constructs and returns a NavHalfEdgeRawPtr that refers to the same NavHalfEdge.
|
inline |
Returns the altitude (z coordinate) of the starting vertex of this NavHalfEdge.
|
inline |
Returns the x,y integer coordinates of the starting vertex of this NavHalfEdge.
|
inline |
Returns the 2D integer coordinates of the starting vertex of this edge in its NavCell.
|
inline |
Returns the coordinates of the starting vertex of this NavHalfEdge.
|
inline |
Updates the parameters to identify the vertices in the specified triangle.
[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. |
Updates the parameters to identify the start and end vertices of the specified edge.
[out] | v0Pos3f | The 3D position of the start vertex of the edge. |
[out] | v1Pos3f | The 3D position of the end vertex in the edge. |
|
inline |
Invalidates this object.
|
inline |
Returns true if this edge can be traversed according the TraverseLogic.
traverseLogicUserData | A pointer to a traverseLogicUserData |
|
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.
|
inline |
Returns true if this edge can be traversed according the TraverseLogic and updates resultPtr.
[out] | resultPtr | The edge in the next adjacent triangle that borders this edge. |
traverseLogicUserData | A pointer to a traverseLogicUserData |
|
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.
[out] | resultPtr | The edge in the next adjacent triangle that borders this edge. |
|
inline |
Returns true if this object refers to a valid edge: i.e. an edge in a valid NavFloor. see NavFloorPtr::IsValid()
|
inline |
Returns true if this object identifies a different edge from rhs.
|
inline |
Returns true if this object identifies the same edge as rhs, or if both are invalid.
|
inline |
CompactNavHalfEdgeIdx Kaim::NavHalfEdgePtr::m_halfEdgeIdx |
The index of this edge within its NavFloor.
NavFloorPtr Kaim::NavHalfEdgePtr::m_navFloorPtr |
The NavFloor that contains this edge.