Recast Navigation
Navigation-mesh Toolset for Games
Sample_Debug.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 RECASTSAMPLEDEBUG_H
20 #define RECASTSAMPLEDEBUG_H
21 
22 #include "Sample.h"
23 #include "DetourNavMesh.h"
24 #include "Recast.h"
25 
27 class Sample_Debug : public Sample
28 {
29 protected:
33 
34  float m_halfExtents[3];
35  float m_center[3];
36  float m_bmin[3], m_bmax[3];
38 
39 public:
40  Sample_Debug();
41  virtual ~Sample_Debug();
42 
43  virtual void handleSettings();
44  virtual void handleTools();
45  virtual void handleDebugMode();
46  virtual void handleClick(const float* s, const float* p, bool shift);
47  virtual void handleToggle();
48  virtual void handleRender();
49  virtual void handleRenderOverlay(double* proj, double* model, int* view);
50  virtual void handleMeshChanged(class InputGeom* geom);
51  virtual bool handleBuild();
52 
53  virtual const float* getBoundsMin();
54  virtual const float* getBoundsMax();
55 
56 private:
57  // Explicitly disabled copy constructor and copy assignment operator.
58  Sample_Debug(const Sample_Debug&);
59  Sample_Debug& operator=(const Sample_Debug&);
60 };
61 
62 
63 #endif // RECASTSAMPLE_H
Definition: InputGeom.h:73
Sample used for random debugging.
Definition: Sample_Debug.h:28
float m_halfExtents[3]
Definition: Sample_Debug.h:34
virtual void handleClick(const float *s, const float *p, bool shift)
Definition: Sample_Debug.cpp:351
virtual ~Sample_Debug()
Definition: Sample_Debug.cpp:172
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition: Sample_Debug.cpp:320
virtual void handleDebugMode()
Definition: Sample_Debug.cpp:187
virtual void handleRender()
Definition: Sample_Debug.cpp:191
dtPolyRef m_ref
Definition: Sample_Debug.h:37
virtual bool handleBuild()
Definition: Sample_Debug.cpp:363
rcCompactHeightfield * m_chf
Definition: Sample_Debug.h:30
float m_bmin[3]
Definition: Sample_Debug.h:36
virtual const float * getBoundsMin()
Definition: Sample_Debug.cpp:329
rcContourSet * m_cset
Definition: Sample_Debug.h:31
virtual const float * getBoundsMax()
Definition: Sample_Debug.cpp:340
float m_center[3]
Definition: Sample_Debug.h:35
virtual void handleTools()
Definition: Sample_Debug.cpp:183
virtual void handleMeshChanged(class InputGeom *geom)
Definition: Sample_Debug.cpp:324
float m_bmax[3]
Definition: Sample_Debug.h:36
rcPolyMesh * m_pmesh
Definition: Sample_Debug.h:32
virtual void handleToggle()
Definition: Sample_Debug.cpp:357
virtual void handleSettings()
Definition: Sample_Debug.cpp:179
Sample_Debug()
Definition: Sample_Debug.cpp:51
Definition: Sample.h:100
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition: DetourNavMesh.h:48
A compact, static heightfield representing unobstructed space.
Definition: Recast.h:354
Represents a group of related contours.
Definition: Recast.h:433
Represents a polygon mesh suitable for use in building a navigation mesh.
Definition: Recast.h:457