Kaim::NavGraphVertexPtr Class Reference

Kaim::NavGraphVertexPtr Class Reference

#include <navgraphvertexptr.h>

Class Description

Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.

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

Public Member Functions

 NavGraphVertexPtr ()
 
 NavGraphVertexPtr (const NavGraphPtr &navGraphPtr, NavGraphVertexIdx vertexIdx)
 
 NavGraphVertexPtr (const NavGraphVertexRawPtr &navGraphVertexRawPtr)
 
NavGraphGetNavGraph () const
 
const NavGraphBlobGetNavGraphBlob () const
 
NavGraphVertexIdx GetNavGraphVertexIdx () const
 
void Invalidate ()
 
bool IsValid () const
 
bool operator!= (const NavGraphVertexPtr &rhs) const
 
bool operator== (const NavGraphVertexPtr &rhs) const
 

Member Functions for valid instance

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

Precondition
This object must be valid. Its validity is not checked.
NavGraphGetNavGraph_UnSafe () const
 
const NavGraphBlobGetNavGraphBlob_UnSafe () const
 
KyUInt32 GetNeighborVertexCount () const
 
GraphVertexData & GetGraphVertexData () const
 
const NavTag & GetNavTag () const
 
const NavGraphVertex & GetNavGraphVertex () const
 
const Vec3fGetGraphVertexPosition () const
 
NavGraphVertexRawPtr GetRawPtr () const
 

Constructor & Destructor Documentation

Kaim::NavGraphVertexPtr::NavGraphVertexPtr ( )
inline

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

Kaim::NavGraphVertexPtr::NavGraphVertexPtr ( const NavGraphPtr navGraphPtr,
NavGraphVertexIdx  vertexIdx 
)
inline

Construct a new instance of NavGraphVertexPtr, referring to the vertexIdx vertex of the NavGraph identified by navGraphPtr.

Kaim::NavGraphVertexPtr::NavGraphVertexPtr ( const NavGraphVertexRawPtr navGraphVertexRawPtr)
inlineexplicit

Construct a new instance of NavGraphVertexPtr copying information from navGraphVertexRawPtr.

Member Function Documentation

GraphVertexData & Kaim::NavGraphVertexPtr::GetGraphVertexData ( ) const
inline

Returns the GraphVertexData associated to this NavGraphVertex.

For Internal use.

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

Retrieves the position of the NavGraph vertex .

Precondition
This object must be valid. Its validity is not checked.
NavGraph * Kaim::NavGraphVertexPtr::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::NavGraphVertexPtr::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::NavGraphVertexPtr::GetNavGraphBlob ( ) const
inline

Returns a pointer to the NavGraphBlob identified by this object.

If this object is invalid, returns KY_NULL.

const NavGraphBlob * Kaim::NavGraphVertexPtr::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 NavGraphVertex & Kaim::NavGraphVertexPtr::GetNavGraphVertex ( ) const
inline

Retrieves the NavGraph vertex at the start of the specified NavGraph edge.

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

Returns the GraphVertexIdx that identifies this vertex within its Graph.

const NavTag & Kaim::NavGraphVertexPtr::GetNavTag ( ) const
inline

Returns the NavTag associated to this NavGraphVertex.

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

Returns the number of outgoing edges (equal to the number of neighbors) of this vertex.

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

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

Precondition
This object must be valid. Its validity is not checked.
void Kaim::NavGraphVertexPtr::Invalidate ( )
inline

Invalidates this object.

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

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

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

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

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

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


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