Manages a pool of visualizer commands for efficient reuse. More...
#include <VisualizerCommandPool.h>
Public Member Functions | |
VisualizerCommandPool (const VisualizerCommandPool &)=delete | |
VisualizerCommandPool & | operator= (const VisualizerCommandPool &)=delete |
VisualizerBSphereCommand * | 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. | |
void | ReturnBSphereCommand (VisualizerBSphereCommand *cmd) |
Returns a VisualizerBSphereCommand to the pool. | |
VisualizerAABBCommand * | 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. | |
void | ReturnAABBCommand (VisualizerAABBCommand *cmd) |
Returns a VisualizerAABBCommand to the pool. | |
VisualizerOBBCommand * | 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. | |
void | ReturnOBBCommand (VisualizerOBBCommand *cmd) |
Returns a VisualizerOBBCommand to the pool. | |
VisualizerMinMaxCommand * | 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. | |
void | ReturnMinMaxCommand (VisualizerMinMaxCommand *cmd) |
Returns a VisualizerMinMaxCommand to the pool. | |
VisualizerLineCommand * | 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. | |
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. | |
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.
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.
aabb | The collision volume axis-aligned bounding box. |
color | The color to render the bounding box. |
wf | Pointer to the wireframe constant color graphics object for unit box. |
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.
sphere | The collision volume bounding sphere. |
color | The color to render the bounding sphere. |
wf | Pointer to the wireframe constant color graphics object for unit sphere. |
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.
start | The start point of the line. |
end | The end point of the line. |
color | The color to render the line. |
wf | Pointer to the wireframe constant color graphics object for unit line. |
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.
minPoint | The minimum point of the bounding box. |
maxPoint | The maximum point of the bounding box. |
color | The color to render the bounding box. |
wf | Pointer to the wireframe constant color graphics object for unit box. |
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.
obb | The collision volume oriented bounding box. |
color | The color to render the bounding box. |
wf | Pointer to the wireframe constant color graphics object for unit box. |
void VisualizerCommandPool::ReturnAABBCommand | ( | VisualizerAABBCommand * | cmd | ) |
Returns a VisualizerAABBCommand to the pool.
cmd | Pointer to the VisualizerAABBCommand to return. |
void VisualizerCommandPool::ReturnBSphereCommand | ( | VisualizerBSphereCommand * | cmd | ) |
Returns a VisualizerBSphereCommand to the pool.
cmd | Pointer to the VisualizerBSphereCommand to return. |
void VisualizerCommandPool::ReturnLineCommand | ( | VisualizerLineCommand * | cmd | ) |
Returns a VisualizerLineCommand to the pool.
cmd | Pointer to the VisualizerLineCommand to return. |
void VisualizerCommandPool::ReturnMinMaxCommand | ( | VisualizerMinMaxCommand * | cmd | ) |
Returns a VisualizerMinMaxCommand to the pool.
cmd | Pointer to the VisualizerMinMaxCommand to return. |
void VisualizerCommandPool::ReturnOBBCommand | ( | VisualizerOBBCommand * | cmd | ) |
Returns a VisualizerOBBCommand to the pool.
cmd | Pointer to the VisualizerOBBCommand to return. |