SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
Visualizer Class Reference

Visualizes collision volumes for debugging purposes. More...

#include <Visualizer.h>

Inheritance diagram for Visualizer:
Inheritance graph

Static Public Member Functions

static void ShowBSphere (const CollisionVolumeBSphere &sphere, const Vect &color=DEFAULT_COLOR)
 Shows a bounding sphere with the specified color.
 
static void ShowAABB (const CollisionVolumeAABB &aabb, const Vect &color=DEFAULT_COLOR)
 Shows an axis-aligned bounding box (AABB) with the specified color.
 
static void ShowOBB (const CollisionVolumeOBB &obb, const Vect &color=DEFAULT_COLOR)
 Shows an oriented bounding box (OBB) with the specified color.
 
static void ShowCollisionVolume (const CollisionVolume &vol, const Vect &color=DEFAULT_COLOR)
 Shows a collision volume with the specified color.
 
static void ShowGroupAABB (const CollisionVolumeAABB &aabb, const Vect &color=DEFAULT_COLOR)
 Shows a group of axis-aligned bounding boxes (AABBs) with the specified color.
 
static void ShowMinMax (const Vect &minPoint, const Vect &maxPoint, const Vect &color=DEFAULT_COLOR)
 Shows a group of oriented bounding boxes (OBBs) with the specified color.
 
static void ShowLine (const Vect &start, const Vect &end, const Vect &color=DEFAULT_COLOR)
 Shows a line between two points with the specified color.
 

Private Member Functions

 Visualizer (const Visualizer &)=delete
 
Visualizeroperator= (const Visualizer &)=delete
 

Static Private Member Functions

static VisualizerInstance ()
 
static void RenderBSphere (const CollisionVolumeBSphere &sphere, const Vect &color)
 Renders a bounding sphere with the specified color.
 
static void RenderAABB (const CollisionVolumeAABB &aabb, const Vect &color)
 Renders an axis-aligned bounding box (AABB) with the specified color.
 
static void RenderOBB (const CollisionVolumeOBB &obb, const Vect &color)
 Renders an oriented bounding box (OBB) with the specified color.
 
static void RenderMinMax (const Vect &minPoint, const Vect &maxPoint, const Vect &color)
 Renders a collision volume with the specified color.
 
static void RenderLine (const Vect &start, const Vect &end, const Vect &color)
 Renders a line between two points with the specified color.
 
static void Render ()
 Renders all visualized collision volumes.
 
static void Delete ()
 Deletes the Visualizer instance.
 

Private Attributes

GraphicsObject_WireframeConstantColor * WFUnitSphere
 Pointer to the wireframe constant color graphics object for unit sphere.
 
GraphicsObject_WireframeConstantColor * WFUnitBox
 Pointer to the wireframe constant color graphics object for unit AABB.
 
std::list< VisualizerCommandBase * > visualizerList
 List of collision visualizer commands to visualize.
 
VisualizerCommandPoolcommandPool
 Command pool for managing visualizer commands.
 

Static Private Attributes

static VisualizerptrInstance = nullptr
 Pointer to the singleton instance of the Visualizer class.
 
static Vect DEFAULT_COLOR = Vect(0.0f, 0.0f, 1.0f)
 Default color for visualizing collision volumes.
 

Friends

class VisualizerAttorney
 

Additional Inherited Members

- Public Member Functions inherited from Align16
void * operator new (size_t, void *p) noexcept
 
void * operator new (size_t size) noexcept
 
void operator delete (void *p)
 
void * operator new[] (size_t size) noexcept
 
void operator delete[] (void *p)
 
void * operator new (size_t size, int _BlockUse, char const *_FileName, int _LineNumber) noexcept
 
void operator delete (void *p, int _BlockUse, char const *_FileName, int _LineNumber)
 
void * operator new[] (size_t size, int _BlockUse, char const *_FileName, int _LineNumber) noexcept
 
void operator delete[] (void *p, int _BlockUse, char const *_FileName, int _LineNumber)
 

Detailed Description

Visualizes collision volumes for debugging purposes.

The Visualizer class is responsible for visualizing collision volumes, such as bounding spheres, for debugging purposes. It follows the Singleton design pattern and provides methods to show and render collision volumes.

Member Function Documentation

◆ RenderAABB()

void Visualizer::RenderAABB ( const CollisionVolumeAABB & aabb,
const Vect & color )
staticprivate

Renders an axis-aligned bounding box (AABB) with the specified color.

Parameters
aabbThe collision volume AABB.
colorThe color to render the AABB.

◆ RenderBSphere()

void Visualizer::RenderBSphere ( const CollisionVolumeBSphere & sphere,
const Vect & color )
staticprivate

Renders a bounding sphere with the specified color.

Parameters
sphereThe collision volume bounding sphere.
colorThe color to render the bounding sphere.

◆ RenderLine()

void Visualizer::RenderLine ( const Vect & start,
const Vect & end,
const Vect & color )
staticprivate

Renders a line between two points with the specified color.

Parameters
startThe starting point of the line.
endThe ending point of the line.
colorThe color to render the line.

◆ RenderMinMax()

void Visualizer::RenderMinMax ( const Vect & minPoint,
const Vect & maxPoint,
const Vect & color )
staticprivate

Renders a collision volume with the specified color.

Parameters
volThe collision volume to render.
colorThe color to render the collision volume.

◆ RenderOBB()

void Visualizer::RenderOBB ( const CollisionVolumeOBB & obb,
const Vect & color )
staticprivate

Renders an oriented bounding box (OBB) with the specified color.

Parameters
obbThe collision volume OBB.
colorThe color to render the OBB.

◆ ShowAABB()

void Visualizer::ShowAABB ( const CollisionVolumeAABB & aabb,
const Vect & color = DEFAULT_COLOR )
static

Shows an axis-aligned bounding box (AABB) with the specified color.

Parameters
aabbThe collision volume AABB.
colorThe color to render the AABB (default is DEFAULT_COLOR).
Here is the caller graph for this function:

◆ ShowBSphere()

void Visualizer::ShowBSphere ( const CollisionVolumeBSphere & sphere,
const Vect & color = DEFAULT_COLOR )
static

Shows a bounding sphere with the specified color.

Parameters
sphereThe collision volume bounding sphere.
colorThe color to render the bounding sphere (default is DEFAULT_COLOR).
Here is the caller graph for this function:

◆ ShowCollisionVolume()

void Visualizer::ShowCollisionVolume ( const CollisionVolume & vol,
const Vect & color = DEFAULT_COLOR )
static

Shows a collision volume with the specified color.

Parameters
volThe collision volume to show.
colorThe color to render the collision volume (default is DEFAULT_COLOR).

◆ ShowGroupAABB()

void Visualizer::ShowGroupAABB ( const CollisionVolumeAABB & aabb,
const Vect & color = DEFAULT_COLOR )
static

Shows a group of axis-aligned bounding boxes (AABBs) with the specified color.

Parameters
aabbThe collision volume AABB.
colorThe color to render the AABBs (default is DEFAULT_COLOR).

◆ ShowLine()

void Visualizer::ShowLine ( const Vect & start,
const Vect & end,
const Vect & color = DEFAULT_COLOR )
static

Shows a line between two points with the specified color.

Parameters
startThe starting point of the line.
endThe ending point of the line.
colorThe color to render the line (default is DEFAULT_COLOR).
Here is the caller graph for this function:

◆ ShowMinMax()

void Visualizer::ShowMinMax ( const Vect & minPoint,
const Vect & maxPoint,
const Vect & color = DEFAULT_COLOR )
static

Shows a group of oriented bounding boxes (OBBs) with the specified color.

Parameters
obbThe collision volume OBB.
colorThe color to render the OBBs (default is DEFAULT_COLOR).
Here is the caller graph for this function:

◆ ShowOBB()

void Visualizer::ShowOBB ( const CollisionVolumeOBB & obb,
const Vect & color = DEFAULT_COLOR )
static

Shows an oriented bounding box (OBB) with the specified color.

Parameters
obbThe collision volume OBB.
colorThe color to render the OBB (default is DEFAULT_COLOR).
Here is the caller graph for this function:

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