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 ()
 Constructs a new instance of this class. Creates an invalid NavGraphVertexPtr. More...
 
 NavGraphVertexPtr (const NavGraphPtr &navGraphPtr, NavGraphVertexIdx vertexIdx)
 Construct a new instance of NavGraphVertexPtr, referring to the vertexIdx vertex of the NavGraph identified by navGraphPtr. More...
 
 NavGraphVertexPtr (const NavGraphVertexRawPtr &navGraphVertexRawPtr)
 Construct a new instance of NavGraphVertexPtr copying information from navGraphVertexRawPtr. More...
 
bool IsValid () const
 Returns true if this object refers to a valid NavGraphVertex: i.e. a NavGraphVertex in a validNavGraph. see NavGraph::IsValid(). More...
 
void Invalidate ()
 Invalidates this object. More...
 
bool operator== (const NavGraphVertexPtr &rhs) const
 Returns true if this object identifies the same vertex as rhs, or if both are invalid. More...
 
bool operator!= (const NavGraphVertexPtr &rhs) const
 Returns true if this object identifies an vertex different from the one identified by rhs, or if only one of them is invalid. More...
 
NavGraphVertexIdx GetNavGraphVertexIdx () const
 Returns the GraphVertexIdx that identifies this vertex within its Graph. More...
 
NavGraphGetNavGraph () const
 Returns a pointer to the NavGraph that handles the graph identified by this object. More...
 
const NavGraphBlobGetNavGraphBlob () const
 Returns a pointer to the NavGraphBlob identified by this object. More...
 

Member Functions for valid instance

NavGraphGetNavGraph_UnSafe () const
 All these function should be called only if IsValid() returns true. More...
 
const NavGraphBlobGetNavGraphBlob_UnSafe () const
 Returns a pointer to the NavGraphBlob identified by this object. More...
 
KyUInt32 GetNeighborVertexCount () const
 Returns the number of outgoing edges (equal to the number of neighbors) of this vertex. More...
 
GraphVertexData & GetGraphVertexData () const
 Returns the GraphVertexData associated to this NavGraphVertex. More...
 
const NavTag & GetNavTag () const
 Returns the NavTag associated to this NavGraphVertex. More...
 
const NavGraphVertex & GetNavGraphVertex () const
 Retrieves the NavGraph vertex at the start of the specified NavGraph edge. More...
 
const Vec3fGetGraphVertexPosition () const
 Retrieves the position of the NavGraph vertex . More...
 
NavGraphVertexRawPtr GetRawPtr () const
 Constructs and returns a NavGraphVertexRawPtr that refers to the same NavGraphVertex. More...
 

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 nullptr.

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

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

Precondition
This object must be valid. Its validity is not checked. Returns a pointer to the NavGraph that handles the graph identified by this object.
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 nullptr.

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: