#include <navhalfedgerawptr.h>
Each instance of this class uniquely identifies a singleNavHalfEdge in a NavFloor.
This pointer is guaranteed to be valid only in the frame in which it was retrieved.
Never store a NavHalfEdgeRawPtr for use in subsequent frames, because it has no protection against data streaming. Use NavHalfEdgePtr instead.
Actually, this class is used internally for some performance and working memory usage friendliness reason (no ref-counting increment/decrement, no need to call constructor/destructor), but unless you really know what you do prefer NavHalfEdgePtr which is safer.
Public Member Functions | |
NavHalfEdgeRawPtr () | |
NavHalfEdgeRawPtr (const NavFloorRawPtr &navFloorRawPtr, NavHalfEdgeIdx halfEdgeIdx) | |
NavHalfEdgeRawPtr (NavFloor *navFloor, NavHalfEdgeIdx halfEdgeIdx) | |
NavHalfEdgeIdx | GetHalfEdgeIdx () const |
void | Invalidate () |
bool | IsValid () const |
bool | operator!= (const NavHalfEdgeRawPtr &rhs) const |
bool | operator== (const NavHalfEdgeRawPtr &rhs) const |
void | Set (const NavFloorRawPtr &navFloorRawPtr, NavHalfEdgeIdx halfEdgeIdx) |
void | Set (NavFloor *navFloor, NavHalfEdgeIdx halfEdgeIdx) |
Public Attributes | |
KyUInt16 | m_boundaryEdgeIdx |
CompactNavHalfEdgeIdx | m_halfEdgeIdx |
NavFloorRawPtr | m_navFloorRawPtr |
Member Functions for valid instance | |
All these function should be called only if IsValid() returns true
| |
NavFloor * | GetNavFloor () const |
const NavFloorBlob * | GetNavFloorBlob () const |
const CellPos & | GetCellPos () const |
const NavTag & | GetNavTag () const |
void | GetTriangleVerticesPos3f (Vec3f &v0Pos3f, Vec3f &v1Pos3f, Vec3f &v2Pos3f) const |
void | GetVerticesPos3f (Vec3f &v0Pos3f, Vec3f &v1Pos3f) const |
Vec3f | GetStartVertexPos3f () const |
Vec3f | GetEndVertexPos3f () const |
Vec3f | GetMiddlePos3fOfNavHalfEdge () const |
CoordPos64 | GetStartVertexCoordPos64 () const |
CoordPos64 | GetEndVertexCoordPos64 () const |
KyFloat32 | GetStartVertexAltitude () const |
KyFloat32 | GetEndVertexAltitude () const |
CoordPos | GetStartVertexCoordPosInCell () const |
CoordPos | GetEndVertexCoordPosInCell () const |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData) const |
bool | IsHalfEdgeCrossable () const |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData, NavHalfEdgeRawPtr &resultRawPtr) const |
bool | IsHalfEdgeCrossable (NavHalfEdgeRawPtr &resultRawPtr) const |
template<class TraverseLogic > | |
bool | IsStartVertexOnBorder (void *traverseLogicUserData) const |
bool | IsStartVertexOnBorder () const |
template<class TraverseLogic > | |
bool | IsEndVertexOnBorder (void *traverseLogicUserData) const |
bool | IsEndVertexOnBorder () const |
void | GetPairHalfEdgeRawPtr (NavHalfEdgeRawPtr &resultRawPtr) const |
void | GetNextHalfEdgeRawPtr (NavHalfEdgeRawPtr &resultRawPtr) const |
void | GetPrevHalfEdgeRawPtr (NavHalfEdgeRawPtr &resultRawPtr) const |
template<class TraverseLogic > | |
NavHalfEdgeRawPtr | GetNextNavHalfEdgeRawPtrAlongBorder (void *traverseLogicUserData) const |
template<class TraverseLogic > | |
NavHalfEdgeRawPtr | GetPrevNavHalfEdgeRawPtrAlongBorder (void *traverseLogicUserData) const |
For internal use only | |
NavHalfEdgeRawPtr & | GetCorrespondingLink () |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, KyFloat32 *costMultiplier) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, const Vec3f *position) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, NavHalfEdgeRawPtr &resultRawPtr, const Vec3f *position) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, const Vec3f *position) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, const Vec3f *position, KyFloat32 *costMultiplier) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, KyFloat32 *costMultiplier) const |
template<class TraverseLogic > | |
bool | IsPairedEdgeCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *, const LogicWithoutCostMultipler &) const |
template<class TraverseLogic > | |
bool | IsPairedEdgeCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerNavTag &) const |
template<class TraverseLogic > | |
bool | IsPairedEdgeCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerTriangle &) const |
template<class TraverseLogic > | |
bool | IsConnexBoundaryCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *, const LogicWithoutCostMultipler &) const |
template<class TraverseLogic > | |
bool | IsConnexBoundaryCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerNavTag &) const |
template<class TraverseLogic > | |
bool | IsConnexBoundaryCrossable (void *traverseLogicUserData, const NavFloorBlob *navFloorBlob, NavTriangleIdx pairTriangleIdx, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerTriangle &) const |
template<class TLogic > | |
bool | IsFloorOrCellLinkCrossable (void *traverseLogicUserData, const NavHalfEdgeRawPtr &link, KyFloat32 *costMultiplier, const LogicWithoutCostMultipler &) const |
template<class TLogic > | |
bool | IsFloorOrCellLinkCrossable (void *traverseLogicUserData, const NavHalfEdgeRawPtr &link, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerNavTag &) const |
template<class TLogic > | |
bool | IsFloorOrCellLinkCrossable (void *traverseLogicUserData, const NavHalfEdgeRawPtr &link, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerTriangle &) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, const Vec3f *position, KyFloat32 *costMultiplier, const LogicDoNotUseCanEnterNavTag &) const |
template<class TraverseLogic > | |
bool | IsHalfEdgeOneWayCrossable (void *traverseLogicUserData, NavHalfEdge navHalfEdge, const NavFloorBlob *navFloorBlob, NavHalfEdgeRawPtr &resultRawPtr, const Vec3f *position, KyFloat32 *costMultiplier, const LogicDoUseCanEnterNavTag &) const |
void | GetVerticesPos3f (KyFloat32 integerPrecision, const CoordPos64 &cellOrigin, const NavFloorBlob *navFloorBlob, Vec3f &v0Pos3f, Vec3f &v1Pos3f) const |
|
inline |
Creates an invalid NavHalfEdgeRawPtr.
|
inline |
Creates a new NavHalfEdgePtr referring to the provided NavHalfEdgeIdx in the provided NavFloorRawPtr.
|
inline |
Creates a new NavHalfEdgePtr referring to the provided NavHalfEdgeIdx in the provided NavFloor.
|
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.
CoordPos64 Kaim::NavHalfEdgeRawPtr::GetEndVertexCoordPos64 | ( | ) | const |
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.
Vec3f Kaim::NavHalfEdgeRawPtr::GetEndVertexPos3f | ( | ) | const |
Returns the coordinates of the ending vertex of this NavHalfEdge.
|
inline |
Retrieves the index of this NavHalfEdge within its NavFloor.
Vec3f Kaim::NavHalfEdgeRawPtr::GetMiddlePos3fOfNavHalfEdge | ( | ) | const |
Computes and returns the coordinates of the middle position of this NavHalfEdge.
|
inline |
Returns a reference to the NavFloor that contains this hedge.
|
inline |
Returns a reference to the NavFloorBlob that contains this edge.
|
inline |
Retrieves the NavTag associated to the NavFloor that contains this halfEdge.
|
inline |
Updates resultRawPtr 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 |
void Kaim::NavHalfEdgeRawPtr::GetPairHalfEdgeRawPtr | ( | NavHalfEdgeRawPtr & | resultRawPtr | ) | const |
Updates resultRawPtr to identify the edge in the next adjacent triangle that borders this edge.
[out] | resultRawPtr | Updated to store the next adjacent triangle. |
|
inline |
Updates resultRawPtr to identify the previous edge in the triangle.
|
inline |
Returns the previous edge along the border of the given NavTag.
traverseLogicUserData | A pointer to a traverseLogicUserData |
|
inline |
Returns the altitude (z coordinate) of the starting vertex of this NavHalfEdge.
CoordPos64 Kaim::NavHalfEdgeRawPtr::GetStartVertexCoordPos64 | ( | ) | const |
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.
Vec3f Kaim::NavHalfEdgeRawPtr::GetStartVertexPos3f | ( | ) | const |
Returns the coordinates of the starting vertex of this NavHalfEdge.
void Kaim::NavHalfEdgeRawPtr::GetTriangleVerticesPos3f | ( | Vec3f & | v0Pos3f, |
Vec3f & | v1Pos3f, | ||
Vec3f & | v2Pos3f | ||
) | const |
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.
bool Kaim::NavHalfEdgeRawPtr::IsEndVertexOnBorder | ( | void * | traverseLogicUserData | ) | const |
Returns true if all the edges around the end vertex of this edge can be traversed accordingly to the TraverseLogic.
traverseLogicUserData | A pointer to a traverseLogicUserData |
bool Kaim::NavHalfEdgeRawPtr::IsEndVertexOnBorder | ( | ) | const |
Returns true if all the edges around the end vertex of this edge are neither an external boundary of the NavMesh nor an internal edge that is not correctly stitched.
|
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 resultRawPtr.
[out] | resultRawPtr | 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 resultRawPtr.
[out] | resultRawPtr | The edge in the next adjacent triangle that borders this edge. |
|
inline |
Returns true if all the edges around the start vertex of this edge can be traversed accordingly to the TraverseLogic.
traverseLogicUserData | A pointer to a traverseLogicUserData |
|
inline |
Returns true if all the edges around the start vertex of this edge are neither an external boundary of the NavMesh nor an internal edge that is not correctly stitched.
|
inline |
Returns true if this object refers to a valid edge: i.e. an edge in a validNavFloor. 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 |
|
inline |
KyUInt16 Kaim::NavHalfEdgeRawPtr::m_boundaryEdgeIdx |
Use internally to speed up stitching. Do not modify.
CompactNavHalfEdgeIdx Kaim::NavHalfEdgeRawPtr::m_halfEdgeIdx |
The index of this edge within its NavFloor.
NavFloorRawPtr Kaim::NavHalfEdgeRawPtr::m_navFloorRawPtr |
The NavFloor that contains this edge.