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

Command for visualizing a line in the collision visualizer. More...

#include <VisualizerLineCommand.h>

Inheritance diagram for VisualizerLineCommand:
Inheritance graph

Public Member Functions

 VisualizerLineCommand (const VisualizerLineCommand &)=delete
 
VisualizerLineCommandoperator= (const VisualizerLineCommand &)=delete
 
 VisualizerLineCommand (const Vect &startPoint, const Vect &endPoint, const Vect &color, GraphicsObject_WireframeConstantColor *wireframe)
 Constructs a VisualizerLineCommand with endpoints, color, and wireframe object.
 
virtual void Execute () override
 Executes the line visualization command (renders the line).
 
void Set (const Vect &startPoint, const Vect &endPoint, const Vect &color, GraphicsObject_WireframeConstantColor *wireframe)
 Sets the parameters for the line command.
 
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

Vect startPoint
 The starting point of the line.
 
Vect endPoint
 The ending point of the line.
 
Vect color
 The color of the line.
 
GraphicsObject_WireframeConstantColor * wfUnitLine
 Pointer to the wireframe graphics object used for rendering.
 

Detailed Description

Command for visualizing a line in the collision visualizer.

The VisualizerLineCommand class is used to render a colored line in the engine's visualizer system. It stores the start and end points, color, and a reference to a wireframe graphics object. This command is typically used for debugging, collision visualization, or drawing helper lines in the scene.

Example usage:

VisualizerLineCommand* cmd = new VisualizerLineCommand(
Vect(0,0,0), Vect(1,1,1), Vect(1,0,0), pWireframeObj);
cmd->Execute();
virtual void Execute() override
Executes the line visualization command (renders the line).
Definition VisualizerLineCommand.cpp:8
See also
VisualizerCommandBase, GraphicsObject_WireframeConstantColor

Constructor & Destructor Documentation

◆ VisualizerLineCommand()

VisualizerLineCommand::VisualizerLineCommand ( const Vect & startPoint,
const Vect & endPoint,
const Vect & color,
GraphicsObject_WireframeConstantColor * wireframe )

Constructs a VisualizerLineCommand with endpoints, color, and wireframe object.

Parameters
startPointThe starting point of the line.
endPointThe ending point of the line.
colorThe color of the line.
wireframePointer to the wireframe graphics object used for rendering.

Member Function Documentation

◆ Execute()

void VisualizerLineCommand::Execute ( )
overridevirtual

Executes the line visualization command (renders the line).

Implements VisualizerCommandBase.

Here is the call graph for this function:

◆ GetVolumeType()

VolumeType VisualizerLineCommand::GetVolumeType ( )
overridevirtual

Gets the volume type associated with this command.

Returns
The VolumeType for this visualizer command.

Implements VisualizerCommandBase.

◆ Set()

void VisualizerLineCommand::Set ( const Vect & startPoint,
const Vect & endPoint,
const Vect & color,
GraphicsObject_WireframeConstantColor * wireframe )

Sets the parameters for the line command.

Parameters
startPointThe starting point of the line.
endPointThe ending point of the line.
colorThe color of the line.
wireframePointer to the wireframe graphics object used for rendering.
Here is the caller graph for this function:

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