Sly Engine
Visualizer Class Reference

#include <Visualizer.h>

Collaboration diagram for Visualizer:
Collaboration graph

Static Public Member Functions

static void ShowBSphere (const CollisionVolumeBSphere &S, const Vect &col=DEFAULT_COLOR)
 Shows the b sphere with the passed in color (or a default color). More...
 
static void ShowAABB (const Vect &min, const Vect &max, const Vect &col=DEFAULT_COLOR)
 Shows the AABB specified by the min and max values. More...
 
static void ShowOBB (const Matrix &world, const CollisionVolumeOBB &V, const Vect &col=DEFAULT_COLOR)
 Shows the OBB via min and max corners. More...
 
static void ShowCollisionVolume (const CollisionVolume &c, const Vect &col=DEFAULT_COLOR)
 Maps the correct call for CollisionVolume c to visualize itself. More...
 
static void ShowMarker (const Vect &pos, const Vect &color=DEFAULT_COLOR, float radius=1.0f)
 Shows the marker at the given position. More...
 
static void ShowLine (const Vect &A, const Vect &B, const Vect &color=DEFAULT_COLOR)
 Shows a line between the points A and B. More...
 

Private Member Functions

 Visualizer ()
 Default constructor. More...
 
 Visualizer (const Visualizer &)=delete
 Copy constructor. More...
 
 Visualizer (Visualizer &&)=delete
 Move constructor. More...
 
Visualizeroperator= (const Visualizer &)=delete
 Assignment operator. More...
 
Visualizeroperator= (Visualizer &&)=delete
 Move assignment operator. More...
 
 ~Visualizer ()=default
 Deconstructor. More...
 
void privRenderBSphere (const CollisionVolumeBSphere &S, Vect col)
 Private call render b sphere. More...
 
void privRenderAABB (Matrix &M, Vect col) const
 Private call to render the AABB box. More...
 
void privRenderOBB (Matrix &world, Vect color) const
 Internal call to render the OBB box. More...
 
void privRenderMarker (Matrix &world, Vect color) const
 Internal call to render a marker at the given position. More...
 
void privRenderLine (Matrix &world, Vect color) const
 Private call to render a line. More...
 
void privTerminate ()
 Private terminate, to be called internally. More...
 

Static Private Member Functions

static VisualizerInstance ()
 Gets the Visualizer instance. More...
 
static void VisualizeAll ()
 Visualize all commands within the visualizer broker. More...
 
static void Terminate ()
 Terminates this instance. More...
 

Private Attributes

GraphicsObject_WireframeConstantColor * WFUnitSphere
 The single wf unit sphere to be used for sphere commands. More...
 
GraphicsObject_WireframeConstantColor * WFUnitBox
 The wireframe unit box to be used for unit box commands. More...
 
VisualizerBrokervisBroker
 The visualizer broker. More...
 

Static Private Attributes

static VisualizerptrInstance = nullptr
 The pointer to the singleton instance. More...
 
static Vect DEFAULT_COLOR = Vect(0.0f, 0.0f, 1.0f)
 The default color for the bsphere. More...
 

Friends

class VisualizerAttorney
 Dictates access to visualizer functions. More...
 

Constructor & Destructor Documentation

◆ Visualizer() [1/3]

Visualizer::Visualizer ( )
private

Default constructor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Visualizer() [2/3]

Visualizer::Visualizer ( const Visualizer )
privatedelete

Copy constructor.

◆ Visualizer() [3/3]

Visualizer::Visualizer ( Visualizer &&  )
privatedelete

Move constructor.

◆ ~Visualizer()

Visualizer::~Visualizer ( )
privatedefault

Deconstructor.

Member Function Documentation

◆ Instance()

static Visualizer & Visualizer::Instance ( )
inlinestaticprivate

Gets the Visualizer instance.

Returns
A reference to a Visualizer.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

Visualizer& Visualizer::operator= ( const Visualizer )
privatedelete

Assignment operator.

◆ operator=() [2/2]

Visualizer& Visualizer::operator= ( Visualizer &&  )
privatedelete

Move assignment operator.

◆ privRenderAABB()

void Visualizer::privRenderAABB ( Matrix &  M,
Vect  col 
) const
private

Private call to render the AABB box.

Parameters
SA CollisionVolumeAABB to process.
colThe color.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ privRenderBSphere()

void Visualizer::privRenderBSphere ( const CollisionVolumeBSphere S,
Vect  col 
)
private

Private call render b sphere.

Parameters
SA CollisionVolumeBSphere to process.
colThe color.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ privRenderLine()

void Visualizer::privRenderLine ( Matrix &  world,
Vect  color 
) const
private

Private call to render a line.

Parameters
[in,out]worldThe world.
colorThe color.
Here is the call graph for this function:

◆ privRenderMarker()

void Visualizer::privRenderMarker ( Matrix &  world,
Vect  color 
) const
private

Internal call to render a marker at the given position.

Parameters
[in,out]worldThe world.
colorThe color.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ privRenderOBB()

void Visualizer::privRenderOBB ( Matrix &  world,
Vect  color 
) const
private

Internal call to render the OBB box.

Parameters
[in,out]worldThe world.
colorThe color.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ privTerminate()

void Visualizer::privTerminate ( )
private

Private terminate, to be called internally.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowAABB()

static void Visualizer::ShowAABB ( const Vect &  min,
const Vect &  max,
const Vect &  col = DEFAULT_COLOR 
)
static

Shows the AABB specified by the min and max values.

Parameters
minThe minimum corner.
maxThe maximum corner.
col(Optional) The col.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowBSphere()

static void Visualizer::ShowBSphere ( const CollisionVolumeBSphere S,
const Vect &  col = DEFAULT_COLOR 
)
static

Shows the b sphere with the passed in color (or a default color).

Parameters
SA CollisionVolumeBSphere to process.
col(Optional) The col.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowCollisionVolume()

static void Visualizer::ShowCollisionVolume ( const CollisionVolume c,
const Vect &  col = DEFAULT_COLOR 
)
static

Maps the correct call for CollisionVolume c to visualize itself.

Parameters
cA CollisionVolume to process.
col(Optional) The col.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowLine()

static void Visualizer::ShowLine ( const Vect &  A,
const Vect &  B,
const Vect &  color = DEFAULT_COLOR 
)
static

Shows a line between the points A and B.

Parameters
AA Point in space to be connected with B
BA Point in space to be connected with A
color(Optional) The color.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowMarker()

static void Visualizer::ShowMarker ( const Vect &  pos,
const Vect &  col = DEFAULT_COLOR,
float  radius = 1.0f 
)
static

Shows the marker at the given position.

Parameters
posThe position.
col(Optional) The color.
radius(Optional) The radius.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowOBB()

static void Visualizer::ShowOBB ( const Matrix &  world,
const CollisionVolumeOBB V,
const Vect &  col = DEFAULT_COLOR 
)
static

Shows the OBB via min and max corners.

Parameters
minThe minimum corner.
maxThe maximum corner.
col(Optional) The col.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Terminate()

static void Visualizer::Terminate ( )
inlinestaticprivate

Terminates this instance.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VisualizeAll()

static void Visualizer::VisualizeAll ( )
staticprivate

Visualize all commands within the visualizer broker.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ VisualizerAttorney

friend class VisualizerAttorney
friend

Dictates access to visualizer functions.

Member Data Documentation

◆ DEFAULT_COLOR

Vect Visualizer::DEFAULT_COLOR = Vect(0.0f, 0.0f, 1.0f)
staticprivate

The default color for the bsphere.

◆ ptrInstance

Visualizer * Visualizer::ptrInstance = nullptr
staticprivate

The pointer to the singleton instance.

◆ visBroker

VisualizerBroker* Visualizer::visBroker
private

The visualizer broker.

◆ WFUnitBox

GraphicsObject_WireframeConstantColor* Visualizer::WFUnitBox
private

The wireframe unit box to be used for unit box commands.

◆ WFUnitSphere

GraphicsObject_WireframeConstantColor* Visualizer::WFUnitSphere
private

The single wf unit sphere to be used for sphere commands.


The documentation for this class was generated from the following files: