DebugRenderer.pkg 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. $#include "Graphics/DebugRenderer.h"
  2. class DebugRenderer : public Component
  3. {
  4. void SetLineAntiAlias(bool enable);
  5. void SetView(Camera* camera);
  6. void AddLine(const Vector3& start, const Vector3& end, const Color& color, bool depthTest = true);
  7. void AddLine(const Vector3& start, const Vector3& end, unsigned color, bool depthTest = true);
  8. void AddTriangle(const Vector3& v1, const Vector3& v2, const Vector3& v3, const Color& color, bool depthTest = true);
  9. void AddTriangle(const Vector3& v1, const Vector3& v2, const Vector3& v3, unsigned color, bool depthTest = true);
  10. void AddPolygon(const Vector3& v1, const Vector3& v2, const Vector3& v3, const Vector3& v4, const Color& color, bool depthTest = true);
  11. void AddPolygon(const Vector3& v1, const Vector3& v2, const Vector3& v3, const Vector3& v4, unsigned color, bool depthTest = true);
  12. void AddNode(Node* node, float scale = 1.0f, bool depthTest = true);
  13. void AddBoundingBox(const BoundingBox& box, const Color& color, bool depthTest = true, bool solid = false);
  14. void AddBoundingBox(const BoundingBox& box, const Matrix3x4& transform, const Color& color, bool depthTest = true, bool solid = false);
  15. void AddFrustum(const Frustum& frustum, const Color& color, bool depthTest = true);
  16. void AddPolyhedron(const Polyhedron& poly, const Color& color, bool depthTest = true);
  17. void AddSphere(const Sphere& sphere, const Color& color, bool depthTest = true);
  18. void AddSphereSector(const Sphere& sphere, const Quaternion& rotation, float angle, bool drawLines, const Color& color, bool depthTest = true);
  19. void AddSkeleton(const Skeleton& skeleton, const Color& color, bool depthTest = true);
  20. 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);
  21. void AddTriangleMesh(const void* vertexData, unsigned vertexSize, unsigned vertexStart, const void* indexData, unsigned indexSize, unsigned indexStart, unsigned indexCount, const Matrix3x4& transform, const Color& color, bool depthTest = true);
  22. void AddCircle(const Vector3& center, const Vector3& normal, float radius, const Color& color, int steps = 64, bool depthTest = true);
  23. void AddCross(const Vector3& center, float size, const Color& color, bool depthTest = true);
  24. void AddQuad(const Vector3& center, float width, float height, const Color& color, bool depthTest = true);
  25. void Render();
  26. bool GetLineAntiAlias() const;
  27. const Matrix3x4& GetView() const;
  28. const Matrix4& GetProjection() const;
  29. const Frustum& GetFrustum() const;
  30. bool IsInside(const BoundingBox& box) const;
  31. tolua_property__get_set bool lineAntiAlias;
  32. tolua_readonly tolua_property__get_set Matrix3x4& view;
  33. tolua_readonly tolua_property__get_set Matrix4& projection;
  34. tolua_readonly tolua_property__get_set Frustum& frustum;
  35. };