CodeSubWars 0.4.7b
CodeSubWars::CSWSetEngineDirectionCommand Class Reference

#include <CSWVariousCommands.h>

Inheritance diagram for CodeSubWars::CSWSetEngineDirectionCommand:

Public Member Functions

virtual ARSTD::Command::PtrType copy () const
 
- Public Member Functions inherited from CodeSubWars::CSWExecuteCommand
virtual std::string getName () const
 
- Public Member Functions inherited from ARSTD::Command
virtual PtrType copy () const =0
 
virtual std::string getName () const =0
 
virtual bool wasExecuted () const
 
virtual double getProgress () const
 

Static Public Member Functions

static PtrType create (std::shared_ptr< CSWEngine > &pEngine, const double &fHAngle, const double &fVAngle)
 
static PtrType create (std::shared_ptr< CSWEngine > &pEngine, const Vector3D &vecDirection)
 

Detailed Description

This is a specialization of a command. It provides the functionality to set the direction of an engine.

Member Function Documentation

◆ copy()

ARSTD::Command::PtrType CodeSubWars::CSWSetEngineDirectionCommand::copy ( ) const
virtual

Returns a copy of the command.

Returns
The copied command.

Implements ARSTD::Command.

◆ create() [1/2]

static PtrType CodeSubWars::CSWSetEngineDirectionCommand::create ( std::shared_ptr< CSWEngine > &  pEngine,
const double &  fHAngle,
const double &  fVAngle 
)
static

Creates a new command that let the given engine change its direction.

Parameters
pEngineThe engine which should change its direction.
fHAngleThe new horizontal angle. Positiv means rightward (in degree).
fVAngleThe new vertical angle. Positiv means upward (in degree).
Returns
Returns the new constructed command.

◆ create() [2/2]

static PtrType CodeSubWars::CSWSetEngineDirectionCommand::create ( std::shared_ptr< CSWEngine > &  pEngine,
const Vector3D &  vecDirection 
)
static

Creates a new command that let the given engine change its direction.

Parameters
pEngineThe engine which should change its direction.
vecDirectionThe new direction relative to its parent.
Returns
Returns the new constructed command.

Generated at Sun Aug 7 2022 for project CodeSubWars. www.codesubwars.org