Wraith  0.1.5
Basic 3D game engine in C++
Visualizer Class Reference

A visualizer responsible to drawing wireframe collision models for user debugging. More...

#include <Visualizer.h>

Collaboration diagram for Visualizer:
Collaboration graph

Static Public Member Functions

static void ShowCollisionVolume (const CollisionVolume &collisionVolume)
 Shows the Collision Volume to be rendered. More...
 
static void ShowCollisionVolume (const CollisionVolume &collisionVolume, const Vect &color)
 Shows the Collision Volume to be rendered. More...
 
static void ShowCollisionVolume (const CollisionVolume &collisionVolume, const Vect &color, int depth)
 Shows the Collision Volume to be rendered. More...
 
static void ShowRay (const Vect &start, const Vect &direction, float length, const Vect &color=Visualizer::DEFAULT_COLOR)
 Shows a ray in space to be rendered. More...
 
static void ShowRay (const Vect &start, const Vect &direction, const Vect &color=Visualizer::DEFAULT_COLOR)
 Shows a ray in space to be rendered. More...
 
static void ShowPointAt (const Vect &position, const Vect &color=Visualizer::DEFAULT_COLOR)
 Shows a point in space to be rendered. More...
 
static void ShowLineSegment (const Vect &position_1, const Vect &position_2, const Vect &color=Visualizer::DEFAULT_COLOR)
 Shows a line segment in space to be rendered. More...
 

Private Types

typedef std::list< RenderCommand * > CommandList
 

Private Member Functions

 Visualizer (const Visualizer &)=delete
 
Visualizeroperator= (const Visualizer &)=delete
 
 Visualizer (Visualizer &&)=delete
 
Visualizeroperator= (Visualizer &&)=delete
 
void privShowCollisionVolume (const CollisionVolume &, const Vect &color, int depth)
 
void privShowRay (const Vect &start, const Vect &direction, const Vect &color)
 
void privShowPointAt (const Vect &position, const Vect &color)
 
void renderPoint (Matrix &world, const Vect &color)
 Renders the AABB wireframe onto the screen. More...
 
void privShowLineSegment (const Vect &position_1, const Vect &position_2, const Vect &color)
 
void renderLineSegment (Matrix &world, const Vect &color)
 Renders the AABB wireframe onto the screen. More...
 
void privVisualizeAll ()
 
void privShowBSphere (const CollisionVolumeBSphere &, const Vect &color)
 
void renderBSphere (Matrix &world, const Vect &color)
 Renders the BSphere wireframe onto the screen. More...
 
void privShowAABB (const CollisionVolumeAABB &, const Vect &color)
 
void renderAABB (Matrix &world, const Vect &color)
 Renders the AABB wireframe onto the screen. More...
 
void privShowOBB (const CollisionVolumeOBB &, const Vect &color)
 
void renderOBB (Matrix &world, const Vect &color)
 Renders the OBB wireframe onto the screen. More...
 

Static Private Member Functions

static VisualizerGetInstance ()
 
static void VisualizeAll ()
 Render all visualization commands of collision models. More...
 
static void ShowBSphere (const CollisionVolumeBSphere &collisionBSphere, const Vect &color)
 Shows the Bsphere to be rendered. More...
 
static void ShowAABB (const CollisionVolumeAABB &AABB, const Vect &color)
 Shows the AABB to be rendered. More...
 
static void ShowOBB (const CollisionVolumeOBB &OBB, const Vect &color)
 Shows the OBB to be rendered. More...
 
static void Delete ()
 Terminates Visualizer. More...
 

Private Attributes

GraphicsObject_WireframeConstantColor * _pSphereGraphicsObject
 
GraphicsObject_WireframeConstantColor * _pCubeGraphicsObject
 
CommandList _renderCommands
 

Static Private Attributes

static VisualizerpVisualzierInstance = nullptr
 
static Vect DEFAULT_COLOR = Colors::Blue
 

Friends

class VisualizerAttorney
 

Detailed Description

A visualizer responsible to drawing wireframe collision models for user debugging.

Member Function Documentation

◆ Delete()

void Visualizer::Delete ( )
staticprivate

Terminates Visualizer.

ONLY called by Wraith::UnLoadContent() through VisualizerAttorney::DeleteAccess::Terminate().

◆ renderAABB()

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

Renders the AABB wireframe onto the screen.

DELAY called by RenderAABBCommand::execute() through VisualizerAttorney::RenderAccess::RenderAABBphere().

Parameters
worldThe world matrix.
colorThe color.

◆ renderBSphere()

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

Renders the BSphere wireframe onto the screen.

DELAY called by RenderBSphereCommand::execute() through VisualizerAttorney::RenderAccess::RenderBSphere().

Parameters
worldThe world matrix.
colorThe color.

◆ renderLineSegment()

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

Renders the AABB wireframe onto the screen.

DELAY called by RenderAABBCommand::execute() through VisualizerAttorney::RenderAccess::RenderAABBphere().

Parameters
worldThe world matrix.
colorThe color.

◆ renderOBB()

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

Renders the OBB wireframe onto the screen.

DELAY called by RenderOBBCommand::execute() through VisualizerAttorney::RenderAccess::RenderOBBphere().

Parameters
worldThe world matrix.
colorThe color.

◆ renderPoint()

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

Renders the AABB wireframe onto the screen.

DELAY called by RenderAABBCommand::execute() through VisualizerAttorney::RenderAccess::RenderAABBphere().

Parameters
worldThe world matrix.
colorThe color.

◆ ShowAABB()

static void Visualizer::ShowAABB ( const CollisionVolumeAABB AABB,
const Vect &  color 
)
inlinestaticprivate

Shows the AABB to be rendered.

Parameters
AABBAn AABB.
color(Optional) The color.

◆ ShowBSphere()

static void Visualizer::ShowBSphere ( const CollisionVolumeBSphere collisionBSphere,
const Vect &  color 
)
inlinestaticprivate

Shows the Bsphere to be rendered.

Parameters
collisionBSphereThe collision BSphere.
color(Optional) The color.

◆ ShowOBB()

static void Visualizer::ShowOBB ( const CollisionVolumeOBB OBB,
const Vect &  color 
)
inlinestaticprivate

Shows the OBB to be rendered.

Parameters
OBBAn OBB.
colorThe color.

◆ VisualizeAll()

static void Visualizer::VisualizeAll ( )
inlinestaticprivate

Render all visualization commands of collision models.

ONLY called by ScreenManager::privDraw() through VisualizerAttorney::RenderAccess::VisualizeAll().


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