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

Manages a pool of visualizer commands for efficient reuse. More...

#include <VisualizerCommandPool.h>

Public Member Functions

 VisualizerCommandPool (const VisualizerCommandPool &)=delete
 
VisualizerCommandPooloperator= (const VisualizerCommandPool &)=delete
 
VisualizerBSphereCommandGetBSphereCommand (const CollisionVolumeBSphere &sphere, const Vect &color, GraphicsObject_WireframeConstantColor *wf)
 Gets a VisualizerBSphereCommand from the pool or creates a new one if the pool is empty.
 
void ReturnBSphereCommand (VisualizerBSphereCommand *cmd)
 Returns a VisualizerBSphereCommand to the pool.
 
VisualizerAABBCommandGetAABBCommand (const CollisionVolumeAABB &aabb, const Vect &color, GraphicsObject_WireframeConstantColor *wf)
 Gets a VisualizerAABBCommand from the pool or creates a new one if the pool is empty.
 
void ReturnAABBCommand (VisualizerAABBCommand *cmd)
 Returns a VisualizerAABBCommand to the pool.
 
VisualizerOBBCommandGetOBBCommand (const CollisionVolumeOBB &obb, const Vect &color, GraphicsObject_WireframeConstantColor *wf)
 Gets a VisualizerOBBCommand from the pool or creates a new one if the pool is empty.
 
void ReturnOBBCommand (VisualizerOBBCommand *cmd)
 Returns a VisualizerOBBCommand to the pool.
 
VisualizerMinMaxCommandGetMinMaxCommand (const Vect &minPoint, const Vect &maxPoint, const Vect &color, GraphicsObject_WireframeConstantColor *wf)
 Gets a VisualizerMinMaxCommand from the pool or creates a new one if the pool is empty.
 
void ReturnMinMaxCommand (VisualizerMinMaxCommand *cmd)
 Returns a VisualizerMinMaxCommand to the pool.
 
VisualizerLineCommandGetLineCommand (const Vect &start, const Vect &end, const Vect &color, GraphicsObject_WireframeConstantColor *wf)
 Gets a VisualizerLineCommand from the pool or creates a new one if the pool is empty.
 
void ReturnLineCommand (VisualizerLineCommand *cmd)
 Returns a VisualizerLineCommand to the pool.
 

Private Attributes

std::list< VisualizerBSphereCommand * > bspherePool
 List of VisualizerBSphereCommand pointers representing the command pool.
 
std::list< VisualizerAABBCommand * > aabbPool
 List of VisualizerAABBCommand pointers representing the command pool.
 
std::list< VisualizerOBBCommand * > obbPool
 List of VisualizerOBBCommand pointers representing the command pool.
 
std::list< VisualizerMinMaxCommand * > minmaxPool
 List of VisualizerMinMaxCommand pointers representing the command pool.
 
std::list< VisualizerLineCommand * > linePool
 List of VisualizerLineCommand pointers representing the command pool.
 

Detailed Description

Manages a pool of visualizer commands for efficient reuse.

The VisualizerCommandPool class is responsible for managing a pool of visualizer commands, specifically VisualizerBSphereCommand objects. It provides methods to get and return commands to the pool, ensuring efficient reuse of command objects.

Member Function Documentation

◆ GetAABBCommand()

VisualizerAABBCommand * VisualizerCommandPool::GetAABBCommand ( const CollisionVolumeAABB & aabb,
const Vect & color,
GraphicsObject_WireframeConstantColor * wf )

Gets a VisualizerAABBCommand from the pool or creates a new one if the pool is empty.

Parameters
aabbThe collision volume axis-aligned bounding box.
colorThe color to render the bounding box.
wfPointer to the wireframe constant color graphics object for unit box.
Returns
A pointer to a VisualizerAABBCommand object.
Here is the call graph for this function:

◆ GetBSphereCommand()

VisualizerBSphereCommand * VisualizerCommandPool::GetBSphereCommand ( const CollisionVolumeBSphere & sphere,
const Vect & color,
GraphicsObject_WireframeConstantColor * wf )

Gets a VisualizerBSphereCommand from the pool or creates a new one if the pool is empty.

Parameters
sphereThe collision volume bounding sphere.
colorThe color to render the bounding sphere.
wfPointer to the wireframe constant color graphics object for unit sphere.
Returns
A pointer to a VisualizerBSphereCommand object.
Here is the call graph for this function:

◆ GetLineCommand()

VisualizerLineCommand * VisualizerCommandPool::GetLineCommand ( const Vect & start,
const Vect & end,
const Vect & color,
GraphicsObject_WireframeConstantColor * wf )

Gets a VisualizerLineCommand from the pool or creates a new one if the pool is empty.

Parameters
startThe start point of the line.
endThe end point of the line.
colorThe color to render the line.
wfPointer to the wireframe constant color graphics object for unit line.
Returns
A pointer to a VisualizerLineCommand object.
Here is the call graph for this function:

◆ GetMinMaxCommand()

VisualizerMinMaxCommand * VisualizerCommandPool::GetMinMaxCommand ( const Vect & minPoint,
const Vect & maxPoint,
const Vect & color,
GraphicsObject_WireframeConstantColor * wf )

Gets a VisualizerMinMaxCommand from the pool or creates a new one if the pool is empty.

Parameters
minPointThe minimum point of the bounding box.
maxPointThe maximum point of the bounding box.
colorThe color to render the bounding box.
wfPointer to the wireframe constant color graphics object for unit box.
Returns
A pointer to a VisualizerMinMaxCommand object.
Here is the call graph for this function:

◆ GetOBBCommand()

VisualizerOBBCommand * VisualizerCommandPool::GetOBBCommand ( const CollisionVolumeOBB & obb,
const Vect & color,
GraphicsObject_WireframeConstantColor * wf )

Gets a VisualizerOBBCommand from the pool or creates a new one if the pool is empty.

Parameters
obbThe collision volume oriented bounding box.
colorThe color to render the bounding box.
wfPointer to the wireframe constant color graphics object for unit box.
Returns
A pointer to a VisualizerOBBCommand object.
Here is the call graph for this function:

◆ ReturnAABBCommand()

void VisualizerCommandPool::ReturnAABBCommand ( VisualizerAABBCommand * cmd)

Returns a VisualizerAABBCommand to the pool.

Parameters
cmdPointer to the VisualizerAABBCommand to return.

◆ ReturnBSphereCommand()

void VisualizerCommandPool::ReturnBSphereCommand ( VisualizerBSphereCommand * cmd)

Returns a VisualizerBSphereCommand to the pool.

Parameters
cmdPointer to the VisualizerBSphereCommand to return.

◆ ReturnLineCommand()

void VisualizerCommandPool::ReturnLineCommand ( VisualizerLineCommand * cmd)

Returns a VisualizerLineCommand to the pool.

Parameters
cmdPointer to the VisualizerLineCommand to return.

◆ ReturnMinMaxCommand()

void VisualizerCommandPool::ReturnMinMaxCommand ( VisualizerMinMaxCommand * cmd)

Returns a VisualizerMinMaxCommand to the pool.

Parameters
cmdPointer to the VisualizerMinMaxCommand to return.

◆ ReturnOBBCommand()

void VisualizerCommandPool::ReturnOBBCommand ( VisualizerOBBCommand * cmd)

Returns a VisualizerOBBCommand to the pool.

Parameters
cmdPointer to the VisualizerOBBCommand to return.

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