Kaim::NavGraphEdgeRawPtr Class Reference

Kaim::NavGraphEdgeRawPtr Class Reference

#include <navgraphedgerawptr.h>

Class Description

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

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

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

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

 NavGraphEdgeRawPtr ()
 
void Invalidate ()
 
bool IsValid () const
 
bool operator!= (const NavGraphEdgeRawPtr &rhs) const
 
bool operator== (const NavGraphEdgeRawPtr &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.
KyUInt32 GetEdgeNumberAroundStartVertex () const
 
NavGraphEdgeRawPtr GetOppositeNavGraphEdgeRawPtr () const
 
NavGraphGetNavGraph () const
 
const NavGraphBlobGetNavGraphBlob () const
 
NavGraphVertexIdx GetStartVertexIdx () const
 
NavGraphVertexIdx GetEndNavGraphVertexIdx () const
 
NavGraphVertexRawPtr GetStartNavGraphVertexRawPtr () const
 
NavGraphVertexRawPtr GetEndNavGraphVertexRawPtr () const
 
const NavGraphVertex & GetStartNavGraphVertex () const
 
const NavGraphVertex & GetEndNavGraphVertex () const
 
const Vec3fGetStartNavGraphVertexPosition () const
 
const Vec3fGetEndNavGraphVertexPosition () const
 
const NavTag & GetNavTag () const
 
template<class TraverseLogic >
bool CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier=0) const
 

For internal use only

template<class TraverseLogic >
bool CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithoutCostMultipler &) const
 
template<class TraverseLogic >
bool CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerNavTag &) const
 
template<class TraverseLogic >
bool CanBeTraversed (void *traverseLogicUserData, KyFloat32 *costMultiplier, const LogicWithCostMultiplerPerTriangle &) const
 

Constructor & Destructor Documentation

Kaim::NavGraphEdgeRawPtr::NavGraphEdgeRawPtr ( )
inline

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

Member Function Documentation

KyUInt32 Kaim::NavGraphEdgeRawPtr::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.

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

Returns the ending NavGraphVertex of current instance.

Precondition
This object must be valid. Its validity is not checked.
NavGraphVertexIdx Kaim::NavGraphEdgeRawPtr::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::NavGraphEdgeRawPtr::GetEndNavGraphVertexPosition ( ) const
inline

Returns the position of the ending NavGraphVertex of current instance.

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

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

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

Returns a reference to the NavGraph that contains this NavGraphEdge.

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

Returns a reference to the NavGraphBlob that contains this NavGraphEdge.

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

Returns the NavTag associated to this NavGraphEdge.

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

Return the opposite NavGraphEdgeRawPtr, if any exists.

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

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

Returns the starting NavGraphVertex of current instance.

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

Returns the position of the starting NavGraphVertex of current instance.

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

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

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

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

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

Invalidates this object.

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