Sample_Debug.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #ifndef RECASTSAMPLEDEBUG_H
  19. #define RECASTSAMPLEDEBUG_H
  20. #include "Sample.h"
  21. #include "DetourNavMesh.h"
  22. #include "Recast.h"
  23. /// Sample used for random debugging.
  24. class Sample_Debug : public Sample
  25. {
  26. protected:
  27. rcCompactHeightfield* m_chf;
  28. rcContourSet* m_cset;
  29. rcPolyMesh* m_pmesh;
  30. float m_halfExtents[3];
  31. float m_center[3];
  32. float m_bmin[3], m_bmax[3];
  33. dtPolyRef m_ref;
  34. public:
  35. Sample_Debug();
  36. virtual ~Sample_Debug();
  37. virtual void handleSettings();
  38. virtual void handleTools();
  39. virtual void handleDebugMode();
  40. virtual void handleClick(const float* s, const float* p, bool shift);
  41. virtual void handleToggle();
  42. virtual void handleRender();
  43. virtual void handleRenderOverlay(double* proj, double* model, int* view);
  44. virtual void handleMeshChanged(class InputGeom* geom);
  45. virtual bool handleBuild();
  46. virtual const float* getBoundsMin();
  47. virtual const float* getBoundsMax();
  48. private:
  49. // Explicitly disabled copy constructor and copy assignment operator.
  50. Sample_Debug(const Sample_Debug&);
  51. Sample_Debug& operator=(const Sample_Debug&);
  52. };
  53. #endif // RECASTSAMPLE_H