Kaim::NavHalfEdge Class Reference

Kaim::NavHalfEdge Class Reference

#include <navhalfedge.h>

Class Description

Each instance of NavHalfEdge represents a single edge of a single triangle within the NavMesh.

It is called a "half-edge" because adjacent triangles do not share the edge that forms their border; instead, each triangle maintains its own half-edge to represent its own boundary.

Public Member Functions

KyUInt32 GetBoundaryEdgeIdx () const
 
KyUInt32 GetCellBoundaryDir () const
 
NavHalfEdgeObstacleType GetHalfEdgeObstacleType () const
 
NavHalfEdgeType GetHalfEdgeType () const
 
NavHalfEdgeIdx GetNextObstacleHalfEdgeIdx () const
 
NavHalfEdgeIdx GetPairHalfEdgeIdx () const
 
NavVertexIdx GetStartVertexIdx () const
 

Public Attributes

KyUInt32 m_edgeData
 

Member Function Documentation

KyUInt32 Kaim::NavHalfEdge::GetBoundaryEdgeIdx ( ) const
inline

If this edge lies on the border of the NavFloor, this method returns the index of this edge among the boundary edges maintained by its NavFloor.

Only call this method if IsHalfEdgeABoundary(GetHalfEdgeType()) returns true.

CardinalDir Kaim::NavHalfEdge::GetCellBoundaryDir ( ) const
inline

If this edge lies on the border of the NavCell, this method returns the cardinal direction of the border where it lies in its NavCell.

Only call this method if IsHalfEdgeACellBoundary(GetHalfEdgeType()) returns true.

NavHalfEdgeObstacleType Kaim::NavHalfEdge::GetHalfEdgeObstacleType ( ) const
inline

Returns an element from the NavHalfEdgeObstacleType enumeration that indicates the type of obstacle this edge represents.

Only call this method if GetHalfEdgeType() returns Kaim::EDGETYPE_OBSTACLE.

NavHalfEdgeType Kaim::NavHalfEdge::GetHalfEdgeType ( ) const
inline

Returns an element from the NavHalfEdgeType enumeration that indicates the type of border this edge represents.

NavHalfEdgeIdx Kaim::NavHalfEdge::GetNextObstacleHalfEdgeIdx ( ) const
inline

If this edge borders an obstacle, this method returns the index of the next edge that borders that obstacle.

Only call this method if GetHalfEdgeType() returns Kaim::EDGETYPE_OBSTACLE.

NavHalfEdgeIdx Kaim::NavHalfEdge::GetPairHalfEdgeIdx ( ) const
inline

If this edge borders an edge in an adjoining triangle, this method returns the index of that adjacent edge.

Only call this method if GetHalfEdgeType() returns Kaim::EDGETYPE_CONNEXBOUNDARY or Kaim::EDGETYPE_PAIRED.

NavVertexIdx Kaim::NavHalfEdge::GetStartVertexIdx ( ) const
inline

Returns the index of the starting vertex of the edge.

Member Data Documentation

KyUInt32 Kaim::NavHalfEdge::m_edgeData

For internal use. Do not modify.


The documentation for this class was generated from the following file: