NavPath

Engine/source/navigation/navPath.h

More...

NavPath

Functions for planning and accessing the path.

bool
plan()

Plan the path.

bool

Updated a sliced plan.

bool

Finalise a sliced plan.

bool

Did the path plan successfully?

Path interface

These functions are provided to make NavPath behave similarly to the existing Path class, despite NavPath not being a SimSet.

Return the length of this path.

size()

Get the number of nodes in a path.

getNode(S32 idx)

Return world-space position of a path node.

Get the flags for a given path node.

SceneObject

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

Called when the editor is activated.

Called when the editor is deactivated.

Called after any property of the object is changed in the world editor.

Called when a SimObject is deleted.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Instructs this object to read state data previously packed with packUpdate.

Called when the SceneManager is ready for the registration of render instances.

ProcessObject

Processes a move event and updates object state once every 32 milliseconds.

Protected from and to vectors

bool
setProtectedFrom(void * obj, const char * index, const char * data)
bool
setProtectedTo(void * obj, const char * index, const char * data)
const char *
getProtectedFrom(void * obj, const char * data)
const char *
getProtectedTo(void * obj, const char * data)

Protected Types

enum
masks {
  PathMask = Parent::NextFreeMask << 0
  NextFreeMask = Parent::NextFreeMask << 1
}

Private Types

Parent 

Private Static Attributes

Private Attributes

Public Functions

Private Functions

bool
init()

Create appropriate data structures and stuff.

bool

Plan the path.

bool

Start a sliced plan.

Resets our world transform and bounds to fit our point list.

bool

Add points of the path between the two specified points.

Private Static Functions

bool
setProtectedAutoUpdate(void * obj, const char * index, const char * data)

Function used to protect auto-update flag.

bool
setProtectedMesh(void * obj, const char * index, const char * data)

Function used to set mMesh object from console.

bool
setProtectedWaypoints(void * obj, const char * index, const char * data)

Function used to set mWaypoints from console.

Detailed Description

NavPath

Functions for planning and accessing the path.

plan()

Plan the path.

update()

Updated a sliced plan.

return:

True if we need to keep updating, false if we can stop.

finalise()

Finalise a sliced plan.

return:

True if the plan was successful overall.

success()

Did the path plan successfully?

String mMeshName 
NavMesh * mMesh 
SimPath::Path * mWaypoints 
Point3F mFrom 
bool mFromSet 
Point3F mTo 
bool mToSet 
bool mIsLooping 
bool mAutoUpdate 
bool mIsSliced 
S32 mMaxIterations 
bool mAlwaysRender 
bool mXray 
bool mRenderSearch 
LinkData mLinkTypes 

What sort of link types are we allowed to move on?

Path interface

These functions are provided to make NavPath behave similarly to the existing Path class, despite NavPath not being a SimSet.

getLength()

Return the length of this path.

size()

Get the number of nodes in a path.

getNode(S32 idx)

Return world-space position of a path node.

getFlags(S32 idx)

Get the flags for a given path node.

SceneObject

onAdd()

Reimplemented from: SceneObject

onRemove()

Reimplemented from: SceneObject

onEditorEnable()

Reimplemented from: SimObject

onEditorDisable()

Reimplemented from: SimObject

inspectPostApply()

Reimplemented from: SceneObject

onDeleteNotify(SimObject * object)

Reimplemented from: SceneObject

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: SceneObject

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: SceneObject

prepRenderImage(SceneRenderState * state)

Reimplemented from: SceneObject

renderSimple(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)

DECLARE_CONOBJECT(NavPath )

initPersistFields()

ProcessObject

processTick(const Move * move)

Reimplemented from: ProcessObject

Protected from and to vectors

setProtectedFrom(void * obj, const char * index, const char * data)

setProtectedTo(void * obj, const char * index, const char * data)

getProtectedFrom(void * obj, const char * data)

getProtectedTo(void * obj, const char * data)

Protected Types

masks

Enumerator

PathMask = Parent::NextFreeMask << 0
NextFreeMask = Parent::NextFreeMask << 1

Private Types

typedef SceneObject Parent 

Private Static Attributes

const U32 MaxPathLen 

Private Attributes

S32 mCurIndex 
dtQueryFilter mFilter 
Vector< U16 > mFlags 
F32 mLength 
Vector< Point3F > mPoints 
dtNavMeshQuery * mQuery 
dtStatus mStatus 
Vector< Point3F > mVisitPoints 

Public Functions

NavPath()

~NavPath()

Private Functions

checkAutoUpdate()

init()

Create appropriate data structures and stuff.

planInstant()

Plan the path.

planSliced()

Start a sliced plan.

return:

True if the plan initialised successfully.

resize()

Resets our world transform and bounds to fit our point list.

visitNext()

Add points of the path between the two specified points.

'Visit' the last two points on our visit list.

Private Static Functions

setProtectedAutoUpdate(void * obj, const char * index, const char * data)

Function used to protect auto-update flag.

setProtectedMesh(void * obj, const char * index, const char * data)

Function used to set mMesh object from console.

setProtectedWaypoints(void * obj, const char * index, const char * data)

Function used to set mWaypoints from console.