Kaim::NavTriangleRawPtr Class Reference
#include <navtrianglerawptr.h>
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
This pointer is guaranteed to be valid only in the frame in which it was retrieved.
Never store a NavTriangleRawPtr for use in subsequent frames, because it has no protection against data streaming. Use NavTrianglePtr 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 NavTrianglePtr which is safer.
|
template<class TraverseLogic > |
bool | CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithoutCostMultipler &) const |
|
template<class TraverseLogic > |
bool | CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerNavTag &) const |
|
template<class TraverseLogic > |
bool | CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerTriangle &) const |
|
Kaim::NavTriangleRawPtr::NavTriangleRawPtr |
( |
| ) |
|
|
inline |
Constructs a new NavTriangleRawPtr referring to the provided NavTriangleIdx in the provided NavFloorRawPtr.
- Parameters
-
navFloorRawPtr | The NavFloor that contains the triangle this object should refer to. |
triangleIdx | The index of this triangle within the NavFloor. |
Constructs a new NavTriangleRawPtr referring to the provided NavTriangleIdx in the provided NavFloor.
- Parameters
-
navFloor | The NavFloor that contains the triangle this object should refer to. |
triangleIdx | The index of this triangle within the NavFloor. |
KyFloat32 Kaim::NavTriangleRawPtr::GetAltitudeOfPointInTriangle |
( |
const Vec3f & |
pos | ) |
const |
Returns the altitude of the point on the plane defined by this triangle that has the same (X,Y) coordinates as the specified position.
- Parameters
-
pos | The 3D position of the point |
- Precondition
- This object must be valid. Its validity is not checked.
const CellPos & Kaim::NavTriangleRawPtr::GetCellPos |
( |
| ) |
const |
|
inline |
Returns a const reference to the CellPos that indicates the position of the cell that contains this triangle within the grid of NavData cells.
- Precondition
- This object must be valid. Its validity is not checked.
NavFloor * Kaim::NavTriangleRawPtr::GetNavFloor |
( |
| ) |
const |
|
inline |
Returns a reference to the NavFloor that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
const NavFloorBlob * Kaim::NavTriangleRawPtr::GetNavFloorBlob |
( |
| ) |
const |
|
inline |
Returns a reference to the NavFloorBlob that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
const NavTag & Kaim::NavTriangleRawPtr::GetNavTag |
( |
| ) |
const |
|
inline |
Retrieves the NavTag associated to the NavFloor that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
Retrieves the index of this triangle within its NavFloorBlob.
void Kaim::NavTriangleRawPtr::GetVerticesCoordPos |
( |
CoordPos & |
v0CoordPos, |
|
|
CoordPos & |
v1CoordPos, |
|
|
CoordPos & |
v2CoordPos |
|
) |
| const |
Updates the parameters to identify the vertices in this triangle.
- Parameters
-
[out] | v0CoordPos | The 2D integer position in cell of the first vertex in the triangle. |
[out] | v1CoordPos | The 2D integer position in cell of the second vertex in the triangle. |
[out] | v2CoordPos | The 2D integer position in cell of the third vertex in the triangle. |
- Precondition
- This object must be valid. Its validity is not checked.
Updates the parameters to identify the vertices in this triangle.
- Parameters
-
[out] | v0CoordPos64 | The 2D integer position of the first vertex in the triangle. |
[out] | v1CoordPos64 | The 2D integer position of the second vertex in the triangle. |
[out] | v2CoordPos64 | The 2D integer position of the third vertex in the triangle. |
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavTriangleRawPtr::GetVerticesPos3f |
( |
Vec3f & |
v0Pos3f, |
|
|
Vec3f & |
v1Pos3f, |
|
|
Vec3f & |
v2Pos3f |
|
) |
| const |
Updates the parameters to identify the vertices in this triangle.
- Parameters
-
[out] | v0Pos3f | The 3D position of the first vertex in the triangle. |
[out] | v1Pos3f | The 3D position of the second vertex in the triangle. |
[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::NavTriangleRawPtr::GetVerticesPos3f |
( |
Triangle3f & |
triangle3f | ) |
const |
|
inline |
Updates the parameters to identify the vertices in this triangle.
- Parameters
-
[out] | triangle3f | The 3 3D positions of the vertices in the triangle. |
- Precondition
- This object must be valid. Its validity is not checked.
void Kaim::NavTriangleRawPtr::Invalidate |
( |
| ) |
|
|
inline |
bool Kaim::NavTriangleRawPtr::IsValid |
( |
| ) |
const |
|
inline |
Returns true if this object refers to a valid edge: i.e. an edge in a validNavFloor. see NavFloorPtr::IsValid()
Returns true if this object identifies a different triangle from rhs.
Returns true if this object identifies the same triangle as rhs, or if both are invalid.
Clears all information maintained by this object.
- Parameters
-
navFloorRawPtr | The NavFloor that contains the triangle this object should refer to. |
triangleIdx | The index of this triangle within the NavFloor. |
Clears all information maintained by this object.
- Parameters
-
navFloor | The NavFloor that contains the triangle this object should refer to. |
triangleIdx | The index of this triangle within the NavFloor. |
The NavFloor that contains this triangle.
CompactNavTriangleIdx Kaim::NavTriangleRawPtr::m_triangleIdx |
The index of this triangle within its NavFloor.
The documentation for this class was generated from the following files: