DebugRenderer.pkg 1.5 KB

1234567891011121314151617181920212223242526
  1. $#include "DebugRenderer.h"
  2. class DebugRenderer : public Component
  3. {
  4. void SetView(Camera* camera);
  5. void AddLine(const Vector3& start, const Vector3& end, const Color& color, bool depthTest = true);
  6. void AddLine(const Vector3& start, const Vector3& end, unsigned color, bool depthTest = true);
  7. void AddNode(Node* node, float scale = 1.0f, bool depthTest = true);
  8. void AddBoundingBox(const BoundingBox& box, const Color& color, bool depthTest = true);
  9. void AddBoundingBox(const BoundingBox& box, const Matrix3x4& transform, const Color& color, bool depthTest = true);
  10. void AddFrustum(const Frustum& frustum, const Color& color, bool depthTest = true);
  11. void AddPolyhedron(const Polyhedron& poly, const Color& color, bool depthTest = true);
  12. void AddSphere(const Sphere& sphere, const Color& color, bool depthTest = true);
  13. void AddSkeleton(const Skeleton& skeleton, const Color& color, bool depthTest = true);
  14. void AddTriangleMesh(const void* vertexData, unsigned vertexSize, const void* indexData, unsigned indexSize, unsigned indexStart, unsigned indexCount, const Matrix3x4& transform, const Color& color, bool depthTest = true);
  15. void Render();
  16. const Matrix3x4& GetView() const;
  17. const Matrix4& GetProjection() const;
  18. const Frustum& GetFrustum() const;
  19. bool IsInside(const BoundingBox& box) const;
  20. tolua_readonly tolua_property__get_set Matrix3x4& view;
  21. tolua_readonly tolua_property__get_set Matrix4& projection;
  22. tolua_readonly tolua_property__get_set Frustum& frustum;
  23. };