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 ()
 Constructs a new instance of this class. Creates an invalid NavGraphEdgePtr. More...
 
bool IsValid () const
 Returns true if this object refers to a valid NavGraphEdge: i.e. a NavGraphEdge in a valid NavGraph. see NavGraph::IsValid(). More...
 
void Invalidate ()
 Invalidates this object. More...
 
bool operator== (const NavGraphEdgePtr &rhs) const
 Returns true if this object identifies the same edge as rhs, or if both are invalid. More...
 
bool operator!= (const NavGraphEdgePtr &rhs) const
 Returns true if this object identifies an edge different from the one identified by rhs, or if only one of them is invalid. 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...
 
KyUInt32 GetEdgeNumberAroundStartVertex () const
 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. More...
 
NavGraphVertexIdx GetStartVertexIdx () const
 Returns the index of the starting NavGraphVertex of current instance within its NavGraph. 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...
 
NavGraphVertexIdx GetEndNavGraphVertexIdx () const
 Returns the index of the ending NavGraphVertex of current instance within its NavGraph. More...
 
NavGraphVertexPtr GetStartNavGraphVertexPtr () const
 Returns a NavGraphVertexPtr that identifies the starting NavGraphVertex of current instance. More...
 
NavGraphVertexPtr GetEndNavGraphVertexPtr () const
 Returns a NavGraphVertexPtr that identifies the ending NavGraphVertex of current instance. More...
 
const NavGraphVertex & GetStartNavGraphVertex () const
 Returns the starting NavGraphVertex of current instance. More...
 
const NavGraphVertex & GetEndNavGraphVertex () const
 Returns the ending NavGraphVertex of current instance. More...
 
const Vec3fGetStartNavGraphVertexPosition () const
 Returns the position of the starting NavGraphVertex of current instance. More...
 
const Vec3fGetEndNavGraphVertexPosition () const
 Returns the position of the ending NavGraphVertex of current instance. More...
 
const NavTag & GetNavTag () const
 Returns the NavTag associated to this NavGraphEdge. More...
 
NavGraphEdgeRawPtr GetRawPtr () const
 Constructs and returns a NavGraphEdgeRawPtr that refers to the same NavGraphVertex. More...
 
NavGraphEdgePtr GetOppositeNavGraphEdgePtr () const
 Return the opposite NavGraphEdgePtr, if any exists. More...
 

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

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

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

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

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 files:
  • gwnavruntime/navgraph/identifiers/navgraphedgeptr.h
  • gwnavruntime/navgraph/identifiers/navgraphedgeptr.cpp