Kaim::NavGraphVertexRawPtr Class Reference

Kaim::NavGraphVertexRawPtr Class Reference

#include <navgraphvertexrawptr.h>

Class Description

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

This pointer is guaranteed to be valid only in the frame in which it was retrieved.

Never store a NavGraphVertexRawPtr for use in subsequent frames, because it has no protection against data streaming. Use NavGraphVertexPtr 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 NavGraphVertexPtr which is safer.

Public Member Functions

 NavGraphVertexRawPtr ()
 
 NavGraphVertexRawPtr (const NavGraphRawPtr &navGraphRawPtr, NavGraphVertexIdx vertexIdx)
 
void Invalidate ()
 
bool IsValid () const
 
bool operator!= (const NavGraphVertexRawPtr &rhs) const
 
bool operator== (const NavGraphVertexRawPtr &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.
NavGraphVertexIdx GetNavGraphVertexIdx () const
 
NavGraphGetNavGraph () const
 
const NavGraphBlobGetNavGraphBlob () const
 
KyUInt32 GetNeighborVertexCount () const
 
GraphVertexData & GetGraphVertexData () const
 
const NavTag & GetNavTag () const
 
const NavGraphVertex & GetNavGraphVertex () const
 
const Vec3fGetGraphVertexPosition () const
 

Constructor & Destructor Documentation

Kaim::NavGraphVertexRawPtr::NavGraphVertexRawPtr ( )
inline

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

Kaim::NavGraphVertexRawPtr::NavGraphVertexRawPtr ( const NavGraphRawPtr navGraphRawPtr,
NavGraphVertexIdx  vertexIdx 
)
inline

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

Member Function Documentation

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

Returns theGraphVertexData associated to this NavGraphVertex. For Internal use.

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

Retrieves the position of the NavGraph vertex .

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

Returns a reference to the NavGraph that contains this NavGraphVertex.

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

Returns a reference to the NavGraphBlob that contains this NavGraphVertex.

Precondition
This object must be valid. Its validity is not checked.
const NavGraphVertex & Kaim::NavGraphVertexRawPtr::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::NavGraphVertexRawPtr::GetNavGraphVertexIdx ( ) const
inline

Returns the NavGraphVertexIdx that identifies this vertex within its NavGraph.

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

Returns the NavTag associated to this NavGraphVertex.

Precondition
This object must be valid. Its validity is not checked.
KyUInt32 Kaim::NavGraphVertexRawPtr::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.
void Kaim::NavGraphVertexRawPtr::Invalidate ( )
inline

Invalidates this object.

bool Kaim::NavGraphVertexRawPtr::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::NavGraphVertexRawPtr::operator!= ( const NavGraphVertexRawPtr 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::NavGraphVertexRawPtr::operator== ( const NavGraphVertexRawPtr 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: