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

Command class for visualizing an OBB (Oriented Bounding Box) in the scene. More...

#include <VisualizerOBBCommand.h>

Inheritance diagram for VisualizerOBBCommand:
Inheritance graph

Public Member Functions

 VisualizerOBBCommand (const VisualizerOBBCommand &)=delete
 
VisualizerOBBCommandoperator= (const VisualizerOBBCommand &)=delete
 
 VisualizerOBBCommand (const CollisionVolumeOBB *ab, const Vect &c, GraphicsObject_WireframeConstantColor *w)
 Constructor for VisualizerOBBCommand.
 
virtual void Execute () override
 Executes the OBB visualization command (renders the OBB).
 
void Set (const CollisionVolumeOBB *ab, const Vect &c, GraphicsObject_WireframeConstantColor *w)
 Sets the OBB and color for visualization.
 
VolumeType GetVolumeType () override
 Gets the volume type associated with this command.
 
- Public Member Functions inherited from VisualizerCommandBase
virtual ~VisualizerCommandBase ()=default
 Virtual destructor for VisualizerCommandBase.
 

Private Attributes

const CollisionVolumeOBBobb
 Pointer to the CollisionVolumeOBB object to visualize.
 
Vect color
 Color of the OBB.
 
GraphicsObject_WireframeConstantColor * wfUnitOBB
 Pointer to the GraphicsObject_WireframeConstantColor for rendering.
 

Detailed Description

Command class for visualizing an OBB (Oriented Bounding Box) in the scene.

The VisualizerOBBCommand class is responsible for rendering an OBB using a wireframe representation. It inherits from VisualizerCommandBase and implements the Execute method to perform the rendering.

Example usage:

Vect color(1.0f, 0.0f, 0.0f);
GraphicsObject_WireframeConstantColor* wf = new GraphicsObject_WireframeConstantColor(...);
VisualizerOBBCommand* command = new VisualizerOBBCommand(obb, color, wf);
command->Execute();
Represents an Oriented Bounding Box (OBB) collision volume.
Definition CollisionVolumeOBB.h:23
Vect color
Color of the OBB.
Definition VisualizerOBBCommand.h:63
const CollisionVolumeOBB * obb
Pointer to the CollisionVolumeOBB object to visualize.
Definition VisualizerOBBCommand.h:62
virtual void Execute() override
Executes the OBB visualization command (renders the OBB).
Definition VisualizerOBBCommand.cpp:7

Constructor & Destructor Documentation

◆ VisualizerOBBCommand()

VisualizerOBBCommand::VisualizerOBBCommand ( const CollisionVolumeOBB * ab,
const Vect & c,
GraphicsObject_WireframeConstantColor * w )

Constructor for VisualizerOBBCommand.

Parameters
abPointer to the CollisionVolumeOBB object to visualize.
cColor of the OBB.
wPointer to the GraphicsObject_WireframeConstantColor for rendering.

Member Function Documentation

◆ Execute()

void VisualizerOBBCommand::Execute ( )
overridevirtual

Executes the OBB visualization command (renders the OBB).

Implements VisualizerCommandBase.

Here is the call graph for this function:

◆ GetVolumeType()

VolumeType VisualizerOBBCommand::GetVolumeType ( )
overridevirtual

Gets the volume type associated with this command.

Returns
The VolumeType for this visualizer command.

Implements VisualizerCommandBase.

◆ Set()

void VisualizerOBBCommand::Set ( const CollisionVolumeOBB * ab,
const Vect & c,
GraphicsObject_WireframeConstantColor * w )

Sets the OBB and color for visualization.

Parameters
abPointer to the CollisionVolumeOBB object to visualize.
cColor of the OBB.
wPointer to the GraphicsObject_WireframeConstantColor for rendering.
Here is the caller graph for this function:

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