Radium Engine  1.5.20
Loading...
Searching...
No Matches
SystemDisplay.hpp File Reference
#include <Engine/RaEngine.hpp>
#include <Core/Utils/Color.hpp>
#include <Core/Utils/Singleton.hpp>
#include <Engine/Scene/Component.hpp>
#include <Engine/Scene/Entity.hpp>
#include <Engine/Data/DrawPrimitives.hpp>
+ Include dependency graph for SystemDisplay.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ra::Engine::Scene::DebugComponent
 Component for debug drawing. More...
 
class  Ra::Engine::Scene::UiComponent
 Component for UI drawing. More...
 
class  Ra::Engine::Scene::SystemEntity
 

Namespaces

namespace  Ra
 hepler function to manage enum as underlying types in VariableSet
 
namespace  Ra::Engine
 This namespace contains engine and ECS related stuff.
 
namespace  Ra::Engine::Scene
 Scene and how to communicate.
 

Macros

#define RA_DISPLAY_POINT(p, color, scale)
 Macros for debug drawing. All coordinates are in world space.
 
#define RA_DISPLAY_VECTOR(p, v, color)
 
#define RA_DISPLAY_RAY(r, color)
 
#define RA_DISPLAY_CIRCLE(c, n, r, color)
 
#define RA_DISPLAY_TRIANGLE(a, b, c, color)
 
#define RA_DISPLAY_NORMAL(p, n, color, scale)
 
#define RA_DISPLAY_FRAME(t, scale)
 
#define RA_DISPLAY_AABB(a, color)
 
#define RA_DISPLAY_OBB(a, color)
 
#define RA_DISPLAY_SPHERE(c, r, color)
 
#define RA_DISPLAY_CAPSULE(p1, p2, r, color)
 
#define RA_DISPLAY_LINE(a, b, color)
 
#define RA_CLEAR_DEBUG_DISPLAY()
 

Detailed Description

This file's main purpose is to declare a set of macros to allow drawing primitives from everywhere in the code, for debug purposes. These macros can be completely disabled by #defining the following constant :

Definition in file SystemDisplay.hpp.

Macro Definition Documentation

◆ RA_CLEAR_DEBUG_DISPLAY

#define RA_CLEAR_DEBUG_DISPLAY ( )
Value:
{ \
while ( cmp->m_renderObjects.size() ) { \
cmp->removeRenderObject( cmp->m_renderObjects[0] ); \
} \
}
static DebugComponent * dbgCmp()
Access the debug component.

Definition at line 149 of file SystemDisplay.hpp.

◆ RA_DISPLAY_AABB

#define RA_DISPLAY_AABB ( a,
color )
Value:
Core::Utils::Index addRenderObject(Rendering::RenderObject *renderObject)
Add a new render object to the component. This adds the RO to the manager for drawing.
Definition Component.cpp:41
MeshPtr AABB(const Core::Aabb &aabb, const Core::Utils::Color &color)
Display a wireframe AABB.
Rendering::RenderObject * Primitive(Scene::Component *component, const MeshPtr &mesh)

Definition at line 119 of file SystemDisplay.hpp.

◆ RA_DISPLAY_CAPSULE

#define RA_DISPLAY_CAPSULE ( p1,
p2,
r,
color )
Value:
MeshPtr Capsule(const Core::Vector3 &p1, const Core::Vector3 &p2, Scalar radius, const Core::Utils::Color &color)
Displays a capsule computed with given endpoints and radius.

Definition at line 137 of file SystemDisplay.hpp.

◆ RA_DISPLAY_CIRCLE

#define RA_DISPLAY_CIRCLE ( c,
n,
r,
color )
Value:
Ra::Engine::Data::DrawPrimitives::Circle( c, n, r, 20, color ) ) )
LineMeshPtr Circle(const Core::Vector3 &center, const Core::Vector3 &normal, Scalar radius, uint segments, const Core::Utils::Color &color)

Definition at line 95 of file SystemDisplay.hpp.

◆ RA_DISPLAY_FRAME

#define RA_DISPLAY_FRAME ( t,
scale )

◆ RA_DISPLAY_LINE

#define RA_DISPLAY_LINE ( a,
b,
color )
Value:
LineMeshPtr Line(const Core::Vector3 &a, const Core::Vector3 &b, const Core::Utils::Color &color)
Displays given line.

Definition at line 143 of file SystemDisplay.hpp.

◆ RA_DISPLAY_NORMAL

#define RA_DISPLAY_NORMAL ( p,
n,
color,
scale )
Value:
Ra::Engine::Scene::DrawPrimitives::Primitive( \
Ra::Engine::Scene::DrawPrimitives::Normal( p, n, color, scale ) ) )

Definition at line 107 of file SystemDisplay.hpp.

◆ RA_DISPLAY_OBB

#define RA_DISPLAY_OBB ( a,
color )
Value:

Definition at line 125 of file SystemDisplay.hpp.

◆ RA_DISPLAY_POINT

#define RA_DISPLAY_POINT ( p,
color,
scale )
Value:
LineMeshPtr Point(const Core::Vector3 &point, const Core::Utils::Color &color, Scalar scale)
Displays given point shown as the crossing of 3 lines of length 'scale'.

Macros for debug drawing. All coordinates are in world space.

Definition at line 77 of file SystemDisplay.hpp.

◆ RA_DISPLAY_RAY

#define RA_DISPLAY_RAY ( r,
color )
Value:
LineMeshPtr Ray(const Core::Ray &ray, const Core::Utils::Color &color, Scalar len)
Displays given ray as a straight line.

Definition at line 89 of file SystemDisplay.hpp.

◆ RA_DISPLAY_SPHERE

#define RA_DISPLAY_SPHERE ( c,
r,
color )
Value:
MeshPtr Sphere(const Core::Vector3 &center, Scalar radius, const Core::Utils::Color &color)
Displays geodesic sphere computed with given center and radius.

Definition at line 131 of file SystemDisplay.hpp.

◆ RA_DISPLAY_TRIANGLE

#define RA_DISPLAY_TRIANGLE ( a,
b,
c,
color )
Value:
Ra::Engine::SystemEntity::dbgCmp(), \
AttribArrayDisplayablePtr Triangle(const Core::Vector3 &a, const Core::Vector3 &b, const Core::Vector3 &c, const Core::Utils::Color &color, bool fill)

Definition at line 101 of file SystemDisplay.hpp.

◆ RA_DISPLAY_VECTOR

#define RA_DISPLAY_VECTOR ( p,
v,
color )
Value:
LineMeshPtr Vector(const Core::Vector3 &start, const Core::Vector3 &v, const Core::Utils::Color &color)
Displays given vector shown as an arrow originating from 'start'.

Definition at line 83 of file SystemDisplay.hpp.