|
Hymn to Beauty
C++ 3D Engine
|
Debug drawing facilities. More...
#include <DebugDrawingManager.hpp>
Public Member Functions | |
| void | AddPoint (const glm::vec3 &position, const glm::vec3 &color, float size, float duration=0.f, bool depthTesting=true) |
| Add a point to the world. More... | |
| const std::vector< Video::DebugDrawing::Point > & | GetPoints () const |
| Get all debug points. More... | |
| void | AddLine (const glm::vec3 &startPosition, const glm::vec3 &endPosition, const glm::vec3 &color, float width=1.f, float duration=0.f, bool depthTesting=true) |
| Add a line to the world. More... | |
| const std::vector< Video::DebugDrawing::Line > & | GetLines () const |
| Get all debug lines. More... | |
| void | AddCuboid (const glm::vec3 &dimensions, const glm::mat4 &matrix, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a cuboid to the world. More... | |
| const std::vector< Video::DebugDrawing::Cuboid > & | GetCuboids () const |
| Get all debug cuboids. More... | |
| void | AddPlane (const glm::vec3 &position, const glm::vec3 &normal, const glm::vec2 &size, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a plane to the world. More... | |
| const std::vector< Video::DebugDrawing::Plane > & | GetPlanes () const |
| Get all debug planes. More... | |
| void | AddCircle (const glm::vec3 &position, const glm::vec3 &normal, float radius, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a circle to the world. More... | |
| const std::vector< Video::DebugDrawing::Circle > & | GetCircles () const |
| Get all debug circles. More... | |
| void | AddSphere (const glm::vec3 &position, float radius, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a sphere to the world. More... | |
| const std::vector< Video::DebugDrawing::Sphere > & | GetSpheres () const |
| Get all debug spheres. More... | |
| void | AddCylinder (float radius, float length, const glm::mat4 &matrix, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a cylinder to the world. More... | |
| const std::vector< Video::DebugDrawing::Cylinder > & | GetCylinders () const |
| Get all debug cylinders. More... | |
| void | AddCone (float radius, float height, const glm::mat4 &matrix, const glm::vec3 &color, float lineWidth=1.f, float duration=0.f, bool depthTesting=true) |
| Add a cone to the world. More... | |
| const std::vector< Video::DebugDrawing::Cone > & | GetCones () const |
| Get all debug cones. More... | |
| void | AddMesh (Component::Mesh *meshComponent, const glm::mat4 &matrix, const glm::vec3 &color, bool wireFrame=true, float duration=0.f, bool depthTesting=true) |
| Add a mesh to the world. More... | |
| std::vector< Video::DebugDrawing::Mesh > | GetMeshes () const |
| Get all debug meshes. More... | |
| void | Update (float deltaTime) |
| Update the debug geometry. More... | |
Friends | |
| class | Hub |
Debug drawing facilities.
| void DebugDrawingManager::AddCircle | ( | const glm::vec3 & | position, |
| const glm::vec3 & | normal, | ||
| float | radius, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a circle to the world.
| position | Center position of the circle. |
| normal | Circle normal. |
| radius | Radius. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the circle. |
| duration | How long the circle should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddCone | ( | float | radius, |
| float | height, | ||
| const glm::mat4 & | matrix, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a cone to the world.
| radius | The radius of the cone. |
| height | The height of the cone. |
| matrix | Matrix to transform the cone with. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the cone. |
| duration | How long the cone should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddCuboid | ( | const glm::vec3 & | dimensions, |
| const glm::mat4 & | matrix, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a cuboid to the world.
| dimensions | The dimensions of the cuboid. |
| matrix | Matrix used to transform the cuboid. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the box. |
| duration | How long the box should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddCylinder | ( | float | radius, |
| float | length, | ||
| const glm::mat4 & | matrix, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a cylinder to the world.
| radius | The radius of the cylinder. |
| length | The length of the cylinder. |
| matrix | Matrix used to transform the cylinder. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the cylinder. |
| duration | How long the cylinder should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddLine | ( | const glm::vec3 & | startPosition, |
| const glm::vec3 & | endPosition, | ||
| const glm::vec3 & | color, | ||
| float | width = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a line to the world.
| startPosition | Position of the start point of the line. |
| endPosition | Position of the end point of the line. |
| color | Color of the line. |
| width | The width of the line. |
| duration | How long the line should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddMesh | ( | Component::Mesh * | meshComponent, |
| const glm::mat4 & | matrix, | ||
| const glm::vec3 & | color, | ||
| bool | wireFrame = true, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a mesh to the world.
| meshComponent | The mesh component. |
| matrix | Matrix to transform the mesh with. |
| color | Color of the lines. |
| wireFrame | Whether to wireframe the mesh. |
| duration | How long the mesh should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddPlane | ( | const glm::vec3 & | position, |
| const glm::vec3 & | normal, | ||
| const glm::vec2 & | size, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a plane to the world.
| position | Center position of the plane. |
| normal | Plane normal. |
| size | Size. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the plane. |
| duration | How long the plane should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddPoint | ( | const glm::vec3 & | position, |
| const glm::vec3 & | color, | ||
| float | size, | ||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a point to the world.
| position | World position of the point. |
| color | Color of the point. |
| size | Size of the point. |
| duration | How long the point should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| void DebugDrawingManager::AddSphere | ( | const glm::vec3 & | position, |
| float | radius, | ||
| const glm::vec3 & | color, | ||
| float | lineWidth = 1.f, |
||
| float | duration = 0.f, |
||
| bool | depthTesting = true |
||
| ) |
Add a sphere to the world.
| position | The position of the sphere. |
| radius | The radius of the sphere. |
| color | Color of the lines. |
| lineWidth | The width of the lines used to draw the sphere. |
| duration | How long the sphere should stay in the world (in seconds). |
| depthTesting | Whether to enable depth testing. |
| const std::vector< Video::DebugDrawing::Circle > & DebugDrawingManager::GetCircles | ( | ) | const |
Get all debug circles.
| const std::vector< Video::DebugDrawing::Cone > & DebugDrawingManager::GetCones | ( | ) | const |
Get all debug cones.
| const std::vector< Video::DebugDrawing::Cuboid > & DebugDrawingManager::GetCuboids | ( | ) | const |
Get all debug cuboids.
| const std::vector< Video::DebugDrawing::Cylinder > & DebugDrawingManager::GetCylinders | ( | ) | const |
Get all debug cylinders.
| const std::vector< Video::DebugDrawing::Line > & DebugDrawingManager::GetLines | ( | ) | const |
Get all debug lines.
| std::vector< Video::DebugDrawing::Mesh > DebugDrawingManager::GetMeshes | ( | ) | const |
Get all debug meshes.
| const std::vector< Video::DebugDrawing::Plane > & DebugDrawingManager::GetPlanes | ( | ) | const |
Get all debug planes.
| const std::vector< Video::DebugDrawing::Point > & DebugDrawingManager::GetPoints | ( | ) | const |
Get all debug points.
| const std::vector< Video::DebugDrawing::Sphere > & DebugDrawingManager::GetSpheres | ( | ) | const |
Get all debug spheres.
| void DebugDrawingManager::Update | ( | float | deltaTime | ) |
Update the debug geometry.
| deltaTime | Time since last frame (in seconds). |
|
friend |