Recast Navigation
Navigation-mesh Toolset for Games
Sample_SoloMesh.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
3 //
4 // This software is provided 'as-is', without any express or implied
5 // warranty. In no event will the authors be held liable for any damages
6 // arising from the use of this software.
7 // Permission is granted to anyone to use this software for any purpose,
8 // including commercial applications, and to alter it and redistribute it
9 // freely, subject to the following restrictions:
10 // 1. The origin of this software must not be misrepresented; you must not
11 // claim that you wrote the original software. If you use this software
12 // in a product, an acknowledgment in the product documentation would be
13 // appreciated but is not required.
14 // 2. Altered source versions must be plainly marked as such, and must not be
15 // misrepresented as being the original software.
16 // 3. This notice may not be removed or altered from any source distribution.
17 //
18 
19 #ifndef RECASTSAMPLESOLOMESH_H
20 #define RECASTSAMPLESOLOMESH_H
21 
22 #include "Sample.h"
23 #include "DetourNavMesh.h"
24 #include "Recast.h"
25 
26 class Sample_SoloMesh : public Sample
27 {
28 protected:
31 
32  unsigned char* m_triareas;
39 
40  enum DrawMode
41  {
60  };
61 
63 
64  void cleanup();
65 
66 public:
68  virtual ~Sample_SoloMesh();
69 
70  virtual void handleSettings();
71  virtual void handleTools();
72  virtual void handleDebugMode();
73 
74  virtual void handleRender();
75  virtual void handleRenderOverlay(double* proj, double* model, int* view);
76  virtual void handleMeshChanged(class InputGeom* geom);
77  virtual bool handleBuild();
78 
79 private:
80  // Explicitly disabled copy constructor and copy assignment operator.
82  Sample_SoloMesh& operator=(const Sample_SoloMesh&);
83 };
84 
85 
86 #endif // RECASTSAMPLESOLOMESHSIMPLE_H
Definition: InputGeom.h:73
Definition: Sample_SoloMesh.h:27
virtual void handleRender()
Definition: Sample_SoloMesh.cpp:230
DrawMode
Definition: Sample_SoloMesh.h:41
@ DRAWMODE_VOXELS_WALKABLE
Definition: Sample_SoloMesh.h:49
@ DRAWMODE_REGION_CONNECTIONS
Definition: Sample_SoloMesh.h:53
@ DRAWMODE_POLYMESH_DETAIL
Definition: Sample_SoloMesh.h:58
@ DRAWMODE_COMPACT_REGIONS
Definition: Sample_SoloMesh.h:52
@ DRAWMODE_VOXELS
Definition: Sample_SoloMesh.h:48
@ DRAWMODE_MESH
Definition: Sample_SoloMesh.h:47
@ DRAWMODE_COMPACT
Definition: Sample_SoloMesh.h:50
@ DRAWMODE_BOTH_CONTOURS
Definition: Sample_SoloMesh.h:55
@ DRAWMODE_NAVMESH_INVIS
Definition: Sample_SoloMesh.h:46
@ DRAWMODE_NAVMESH_TRANS
Definition: Sample_SoloMesh.h:43
@ DRAWMODE_COMPACT_DISTANCE
Definition: Sample_SoloMesh.h:51
@ DRAWMODE_POLYMESH
Definition: Sample_SoloMesh.h:57
@ DRAWMODE_RAW_CONTOURS
Definition: Sample_SoloMesh.h:54
@ MAX_DRAWMODE
Definition: Sample_SoloMesh.h:59
@ DRAWMODE_NAVMESH_BVTREE
Definition: Sample_SoloMesh.h:44
@ DRAWMODE_NAVMESH
Definition: Sample_SoloMesh.h:42
@ DRAWMODE_NAVMESH_NODES
Definition: Sample_SoloMesh.h:45
@ DRAWMODE_CONTOURS
Definition: Sample_SoloMesh.h:56
rcPolyMesh * m_pmesh
Definition: Sample_SoloMesh.h:36
virtual void handleDebugMode()
Definition: Sample_SoloMesh.cpp:152
DrawMode m_drawMode
Definition: Sample_SoloMesh.h:62
rcConfig m_cfg
Definition: Sample_SoloMesh.h:37
unsigned char * m_triareas
Definition: Sample_SoloMesh.h:32
rcPolyMeshDetail * m_dmesh
Definition: Sample_SoloMesh.h:38
bool m_keepInterResults
Definition: Sample_SoloMesh.h:29
virtual void handleSettings()
Definition: Sample_SoloMesh.cpp:82
Sample_SoloMesh()
Definition: Sample_SoloMesh.cpp:45
virtual ~Sample_SoloMesh()
Definition: Sample_SoloMesh.cpp:59
rcCompactHeightfield * m_chf
Definition: Sample_SoloMesh.h:34
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition: Sample_SoloMesh.cpp:346
virtual bool handleBuild()
Definition: Sample_SoloMesh.cpp:370
rcContourSet * m_cset
Definition: Sample_SoloMesh.h:35
float m_totalBuildTimeMs
Definition: Sample_SoloMesh.h:30
virtual void handleTools()
Definition: Sample_SoloMesh.cpp:116
rcHeightfield * m_solid
Definition: Sample_SoloMesh.h:33
virtual void handleMeshChanged(class InputGeom *geom)
Definition: Sample_SoloMesh.cpp:353
void cleanup()
Definition: Sample_SoloMesh.cpp:64
Definition: Sample.h:100
A compact, static heightfield representing unobstructed space.
Definition: Recast.h:354
Specifies a configuration to use when performing Recast builds.
Definition: Recast.h:217
Represents a group of related contours.
Definition: Recast.h:433
A dynamic heightfield representing obstructed space.
Definition: Recast.h:313
Contains triangle meshes that represent detailed height data associated with the polygons in its asso...
Definition: Recast.h:487
Represents a polygon mesh suitable for use in building a navigation mesh.
Definition: Recast.h:457