Kaim::NavGraphEdgePtr Class Reference

Kaim::NavGraphEdgePtr Class Reference

#include <navgraphedgeptr.h>

Class Description

Each instance of this class uniquely identifies a single and mono-directionnal NavGraphEdge in a NavGraph.

Instances of this class can be safely stored and used in subsequent frames.

Within a NavGraph, a NavGraphEdge is identified by a NavGraphVertexIdx (corresponding to its starting vertex) and the index of a Neighbor vertex of this starting vertex among all its neighbor vertices (This neighbor vertex corresponds to its starting vertex).

Public Member Functions

 NavGraphEdgePtr ()
 
KyUInt32 GetEdgeNumberAroundStartVertex () const
 
NavGraphGetNavGraph () const
 
const NavGraphBlobGetNavGraphBlob () const
 
NavGraphVertexIdx GetStartVertexIdx () const
 
void Invalidate ()
 
bool IsValid () const
 
bool operator!= (const NavGraphEdgePtr &rhs) const
 
bool operator== (const NavGraphEdgePtr &rhs) const
 

Member Functions for valid instance

All these function should be called only if IsValid() returns true

NavGraphGetNavGraph_UnSafe () const
 
const NavGraphBlobGetNavGraphBlob_UnSafe () const
 
NavGraphVertexIdx GetEndNavGraphVertexIdx () const
 
NavGraphVertexPtr GetStartNavGraphVertexPtr () const
 
NavGraphVertexPtr GetEndNavGraphVertexPtr () const
 
const NavGraphVertex & GetStartNavGraphVertex () const
 
const NavGraphVertex & GetEndNavGraphVertex () const
 
const Vec3fGetStartNavGraphVertexPosition () const
 
const Vec3fGetEndNavGraphVertexPosition () const
 
const NavTag & GetNavTag () const
 
NavGraphEdgeRawPtr GetRawPtr () const
 
NavGraphEdgePtr GetOppositeNavGraphEdgePtr () const
 

Constructor & Destructor Documentation

Kaim::NavGraphEdgePtr::NavGraphEdgePtr ( )
inline

Constructs a new instance of this class. Creates an invalid NavGraphEdgePtr.

Member Function Documentation

KyUInt32 Kaim::NavGraphEdgePtr::GetEdgeNumberAroundStartVertex ( ) const
inline

Returns the index of the edge around its starting vertex. It is the index of the ending vertex within the neighbor vertices of the starting vertex.

const NavGraphVertex & Kaim::NavGraphEdgePtr::GetEndNavGraphVertex ( ) const
inline

Returns the ending NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraphVertexIdx Kaim::NavGraphEdgePtr::GetEndNavGraphVertexIdx ( ) const
inline

Returns the index of the ending NavGraphVertex of current instance within its NavGraph.

Precondition
This object must be valid. Its validity is not checked.
const Vec3f & Kaim::NavGraphEdgePtr::GetEndNavGraphVertexPosition ( ) const
inline

Returns the position of the ending NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraphVertexPtr Kaim::NavGraphEdgePtr::GetEndNavGraphVertexPtr ( ) const
inline

Returns a NavGraphVertexPtr that identifies the ending NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraph * Kaim::NavGraphEdgePtr::GetNavGraph ( ) const
inline

Returns a pointer to the NavGraph that handles the graph identified by this object.

If this object is invalid, returns KY_NULL.

NavGraph * Kaim::NavGraphEdgePtr::GetNavGraph_UnSafe ( ) const
inline

Returns a pointer to the NavGraph that handles the graph identified by this object.

Precondition
This object must be valid. Its validity is not checked.
const NavGraphBlob * Kaim::NavGraphEdgePtr::GetNavGraphBlob ( ) const
inline

Returns a pointer to the NavGraphBlob identified by this object.

If this object is invalid, returns KY_NULL.

const NavGraphBlob * Kaim::NavGraphEdgePtr::GetNavGraphBlob_UnSafe ( ) const
inline

Returns a pointer to the NavGraphBlob identified by this object.

Precondition
This object must be valid. Its validity is not checked.
const NavTag & Kaim::NavGraphEdgePtr::GetNavTag ( ) const
inline

Returns the NavTag associated to this NavGraphEdge.

Precondition
This object must be valid. Its validity is not checked.
NavGraphEdgePtr Kaim::NavGraphEdgePtr::GetOppositeNavGraphEdgePtr ( ) const

Return the opposite NavGraphEdgePtr, if any exists.

If no opposite NavGraphEdgePtr exists (the edge is not "bi-directional"), an invalid NavGraphEdgePtr is returned

Precondition
This object must be valid. Its validity is not checked.
NavGraphEdgeRawPtr Kaim::NavGraphEdgePtr::GetRawPtr ( ) const
inline

Constructs and returns a NavGraphEdgeRawPtr that refers to the same NavGraphVertex.

Precondition
This object must be valid. Its validity is not checked.
const NavGraphVertex & Kaim::NavGraphEdgePtr::GetStartNavGraphVertex ( ) const
inline

Returns the starting NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
const Vec3f & Kaim::NavGraphEdgePtr::GetStartNavGraphVertexPosition ( ) const
inline

Returns the position of the starting NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraphVertexPtr Kaim::NavGraphEdgePtr::GetStartNavGraphVertexPtr ( ) const
inline

Returns a NavGraphVertexPtr that identifies the starting NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraphVertexIdx Kaim::NavGraphEdgePtr::GetStartVertexIdx ( ) const
inline

Returns the index of the starting NavGraphVertex of current instance within its NavGraph.

void Kaim::NavGraphEdgePtr::Invalidate ( )
inline

Invalidates this object.

bool Kaim::NavGraphEdgePtr::IsValid ( ) const
inline

Returns true if this object refers to a valid NavGraphEdge: i.e. a NavGraphEdge in a valid NavGraph. see NavGraph::IsValid().

bool Kaim::NavGraphEdgePtr::operator!= ( const NavGraphEdgePtr rhs) const
inline

Returns true if this object identifies an edge different from the one identified by rhs, or if only one of them is invalid.

bool Kaim::NavGraphEdgePtr::operator== ( const NavGraphEdgePtr rhs) const
inline

Returns true if this object identifies the same edge as rhs, or if both are invalid.


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