Kaim::NavTrianglePtr Class Reference
#include <navtriangleptr.h>
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Instances of this class can be safely stored and used in subsequent frames.
Kaim::NavTrianglePtr::NavTrianglePtr |
( |
| ) |
|
|
inline |
Creates a new NavTrianglePtr referring to the provided NavTriangleIdx in the provided NavFloorPtr.
- Parameters
-
navFloorPtr | The NavFloor that contains the triangle this object should refer to. |
triangleIdx | The index of this triangle within the NavFloor. |
Creates a new NavTrianglePtr copying information from the provided one.
KyFloat32 Kaim::NavTrianglePtr::GetAltitudeOfPointInTriangle |
( |
const Vec3f & |
pos | ) |
const |
|
inline |
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::NavTrianglePtr::GetCellPos |
( |
| ) |
const |
|
inline |
Returns a const reference to the CellPos that indicates the position of the cell that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
NavFloor * Kaim::NavTrianglePtr::GetNavFloor |
( |
| ) |
const |
|
inline |
Returns a pointer to the NavFloor that contains this triangle. Returns KY_NULL if this object is not valid.
NavFloor * Kaim::NavTrianglePtr::GetNavFloor_Unsafe |
( |
| ) |
const |
|
inline |
Returns a pointer to the NavFloor that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
const NavFloorBlob * Kaim::NavTrianglePtr::GetNavFloorBlob |
( |
| ) |
const |
|
inline |
Returns a const pointer to the NavFloorBlob that contains this triangle. Returns KY_NULL if this object is not valid.
const NavFloorBlob * Kaim::NavTrianglePtr::GetNavFloorBlob_Unsafe |
( |
| ) |
const |
|
inline |
Returns a const pointer to the NavFloorBlob that contains this triangle.
- Precondition
- This object must be valid. Its validity is not checked.
const NavTag & Kaim::NavTrianglePtr::GetNavTag |
( |
| ) |
const |
|
inline |
- Precondition
- This object must be valid. Its validity is not checked.
Constructs and returns a NavTriangleRawPtr that refers to the same NavTriangle.
- Precondition
- This object must be valid. Its validity is not checked. Returns a const reference to the NavTag associated to this navTriangle.
Returns the index of this triangle within its NavFloor.
void Kaim::NavTrianglePtr::GetVerticesCoordPos |
( |
CoordPos & |
v0CoordPos, |
|
|
CoordPos & |
v1CoordPos, |
|
|
CoordPos & |
v2CoordPos |
|
) |
| const |
|
inline |
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::NavTrianglePtr::GetVerticesPos3f |
( |
Vec3f & |
v0Pos3f, |
|
|
Vec3f & |
v1Pos3f, |
|
|
Vec3f & |
v2Pos3f |
|
) |
| const |
|
inline |
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::NavTrianglePtr::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::NavTrianglePtr::Invalidate |
( |
| ) |
|
|
inline |
bool Kaim::NavTrianglePtr::IsValid |
( |
| ) |
const |
|
inline |
Returns true if this object refers to a valid triangle: i.e. a triangle in a validNavFloor. see NavFloorPtr::IsValid().
bool Kaim::NavTrianglePtr::operator!= |
( |
const NavTrianglePtr & |
rhs | ) |
const |
|
inline |
Returns true if this object identifies a different triangle from rhs.
bool Kaim::NavTrianglePtr::operator== |
( |
const NavTrianglePtr & |
rhs | ) |
const |
|
inline |
Returns true if this object identifies the same triangle as rhs, or if both are invalid.
Clears all information maintained by this object.
- Parameters
-
navFloorPtr | 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::NavTrianglePtr::m_triangleIdx |
The index of this triangle within its NavFloor.
The documentation for this class was generated from the following file: