Debian Codegraph @

RecastDemo/Include/Sample_SoloMesh.h

raw symbols SCIP
1 //
2 // Copyright (c) 2009-2010 Mikko Mononen [email protected]
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:
29 bool m_keepInterResults;
30 float m_totalBuildTimeMs;
31
32 unsigned char* m_triareas;
33 rcHeightfield* m_solid;
34 rcCompactHeightfield* m_chf;
35 rcContourSet* m_cset;
36 rcPolyMesh* m_pmesh;
37 rcConfig m_cfg;
38 rcPolyMeshDetail* m_dmesh;
39
40 enum DrawMode
41 {
42 DRAWMODE_NAVMESH,
43 DRAWMODE_NAVMESH_TRANS,
44 DRAWMODE_NAVMESH_BVTREE,
45 DRAWMODE_NAVMESH_NODES,
46 DRAWMODE_NAVMESH_INVIS,
47 DRAWMODE_MESH,
48 DRAWMODE_VOXELS,
49 DRAWMODE_VOXELS_WALKABLE,
50 DRAWMODE_COMPACT,
51 DRAWMODE_COMPACT_DISTANCE,
52 DRAWMODE_COMPACT_REGIONS,
53 DRAWMODE_REGION_CONNECTIONS,
54 DRAWMODE_RAW_CONTOURS,
55 DRAWMODE_BOTH_CONTOURS,
56 DRAWMODE_CONTOURS,
57 DRAWMODE_POLYMESH,
58 DRAWMODE_POLYMESH_DETAIL,
59 MAX_DRAWMODE
60 };
61
62 DrawMode m_drawMode;
63
64 void cleanup();
65
66 public:
67 Sample_SoloMesh();
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.
81 Sample_SoloMesh(const Sample_SoloMesh&);
82 Sample_SoloMesh& operator=(const Sample_SoloMesh&);
83 };
84
85
86 #endif // RECASTSAMPLESOLOMESHSIMPLE_H