Recast Navigation
Navigation-mesh Toolset for Games
Sample_TileMesh Class Reference

#include <Sample_TileMesh.h>

Inheritance diagram for Sample_TileMesh:
Sample

Public Member Functions

 Sample_TileMesh ()
 
virtual ~Sample_TileMesh ()
 
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 collectSettings (struct BuildSettings &settings)
 
void getTilePos (const float *pos, int &tx, int &ty)
 
void buildTile (const float *pos)
 
void removeTile (const float *pos)
 
void buildAllTiles ()
 
void removeAllTiles ()
 
- 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 handleUpdate (const float dt)
 
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_VOXELS ,
  DRAWMODE_VOXELS_WALKABLE , DRAWMODE_COMPACT , DRAWMODE_COMPACT_DISTANCE , DRAWMODE_COMPACT_REGIONS ,
  DRAWMODE_REGION_CONNECTIONS , DRAWMODE_RAW_CONTOURS , DRAWMODE_BOTH_CONTOURS , DRAWMODE_CONTOURS ,
  DRAWMODE_POLYMESH , DRAWMODE_POLYMESH_DETAIL , MAX_DRAWMODE
}
 

Protected Member Functions

unsigned char * buildTileMesh (const int tx, const int ty, const float *bmin, const float *bmax, int &dataSize)
 
void cleanup ()
 
void saveAll (const char *path, const dtNavMesh *mesh)
 
dtNavMeshloadAll (const char *path)
 
- Protected Member Functions inherited from Sample
dtNavMeshloadAll (const char *path)
 
void saveAll (const char *path, const dtNavMesh *mesh)
 

Protected Attributes

bool m_keepInterResults
 
bool m_buildAll
 
float m_totalBuildTimeMs
 
unsigned char * m_triareas
 
rcHeightfieldm_solid
 
rcCompactHeightfieldm_chf
 
rcContourSetm_cset
 
rcPolyMeshm_pmesh
 
rcPolyMeshDetailm_dmesh
 
rcConfig m_cfg
 
DrawMode m_drawMode
 
int m_maxTiles
 
int m_maxPolysPerTile
 
float m_tileSize
 
unsigned int m_tileCol
 
float m_lastBuiltTileBmin [3]
 
float m_lastBuiltTileBmax [3]
 
float m_tileBuildTime
 
float m_tileMemUsage
 
int m_tileTriCount
 
- 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
 

Member Enumeration Documentation

◆ DrawMode

enum Sample_TileMesh::DrawMode
protected
Enumerator
DRAWMODE_NAVMESH 
DRAWMODE_NAVMESH_TRANS 
DRAWMODE_NAVMESH_BVTREE 
DRAWMODE_NAVMESH_NODES 
DRAWMODE_NAVMESH_PORTALS 
DRAWMODE_NAVMESH_INVIS 
DRAWMODE_MESH 
DRAWMODE_VOXELS 
DRAWMODE_VOXELS_WALKABLE 
DRAWMODE_COMPACT 
DRAWMODE_COMPACT_DISTANCE 
DRAWMODE_COMPACT_REGIONS 
DRAWMODE_REGION_CONNECTIONS 
DRAWMODE_RAW_CONTOURS 
DRAWMODE_BOTH_CONTOURS 
DRAWMODE_CONTOURS 
DRAWMODE_POLYMESH 
DRAWMODE_POLYMESH_DETAIL 
MAX_DRAWMODE 

Constructor & Destructor Documentation

◆ Sample_TileMesh()

Sample_TileMesh::Sample_TileMesh ( )

◆ ~Sample_TileMesh()

Sample_TileMesh::~Sample_TileMesh ( )
virtual

Member Function Documentation

◆ buildAllTiles()

void Sample_TileMesh::buildAllTiles ( )

◆ buildTile()

void Sample_TileMesh::buildTile ( const float *  pos)

◆ buildTileMesh()

unsigned char * Sample_TileMesh::buildTileMesh ( const int  tx,
const int  ty,
const float *  bmin,
const float *  bmax,
int &  dataSize 
)
protected

◆ cleanup()

void Sample_TileMesh::cleanup ( )
protected

◆ collectSettings()

void Sample_TileMesh::collectSettings ( struct BuildSettings settings)
virtual

Reimplemented from Sample.

◆ getTilePos()

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

◆ handleBuild()

bool Sample_TileMesh::handleBuild ( )
virtual

Reimplemented from Sample.

◆ handleDebugMode()

void Sample_TileMesh::handleDebugMode ( )
virtual

Reimplemented from Sample.

◆ handleMeshChanged()

void Sample_TileMesh::handleMeshChanged ( class InputGeom geom)
virtual

Reimplemented from Sample.

◆ handleRender()

void Sample_TileMesh::handleRender ( )
virtual

Reimplemented from Sample.

◆ handleRenderOverlay()

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

Reimplemented from Sample.

◆ handleSettings()

void Sample_TileMesh::handleSettings ( )
virtual

Reimplemented from Sample.

◆ handleTools()

void Sample_TileMesh::handleTools ( )
virtual

Reimplemented from Sample.

◆ loadAll()

dtNavMesh* Sample_TileMesh::loadAll ( const char *  path)
protected

◆ removeAllTiles()

void Sample_TileMesh::removeAllTiles ( )

◆ removeTile()

void Sample_TileMesh::removeTile ( const float *  pos)

◆ saveAll()

void Sample_TileMesh::saveAll ( const char *  path,
const dtNavMesh mesh 
)
protected

Member Data Documentation

◆ m_buildAll

bool Sample_TileMesh::m_buildAll
protected

◆ m_cfg

rcConfig Sample_TileMesh::m_cfg
protected

◆ m_chf

rcCompactHeightfield* Sample_TileMesh::m_chf
protected

◆ m_cset

rcContourSet* Sample_TileMesh::m_cset
protected

◆ m_dmesh

rcPolyMeshDetail* Sample_TileMesh::m_dmesh
protected

◆ m_drawMode

DrawMode Sample_TileMesh::m_drawMode
protected

◆ m_keepInterResults

bool Sample_TileMesh::m_keepInterResults
protected

◆ m_lastBuiltTileBmax

float Sample_TileMesh::m_lastBuiltTileBmax[3]
protected

◆ m_lastBuiltTileBmin

float Sample_TileMesh::m_lastBuiltTileBmin[3]
protected

◆ m_maxPolysPerTile

int Sample_TileMesh::m_maxPolysPerTile
protected

◆ m_maxTiles

int Sample_TileMesh::m_maxTiles
protected

◆ m_pmesh

rcPolyMesh* Sample_TileMesh::m_pmesh
protected

◆ m_solid

rcHeightfield* Sample_TileMesh::m_solid
protected

◆ m_tileBuildTime

float Sample_TileMesh::m_tileBuildTime
protected

◆ m_tileCol

unsigned int Sample_TileMesh::m_tileCol
protected

◆ m_tileMemUsage

float Sample_TileMesh::m_tileMemUsage
protected

◆ m_tileSize

float Sample_TileMesh::m_tileSize
protected

◆ m_tileTriCount

int Sample_TileMesh::m_tileTriCount
protected

◆ m_totalBuildTimeMs

float Sample_TileMesh::m_totalBuildTimeMs
protected

◆ m_triareas

unsigned char* Sample_TileMesh::m_triareas
protected

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