62 void setConfigValues();
64 virtual void run(
float dt);
66 virtual void addToSpaceShip(
SpaceShip* ship);
72 {
return this->ship_; }
79 { this->relativePosition_ = position; }
85 {
return this->relativePosition_; }
93 {
OrxAssert(speed >= 0.0f,
"The input speed must be non-negative."); this->maxSpeedFront_ = speed; }
99 {
OrxAssert(speed >= 0.0f,
"The input speed must be non-negative."); this->maxSpeedBack_ = speed; }
105 {
OrxAssert(speed >= 0.0f,
"The input speed must be non-negative."); this->maxSpeedLeftRight_ = speed; }
111 {
OrxAssert(speed >= 0.0f,
"The input speed must be non-negative."); this->maxSpeedUpDown_ = speed; }
118 {
return this->maxSpeedFront_; }
124 {
return this->maxSpeedBack_; }
130 {
return this->maxSpeedLeftRight_; }
136 {
return this->maxSpeedUpDown_; }
143 {
OrxAssert(acceleration >= 0.0f,
"The input acceleration must be non-negative."); this->accelerationFront_ = acceleration; }
149 {
OrxAssert(acceleration >= 0.0f,
"The input acceleration must be non-negative."); this->accelerationBrake_ = acceleration; }
155 {
OrxAssert(acceleration >= 0.0f,
"The input acceleration must be non-negative."); this->accelerationBack_ = acceleration; }
161 {
OrxAssert(acceleration >= 0.0f,
"The input acceleration must be non-negative."); this->accelerationLeftRight_ = acceleration; }
167 {
OrxAssert(acceleration >= 0.0f,
"The input acceleration must be non-negative."); this->accelerationUpDown_ = acceleration; }
174 {
return this->accelerationFront_; }
180 {
return this->accelerationBrake_; }
186 {
return this->accelerationBack_; }
192 {
return this->accelerationLeftRight_; }
198 {
return this->accelerationUpDown_; }
205 {
OrxAssert(factor > 0.0f,
"The input factor must be positive."); this->boostFactor_ = factor; }
211 {
return this->boostFactor_; }
218 { this->speedAdd_ += speed; }
224 {
OrxAssert(factor >= 0.0f,
"The factor must be non-negative."); this->speedMultiply_ *= factor; }
231 {
return this->speedAdd_; }
237 {
return this->speedMultiply_; }
244 { this->engineTemplate_ = temp; this->loadEngineTemplate(); }
250 {
return this->engineTemplate_; }
253 void loadEngineTemplate();
255 virtual const Vector3& getSteering()
const;
258 void registerVariables();
259 void networkcallback_shipID();
void setAccelerationFront(float acceleration)
Set the forward acceleration produced by the Engine.
Definition: Engine.h:142
void setEngineTemplate(const std::string &temp)
Set the engine template, that specifies the parameters for the Engine.
Definition: Engine.h:243
void setAccelerationBrake(float acceleration)
Set the breaking acceleration produced by the Engine.
Definition: Engine.h:148
void setAccelerationLeftRight(float acceleration)
Set the left-right acceleration produced by the Engine.
Definition: Engine.h:160
float getAccelerationLeftRight() const
Get the left-right acceleration produced by the Engine.
Definition: Engine.h:191
void setAccelerationBack(float acceleration)
Set the backward acceleration produced by the Engine.
Definition: Engine.h:154
void setMaxSpeedFront(float speed)
Set the maximal forward speed of the Engine.
Definition: Engine.h:92
std::string engineTemplate_
The template that specifies the Engine's parameters.
Definition: Engine.h:261
float accelerationUpDown_
Up-down acceleration produced by the Engine.
Definition: Engine.h:281
::std::string string
Definition: gtest-port.h:756
const std::string & getEngineTemplate() const
Get the engine template, that specifies the parameters for the Engine.
Definition: Engine.h:249
float getBoostFactor() const
Get the boost factor of the Engine.
Definition: Engine.h:210
float getMaxSpeedFront() const
Get the maximal forward speed of the Engine.
Definition: Engine.h:117
void setMaxSpeedLeftRight(float speed)
Set the maximal left-right speed of the Engine.
Definition: Engine.h:104
float maxSpeedBack_
The maximal backward speed.
Definition: Engine.h:273
float accelerationBrake_
Breaking acceleration produced by the Engine.
Definition: Engine.h:278
float getMaxSpeedLeftRight() const
Get the maximal left-right speed of the Engine.
Definition: Engine.h:129
unsigned int shipID_
Object ID of the SpaceShip the Engine is mounted on.
Definition: Engine.h:264
void setAccelerationUpDown(float acceleration)
Set the up-down acceleration produced by the Engine.
Definition: Engine.h:166
float getMaxSpeedUpDown() const
Get the maximal up-down speed of the Engine.
Definition: Engine.h:135
void setRelativePosition(const Vector3 &position)
Set the relative position of the Engine.
Definition: Engine.h:78
SpaceShip * ship_
A pointer to the SpaceShip the Engine is mounted on.
Definition: Engine.h:263
float getSpeedMultiply(void)
Get the forward speed multiplication factor.
Definition: Engine.h:236
float accelerationFront_
Forward acceleration produced by the Engine.
Definition: Engine.h:277
float getAccelerationUpDown() const
Get the up-down acceleration produced by the Engine.
Definition: Engine.h:197
void setMaxSpeedUpDown(float speed)
Set the maximal up-down speed of the Engine.
Definition: Engine.h:110
float getSpeedAdd(void)
Get the additional forward speed.
Definition: Engine.h:230
#define OrxAssert(condition, errorMessage)
Run time assertion like assert(), but with an embedded message.
Definition: OrxAssert.h:54
Vector3 relativePosition_
The relative position of the Engine with respect to the SpaceShip it is mounted on.
Definition: Engine.h:265
xmlelement
Definition: Super.h:519
The SpaceShip is the principal entity through which the player interacts with the game...
Definition: SpaceShip.h:90
float maxSpeedFront_
The maximal forward speed.
Definition: Engine.h:272
void setBoostFactor(float factor)
Set the factor by which boosting increases the forward acceleration of the Engine.
Definition: Engine.h:204
const Vector3 & getRelativePosition() const
Get the relative position of the Engine.
Definition: Engine.h:84
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
float maxSpeedLeftRight_
The maximal left-right speed.
Definition: Engine.h:274
Shared library macros, enums, constants and forward declarations for the orxonox library ...
float speedMultiply_
Forward speed multiplication factor. Is not bounded by the maximal forward speed. ...
Definition: Engine.h:270
float accelerationLeftRight_
Left-right acceleration produced by the Engine.
Definition: Engine.h:280
float getAccelerationBrake() const
Get the breaking acceleration produced by the Engine.
Definition: Engine.h:179
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
float getAccelerationFront() const
Get the forward acceleration produced by the Engine.
Definition: Engine.h:173
SpaceShip * getShip() const
Get the SpaceShip this Engine is mounted on.
Definition: Engine.h:71
float getAccelerationBack() const
Get the backward acceleration produced by the Engine.
Definition: Engine.h:185
float accelerationBack_
Backward acceleration produced by the Engine.
Definition: Engine.h:279
The Engine class provides propulsion to the SpaceShip.
Definition: Engine.h:55
float maxSpeedUpDown_
The maximal up-down speed.
Definition: Engine.h:275
void addSpeedAdd(float speed)
Add to the additional forward speed factor.
Definition: Engine.h:217
void addSpeedMultiply(float factor)
Add to the forward speed multiplication factor.
Definition: Engine.h:223
float boostFactor_
The factor by which boosting increases the forward acceleration.
Definition: Engine.h:267
void setMaxSpeedBack(float speed)
Set the maximal backward speed of the Engine.
Definition: Engine.h:98
float getMaxSpeedBack() const
Get the maximal backward speed of the Engine.
Definition: Engine.h:123
float speedAdd_
Additional forward speed. Is not bounded by the maximal forward speed.
Definition: Engine.h:269
Declaration of custom assertion facilities