#include <navgraphedgerawptr.h>
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.
| |
KyUInt32 | GetEdgeNumberAroundStartVertex () const |
NavGraphEdgeRawPtr | GetOppositeNavGraphEdgeRawPtr () const |
NavGraph * | GetNavGraph () const |
const NavGraphBlob * | GetNavGraphBlob () const |
NavGraphVertexIdx | GetStartVertexIdx () const |
NavGraphVertexIdx | GetEndNavGraphVertexIdx () const |
NavGraphVertexRawPtr | GetStartNavGraphVertexRawPtr () const |
NavGraphVertexRawPtr | GetEndNavGraphVertexRawPtr () const |
const NavGraphVertex & | GetStartNavGraphVertex () const |
const NavGraphVertex & | GetEndNavGraphVertex () const |
const Vec3f & | GetStartNavGraphVertexPosition () const |
const Vec3f & | GetEndNavGraphVertexPosition () 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 |
|
inline |
Constructs a new instance of this class. Creates an invalid NavGraphEdgeRawPtr.
|
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.
|
inline |
Returns the ending NavGraphVertex of current instance.
|
inline |
Returns the index of the ending NavGraphVertex of current instance within its NavGraph.
|
inline |
Returns the position of the ending NavGraphVertex of current instance.
|
inline |
Returns a NavGraphVertexRawPtr that identifies the ending NavGraphVertex of current instance.
|
inline |
Returns a reference to the NavGraph that contains this NavGraphEdge.
|
inline |
Returns a reference to the NavGraphBlob that contains this NavGraphEdge.
|
inline |
Returns the NavTag associated to this NavGraphEdge.
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
|
inline |
Returns the starting NavGraphVertex of current instance.
|
inline |
Returns the position of the starting NavGraphVertex of current instance.
|
inline |
Returns a NavGraphVertexRawPtr that identifies the starting NavGraphVertex of current instance.
|
inline |
Returns the index of the starting NavGraphVertex of current instance within its NavGraph.
|
inline |
Invalidates this object.
|
inline |
Returns true if this object refers to a valid NavGraphEdge: i.e. a NavGraphEdge in a valid NavGraph. see NavGraph::IsValid().
|
inline |
Returns true if this object identifies an edge different from the one identified by rhs, or if only one of them is invalid.
|
inline |
Returns true if this object identifies the same edge as rhs, or if both are invalid.