Recast Navigation
Navigation-mesh Toolset for Games
Sample Class Reference

#include <Sample.h>

Inheritance diagram for Sample:
Sample_Debug Sample_SoloMesh Sample_TempObstacles Sample_TileMesh

Public Member Functions

 Sample ()
 
virtual ~Sample ()
 
void setContext (BuildContext *ctx)
 
void setTool (SampleTool *tool)
 
SampleToolStategetToolState (int type)
 
void setToolState (int type, SampleToolState *s)
 
SampleDebugDrawgetDebugDraw ()
 
virtual void handleSettings ()
 
virtual void handleTools ()
 
virtual void handleDebugMode ()
 
virtual void handleClick (const float *s, const float *p, bool shift)
 
virtual void handleToggle ()
 
virtual void handleStep ()
 
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)
 
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 Member Functions

dtNavMeshloadAll (const char *path)
 
void saveAll (const char *path, const dtNavMesh *mesh)
 

Protected Attributes

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
 

Constructor & Destructor Documentation

◆ Sample()

Sample::Sample ( )

◆ ~Sample()

Sample::~Sample ( )
virtual

Member Function Documentation

◆ collectSettings()

void Sample::collectSettings ( struct BuildSettings settings)
virtual

Reimplemented in Sample_TileMesh.

◆ getAgentClimb()

virtual float Sample::getAgentClimb ( )
inlinevirtual

◆ getAgentHeight()

virtual float Sample::getAgentHeight ( )
inlinevirtual

◆ getAgentRadius()

virtual float Sample::getAgentRadius ( )
inlinevirtual

◆ getCrowd()

virtual class dtCrowd* Sample::getCrowd ( )
inlinevirtual

◆ getDebugDraw()

SampleDebugDraw& Sample::getDebugDraw ( )
inline

◆ getInputGeom()

virtual class InputGeom* Sample::getInputGeom ( )
inlinevirtual

◆ getNavMesh()

virtual class dtNavMesh* Sample::getNavMesh ( )
inlinevirtual

◆ getNavMeshDrawFlags()

unsigned char Sample::getNavMeshDrawFlags ( ) const
inline

◆ getNavMeshQuery()

virtual class dtNavMeshQuery* Sample::getNavMeshQuery ( )
inlinevirtual

◆ getToolState()

SampleToolState* Sample::getToolState ( int  type)
inline

◆ handleBuild()

bool Sample::handleBuild ( )
virtual

◆ handleClick()

void Sample::handleClick ( const float *  s,
const float *  p,
bool  shift 
)
virtual

Reimplemented in Sample_Debug.

◆ handleCommonSettings()

void Sample::handleCommonSettings ( )

◆ handleDebugMode()

void Sample::handleDebugMode ( )
virtual

◆ handleMeshChanged()

void Sample::handleMeshChanged ( class InputGeom geom)
virtual

◆ handleRender()

void Sample::handleRender ( )
virtual

◆ handleRenderOverlay()

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

◆ handleSettings()

void Sample::handleSettings ( )
virtual

◆ handleStep()

void Sample::handleStep ( )
virtual

◆ handleToggle()

void Sample::handleToggle ( )
virtual

Reimplemented in Sample_Debug.

◆ handleTools()

void Sample::handleTools ( )
virtual

◆ handleUpdate()

void Sample::handleUpdate ( const float  dt)
virtual

Reimplemented in Sample_TempObstacles.

◆ initToolStates()

void Sample::initToolStates ( Sample sample)

◆ loadAll()

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

◆ renderOverlayToolStates()

void Sample::renderOverlayToolStates ( double *  proj,
double *  model,
int *  view 
)

◆ renderToolStates()

void Sample::renderToolStates ( )

◆ resetCommonSettings()

void Sample::resetCommonSettings ( )

◆ resetToolStates()

void Sample::resetToolStates ( )

◆ saveAll()

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

◆ setContext()

void Sample::setContext ( BuildContext ctx)
inline

◆ setNavMeshDrawFlags()

void Sample::setNavMeshDrawFlags ( unsigned char  flags)
inline

◆ setTool()

void Sample::setTool ( SampleTool tool)

◆ setToolState()

void Sample::setToolState ( int  type,
SampleToolState s 
)
inline

◆ updateToolStates()

void Sample::updateToolStates ( const float  dt)

Member Data Documentation

◆ m_agentHeight

float Sample::m_agentHeight
protected

◆ m_agentMaxClimb

float Sample::m_agentMaxClimb
protected

◆ m_agentMaxSlope

float Sample::m_agentMaxSlope
protected

◆ m_agentRadius

float Sample::m_agentRadius
protected

◆ m_cellHeight

float Sample::m_cellHeight
protected

◆ m_cellSize

float Sample::m_cellSize
protected

◆ m_crowd

class dtCrowd* Sample::m_crowd
protected

◆ m_ctx

BuildContext* Sample::m_ctx
protected

◆ m_dd

SampleDebugDraw Sample::m_dd
protected

◆ m_detailSampleDist

float Sample::m_detailSampleDist
protected

◆ m_detailSampleMaxError

float Sample::m_detailSampleMaxError
protected

◆ m_edgeMaxError

float Sample::m_edgeMaxError
protected

◆ m_edgeMaxLen

float Sample::m_edgeMaxLen
protected

◆ m_filterLedgeSpans

bool Sample::m_filterLedgeSpans
protected

◆ m_filterLowHangingObstacles

bool Sample::m_filterLowHangingObstacles
protected

◆ m_filterWalkableLowHeightSpans

bool Sample::m_filterWalkableLowHeightSpans
protected

◆ m_geom

class InputGeom* Sample::m_geom
protected

◆ m_navMesh

class dtNavMesh* Sample::m_navMesh
protected

◆ m_navMeshDrawFlags

unsigned char Sample::m_navMeshDrawFlags
protected

◆ m_navQuery

class dtNavMeshQuery* Sample::m_navQuery
protected

◆ m_partitionType

int Sample::m_partitionType
protected

◆ m_regionMergeSize

float Sample::m_regionMergeSize
protected

◆ m_regionMinSize

float Sample::m_regionMinSize
protected

◆ m_tool

SampleTool* Sample::m_tool
protected

◆ m_toolStates

SampleToolState* Sample::m_toolStates[MAX_TOOLS]
protected

◆ m_vertsPerPoly

float Sample::m_vertsPerPoly
protected

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