Debian Codegraph @

RecastDemo/Include/Sample_Debug.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 RECASTSAMPLEDEBUG_H
20 #define RECASTSAMPLEDEBUG_H
21
22 #include "Sample.h"
23 #include "DetourNavMesh.h"
24 #include "Recast.h"
25
26 /// Sample used for random debugging.
27 class Sample_Debug : public Sample
28 {
29 protected:
30 rcCompactHeightfield* m_chf;
31 rcContourSet* m_cset;
32 rcPolyMesh* m_pmesh;
33
34 float m_halfExtents[3];
35 float m_center[3];
36 float m_bmin[3], m_bmax[3];
37 dtPolyRef m_ref;
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