Blender V2.61 - r43446
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

KX_NavMeshObject Class Reference

#include <KX_NavMeshObject.h>

Inheritance diagram for KX_NavMeshObject:
Inheritance graph
[legend]

List of all members.

Public Types

enum  NavMeshRenderMode { RM_WALLS, RM_POLYS, RM_TRIS, RM_MAX }

Public Member Functions

 KX_NavMeshObject (void *sgReplicationInfo, SG_Callbacks callbacks)
 ~KX_NavMeshObject ()
virtual CValueGetReplica ()
virtual void ProcessReplica ()
bool BuildNavMesh ()
dtStatNavMesh * GetNavMesh ()
int FindPath (const MT_Point3 &from, const MT_Point3 &to, float *path, int maxPathLen)
float Raycast (const MT_Point3 &from, const MT_Point3 &to)
void DrawNavMesh (NavMeshRenderMode mode)
void DrawPath (const float *path, int pathLen, const MT_Vector3 &color)
MT_Point3 TransformToLocalCoords (const MT_Point3 &wpos)
MT_Point3 TransformToWorldCoords (const MT_Point3 &lpos)
 KX_PYMETHOD_DOC (KX_NavMeshObject, findPath)
 KX_PYMETHOD_DOC (KX_NavMeshObject, raycast)
 KX_PYMETHOD_DOC (KX_NavMeshObject, draw)
 KX_PYMETHOD_DOC_NOARGS (KX_NavMeshObject, rebuild)

Protected Member Functions

bool BuildVertIndArrays (float *&vertices, int &nverts, unsigned short *&polys, int &npolys, unsigned short *&dmeshes, float *&dvertices, int &ndvertsuniq, unsigned short *&dtris, int &ndtris, int &vertsPerPoly)

Protected Attributes

dtStatNavMesh * m_navMesh

Detailed Description

Definition at line 37 of file KX_NavMeshObject.h.


Member Enumeration Documentation

Enumerator:
RM_WALLS 
RM_POLYS 
RM_TRIS 
RM_MAX 

Definition at line 62 of file KX_NavMeshObject.h.


Constructor & Destructor Documentation

KX_NavMeshObject::KX_NavMeshObject ( void *  sgReplicationInfo,
SG_Callbacks  callbacks 
)

Definition at line 76 of file KX_NavMeshObject.cpp.

Referenced by GetReplica().

KX_NavMeshObject::~KX_NavMeshObject ( )

Definition at line 83 of file KX_NavMeshObject.cpp.

References m_navMesh.


Member Function Documentation

bool KX_NavMeshObject::BuildNavMesh ( )
bool KX_NavMeshObject::BuildVertIndArrays ( float *&  vertices,
int &  nverts,
unsigned short *&  polys,
int &  npolys,
unsigned short *&  dmeshes,
float *&  dvertices,
int &  ndvertsuniq,
unsigned short *&  dtris,
int &  ndtris,
int &  vertsPerPoly 
) [protected]
void KX_NavMeshObject::DrawNavMesh ( NavMeshRenderMode  mode)
void KX_NavMeshObject::DrawPath ( const float *  path,
int  pathLen,
const MT_Vector3 color 
)

Definition at line 611 of file KX_NavMeshObject.cpp.

References i, KX_RasterizerDrawDebugLine(), and MT_Tuple3::setValue().

Referenced by KX_SteeringActuator::Update().

int KX_NavMeshObject::FindPath ( const MT_Point3 from,
const MT_Point3 to,
float *  path,
int  maxPathLen 
)
dtStatNavMesh * KX_NavMeshObject::GetNavMesh ( )

Definition at line 469 of file KX_NavMeshObject.cpp.

References m_navMesh.

Referenced by KX_ObstacleSimulation::AddObstaclesForNavMesh().

CValue * KX_NavMeshObject::GetReplica ( void  ) [virtual]

Inherited from CValue -- return a new copy of this instance allocated on the heap. Ownership of the new object belongs with the caller.

Reimplemented from KX_GameObject.

Definition at line 89 of file KX_NavMeshObject.cpp.

References KX_NavMeshObject(), and ProcessReplica().

KX_NavMeshObject::KX_PYMETHOD_DOC ( KX_NavMeshObject  ,
raycast   
)
KX_NavMeshObject::KX_PYMETHOD_DOC ( KX_NavMeshObject  ,
findPath   
)
KX_NavMeshObject::KX_PYMETHOD_DOC ( KX_NavMeshObject  ,
draw   
)
KX_NavMeshObject::KX_PYMETHOD_DOC_NOARGS ( KX_NavMeshObject  ,
rebuild   
)
void KX_NavMeshObject::ProcessReplica ( ) [virtual]

Inherited from CValue -- Makes sure any internal data owned by this class is deep copied. Called internally

Reimplemented from KX_GameObject.

Definition at line 96 of file KX_NavMeshObject.cpp.

References KX_ObstacleSimulation::AddObstaclesForNavMesh(), BuildNavMesh(), KX_Scene::GetObstacleSimulation(), and KX_GetActiveScene().

Referenced by GetReplica().

float KX_NavMeshObject::Raycast ( const MT_Point3 from,
const MT_Point3 to 
)
MT_Point3 KX_NavMeshObject::TransformToLocalCoords ( const MT_Point3 wpos)
MT_Point3 KX_NavMeshObject::TransformToWorldCoords ( const MT_Point3 lpos)

Member Data Documentation

dtStatNavMesh* KX_NavMeshObject::m_navMesh [protected]

The documentation for this class was generated from the following files: