Recast Navigation
Navigation-mesh Toolset for Games
Loading...
Searching...
No Matches
Sample_SoloMesh Class Reference

#include <Sample_SoloMesh.h>

Inheritance diagram for Sample_SoloMesh:
Sample

Public Member Functions

 Sample_SoloMesh ()
 
 ~Sample_SoloMesh () override
 
 Sample_SoloMesh (const Sample_SoloMesh &)=delete
 
Sample_SoloMesh & operator= (const Sample_SoloMesh &)=delete
 
 Sample_SoloMesh (const Sample_SoloMesh &&)=delete
 
Sample_SoloMesh & operator= (const Sample_SoloMesh &&)=delete
 
void drawSettingsUI () override
 
void drawToolsUI () override
 
void drawDebugUI () override
 
void render () override
 
void renderOverlay () override
 
void onMeshChanged (InputGeom *geom) override
 
bool build () override
 
- Public Member Functions inherited from Sample
dtNavMesh * loadAll (const char *path)
 
void saveAll (const char *path, const dtNavMesh *mesh)
 
 Sample ()
 
virtual ~Sample ()
 
 Sample (const Sample &)=delete
 
 Sample (const Sample &&)=delete
 
Sample & operator= (const Sample &)=delete
 
Sample & operator= (const Sample &&)=delete
 
void setTool (SampleTool *tool)
 
virtual void onClick (const float *rayStartPos, const float *rayHitPos, bool shift)
 
virtual void onToggle ()
 
virtual void singleStep ()
 
virtual void update (float dt)
 
virtual void collectSettings (struct BuildSettings &settings)
 
void updateToolStates (float dt) const
 
void initToolStates (Sample *sample) const
 
void resetToolStates () const
 
void renderToolStates () const
 
void renderOverlayToolStates () const
 
void resetCommonSettings ()
 
void drawCommonSettingsUI ()
 

Protected Types

enum class  DrawMode : uint8_t {
  MESH , NAVMESH , NAVMESH_INVIS , NAVMESH_TRANS ,
  NAVMESH_BVTREE , NAVMESH_NODES , VOXELS , VOXELS_WALKABLE ,
  COMPACT , COMPACT_DISTANCE , COMPACT_REGIONS , REGION_CONNECTIONS ,
  RAW_CONTOURS , BOTH_CONTOURS , CONTOURS , POLYMESH ,
  POLYMESH_DETAIL
}
 

Protected Member Functions

void cleanup ()
 

Protected Attributes

float totalBuildTimeMs = 0
 
rcConfig config {}
 
unsigned char * triAreas = nullptr
 
rcHeightfield * heightfield = nullptr
 
rcCompactHeightfield * compactHeightfield = nullptr
 
rcContourSet * contourSet = nullptr
 
rcPolyMesh * polyMesh = nullptr
 
rcPolyMeshDetail * detailMesh = nullptr
 
DrawMode currentDrawMode = DrawMode::NAVMESH
 

Static Protected Attributes

static const char * drawModeNames []
 

Additional Inherited Members

- Public Attributes inherited from Sample
InputGeom * inputGeometry = nullptr
 
dtNavMesh * navMesh = nullptr
 
dtNavMeshQuery * navQuery = nullptr
 
dtCrowd * crowd = nullptr
 
SampleDebugDraw debugDraw
 
unsigned char navMeshDrawFlags
 
float cellSize
 
float cellHeight
 
float agentHeight
 
float agentRadius
 
float agentMaxClimb
 
float agentMaxSlope
 
float regionMinSize
 
float regionMergeSize
 
float edgeMaxLen
 
float edgeMaxError
 
int vertsPerPoly
 
float detailSampleDist
 
float detailSampleMaxError
 
SamplePartitionType partitionType = SamplePartitionType::WATERSHED
 
bool filterLowHangingObstacles = true
 
bool filterLedgeSpans = true
 
bool filterWalkableLowHeightSpans = true
 
SampleTool * tool = nullptr
 
SampleToolState * toolStates [static_cast< size_t >(SampleToolType::MAX_TOOLS)] = {}
 
BuildContext * buildContext = nullptr
 

Member Enumeration Documentation

◆ DrawMode

enum class Sample_SoloMesh::DrawMode : uint8_t
strongprotected
Enumerator
MESH 
NAVMESH 
NAVMESH_INVIS 
NAVMESH_TRANS 
NAVMESH_BVTREE 
NAVMESH_NODES 
VOXELS 
VOXELS_WALKABLE 
COMPACT 
COMPACT_DISTANCE 
COMPACT_REGIONS 
REGION_CONNECTIONS 
RAW_CONTOURS 
BOTH_CONTOURS 
CONTOURS 
POLYMESH 
POLYMESH_DETAIL 

Constructor & Destructor Documentation

◆ Sample_SoloMesh() [1/3]

Sample_SoloMesh::Sample_SoloMesh ( )

◆ ~Sample_SoloMesh()

Sample_SoloMesh::~Sample_SoloMesh ( )
override

◆ Sample_SoloMesh() [2/3]

Sample_SoloMesh::Sample_SoloMesh ( const Sample_SoloMesh &  )
delete

◆ Sample_SoloMesh() [3/3]

Sample_SoloMesh::Sample_SoloMesh ( const Sample_SoloMesh &&  )
delete

Member Function Documentation

◆ build()

bool Sample_SoloMesh::build ( )
overridevirtual

Reimplemented from Sample.

◆ cleanup()

void Sample_SoloMesh::cleanup ( )
protected

◆ drawDebugUI()

void Sample_SoloMesh::drawDebugUI ( )
overridevirtual

Reimplemented from Sample.

◆ drawSettingsUI()

void Sample_SoloMesh::drawSettingsUI ( )
overridevirtual

Reimplemented from Sample.

◆ drawToolsUI()

void Sample_SoloMesh::drawToolsUI ( )
overridevirtual

Reimplemented from Sample.

◆ onMeshChanged()

void Sample_SoloMesh::onMeshChanged ( InputGeom *  geom)
overridevirtual

Reimplemented from Sample.

◆ operator=() [1/2]

Sample_SoloMesh & Sample_SoloMesh::operator= ( const Sample_SoloMesh &&  )
delete

◆ operator=() [2/2]

Sample_SoloMesh & Sample_SoloMesh::operator= ( const Sample_SoloMesh &  )
delete

◆ render()

void Sample_SoloMesh::render ( )
overridevirtual

Reimplemented from Sample.

◆ renderOverlay()

void Sample_SoloMesh::renderOverlay ( )
overridevirtual

Reimplemented from Sample.

Member Data Documentation

◆ compactHeightfield

rcCompactHeightfield* Sample_SoloMesh::compactHeightfield = nullptr
protected

◆ config

rcConfig Sample_SoloMesh::config {}
protected

◆ contourSet

rcContourSet* Sample_SoloMesh::contourSet = nullptr
protected

◆ currentDrawMode

DrawMode Sample_SoloMesh::currentDrawMode = DrawMode::NAVMESH
protected

◆ detailMesh

rcPolyMeshDetail* Sample_SoloMesh::detailMesh = nullptr
protected

◆ drawModeNames

const char * Sample_SoloMesh::drawModeNames
staticprotected
Initial value:
{
"Input Mesh",
"Navmesh",
"Navmesh Invis",
"Navmesh Trans",
"Navmesh BVTree",
"Navmesh Nodes",
"Voxels",
"Walkable Voxels",
"Compact",
"Compact Distance",
"Compact Regions",
"Region Connections",
"Raw Contours",
"Both Contours",
"Contours",
"Poly Mesh",
"Poly Mesh Detail"}

◆ heightfield

rcHeightfield* Sample_SoloMesh::heightfield = nullptr
protected

◆ polyMesh

rcPolyMesh* Sample_SoloMesh::polyMesh = nullptr
protected

◆ totalBuildTimeMs

float Sample_SoloMesh::totalBuildTimeMs = 0
protected

◆ triAreas

unsigned char* Sample_SoloMesh::triAreas = nullptr
protected

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