Recast Navigation
Navigation-mesh Toolset for Games
Sample_TempObstacles Class Reference

#include <Sample_TempObstacles.h>

Inheritance diagram for Sample_TempObstacles:
Sample

Public Member Functions

 Sample_TempObstacles ()
 
virtual ~Sample_TempObstacles ()
 
virtual void handleSettings ()
 
virtual void handleTools ()
 
virtual void handleDebugMode ()
 
virtual void handleRender ()
 
virtual void handleRenderOverlay (double *proj, double *model, int *view)
 
virtual void handleMeshChanged (class InputGeom *geom)
 
virtual bool handleBuild ()
 
virtual void handleUpdate (const float dt)
 
void getTilePos (const float *pos, int &tx, int &ty)
 
void renderCachedTile (const int tx, const int ty, const int type)
 
void renderCachedTileOverlay (const int tx, const int ty, double *proj, double *model, int *view)
 
void addTempObstacle (const float *pos)
 
void removeTempObstacle (const float *sp, const float *sq)
 
void clearAllTempObstacles ()
 
void saveAll (const char *path)
 
void loadAll (const char *path)
 
- Public Member Functions inherited from Sample
 Sample ()
 
virtual ~Sample ()
 
void setContext (BuildContext *ctx)
 
void setTool (SampleTool *tool)
 
SampleToolStategetToolState (int type)
 
void setToolState (int type, SampleToolState *s)
 
SampleDebugDrawgetDebugDraw ()
 
virtual void handleClick (const float *s, const float *p, bool shift)
 
virtual void handleToggle ()
 
virtual void handleStep ()
 
virtual void collectSettings (struct BuildSettings &settings)
 
virtual class InputGeomgetInputGeom ()
 
virtual class dtNavMeshgetNavMesh ()
 
virtual class dtNavMeshQuerygetNavMeshQuery ()
 
virtual class dtCrowdgetCrowd ()
 
virtual float getAgentRadius ()
 
virtual float getAgentHeight ()
 
virtual float getAgentClimb ()
 
unsigned char getNavMeshDrawFlags () const
 
void setNavMeshDrawFlags (unsigned char flags)
 
void updateToolStates (const float dt)
 
void initToolStates (Sample *sample)
 
void resetToolStates ()
 
void renderToolStates ()
 
void renderOverlayToolStates (double *proj, double *model, int *view)
 
void resetCommonSettings ()
 
void handleCommonSettings ()
 

Protected Types

enum  DrawMode {
  DRAWMODE_NAVMESH , DRAWMODE_NAVMESH_TRANS , DRAWMODE_NAVMESH_BVTREE , DRAWMODE_NAVMESH_NODES ,
  DRAWMODE_NAVMESH_PORTALS , DRAWMODE_NAVMESH_INVIS , DRAWMODE_MESH , DRAWMODE_CACHE_BOUNDS ,
  MAX_DRAWMODE
}
 

Protected Attributes

bool m_keepInterResults
 
struct LinearAllocatorm_talloc
 
struct FastLZCompressorm_tcomp
 
struct MeshProcessm_tmproc
 
class dtTileCachem_tileCache
 
float m_cacheBuildTimeMs
 
int m_cacheCompressedSize
 
int m_cacheRawSize
 
int m_cacheLayerCount
 
unsigned int m_cacheBuildMemUsage
 
DrawMode m_drawMode
 
int m_maxTiles
 
int m_maxPolysPerTile
 
float m_tileSize
 
- Protected Attributes inherited from Sample
class InputGeomm_geom
 
class dtNavMeshm_navMesh
 
class dtNavMeshQuerym_navQuery
 
class dtCrowdm_crowd
 
unsigned char m_navMeshDrawFlags
 
float m_cellSize
 
float m_cellHeight
 
float m_agentHeight
 
float m_agentRadius
 
float m_agentMaxClimb
 
float m_agentMaxSlope
 
float m_regionMinSize
 
float m_regionMergeSize
 
float m_edgeMaxLen
 
float m_edgeMaxError
 
float m_vertsPerPoly
 
float m_detailSampleDist
 
float m_detailSampleMaxError
 
int m_partitionType
 
bool m_filterLowHangingObstacles
 
bool m_filterLedgeSpans
 
bool m_filterWalkableLowHeightSpans
 
SampleToolm_tool
 
SampleToolStatem_toolStates [MAX_TOOLS]
 
BuildContextm_ctx
 
SampleDebugDraw m_dd
 

Additional Inherited Members

- Protected Member Functions inherited from Sample
dtNavMeshloadAll (const char *path)
 
void saveAll (const char *path, const dtNavMesh *mesh)
 

Member Enumeration Documentation

◆ DrawMode

Enumerator
DRAWMODE_NAVMESH 
DRAWMODE_NAVMESH_TRANS 
DRAWMODE_NAVMESH_BVTREE 
DRAWMODE_NAVMESH_NODES 
DRAWMODE_NAVMESH_PORTALS 
DRAWMODE_NAVMESH_INVIS 
DRAWMODE_MESH 
DRAWMODE_CACHE_BOUNDS 
MAX_DRAWMODE 

Constructor & Destructor Documentation

◆ Sample_TempObstacles()

Sample_TempObstacles::Sample_TempObstacles ( )

◆ ~Sample_TempObstacles()

Sample_TempObstacles::~Sample_TempObstacles ( )
virtual

Member Function Documentation

◆ addTempObstacle()

void Sample_TempObstacles::addTempObstacle ( const float *  pos)

◆ clearAllTempObstacles()

void Sample_TempObstacles::clearAllTempObstacles ( )

◆ getTilePos()

void Sample_TempObstacles::getTilePos ( const float *  pos,
int &  tx,
int &  ty 
)

◆ handleBuild()

bool Sample_TempObstacles::handleBuild ( )
virtual

Reimplemented from Sample.

◆ handleDebugMode()

void Sample_TempObstacles::handleDebugMode ( )
virtual

Reimplemented from Sample.

◆ handleMeshChanged()

void Sample_TempObstacles::handleMeshChanged ( class InputGeom geom)
virtual

Reimplemented from Sample.

◆ handleRender()

void Sample_TempObstacles::handleRender ( )
virtual

Reimplemented from Sample.

◆ handleRenderOverlay()

void Sample_TempObstacles::handleRenderOverlay ( double *  proj,
double *  model,
int *  view 
)
virtual

Reimplemented from Sample.

◆ handleSettings()

void Sample_TempObstacles::handleSettings ( )
virtual

Reimplemented from Sample.

◆ handleTools()

void Sample_TempObstacles::handleTools ( )
virtual

Reimplemented from Sample.

◆ handleUpdate()

void Sample_TempObstacles::handleUpdate ( const float  dt)
virtual

Reimplemented from Sample.

◆ loadAll()

void Sample_TempObstacles::loadAll ( const char *  path)

◆ removeTempObstacle()

void Sample_TempObstacles::removeTempObstacle ( const float *  sp,
const float *  sq 
)

◆ renderCachedTile()

void Sample_TempObstacles::renderCachedTile ( const int  tx,
const int  ty,
const int  type 
)

◆ renderCachedTileOverlay()

void Sample_TempObstacles::renderCachedTileOverlay ( const int  tx,
const int  ty,
double *  proj,
double *  model,
int *  view 
)

◆ saveAll()

void Sample_TempObstacles::saveAll ( const char *  path)

Member Data Documentation

◆ m_cacheBuildMemUsage

unsigned int Sample_TempObstacles::m_cacheBuildMemUsage
protected

◆ m_cacheBuildTimeMs

float Sample_TempObstacles::m_cacheBuildTimeMs
protected

◆ m_cacheCompressedSize

int Sample_TempObstacles::m_cacheCompressedSize
protected

◆ m_cacheLayerCount

int Sample_TempObstacles::m_cacheLayerCount
protected

◆ m_cacheRawSize

int Sample_TempObstacles::m_cacheRawSize
protected

◆ m_drawMode

DrawMode Sample_TempObstacles::m_drawMode
protected

◆ m_keepInterResults

bool Sample_TempObstacles::m_keepInterResults
protected

◆ m_maxPolysPerTile

int Sample_TempObstacles::m_maxPolysPerTile
protected

◆ m_maxTiles

int Sample_TempObstacles::m_maxTiles
protected

◆ m_talloc

struct LinearAllocator* Sample_TempObstacles::m_talloc
protected

◆ m_tcomp

struct FastLZCompressor* Sample_TempObstacles::m_tcomp
protected

◆ m_tileCache

class dtTileCache* Sample_TempObstacles::m_tileCache
protected

◆ m_tileSize

float Sample_TempObstacles::m_tileSize
protected

◆ m_tmproc

struct MeshProcess* Sample_TempObstacles::m_tmproc
protected

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