40 #include <OgreSceneQuery.h> 64 virtual void rotatePitch(
const Vector2& value)
override;
65 virtual void rotateYaw(
const Vector2& value)
override;
66 virtual void rotateRoll(
const Vector2& value)
override;
68 virtual void aimAtPosition(
const Vector3 &position);
71 virtual void tick(
float dt)
override;
75 { this->maxAttackRadius_ = radius; }
79 { this->minAttackRadius_ = radius; }
83 { this->maxPitch_ = pitch; }
87 { this->maxYaw_ = yaw; }
91 {
return this->maxAttackRadius_; }
95 {
return this->minAttackRadius_; }
99 {
return this->maxPitch_; }
103 {
return this->maxYaw_; }
106 { this->rotationThrust_ = rotationthrust; }
109 {
return this->rotationThrust_; }
#define _ObjectsExport
Definition: ObjectsPrereqs.h:60
bool once_
Flag for executing code in the tick function only once.
Definition: Turret.h:119
float getMaxAttackRadius() const
Returns the maximum distance the turret is allowed to shoot.
Definition: Turret.h:90
Everything in Orxonox that has a health attribute is a Pawn.
Definition: Pawn.h:56
Ogre::Real maxYaw_
The maxmium yaw the turret can have (on one side).
Definition: Turret.h:127
float getRotationThrust()
Definition: Turret.h:108
Vector3 localZ_
The local z-axis, includes for the parent's rotation and rotations done in xml.
Definition: Turret.h:113
void setMaxPitch(float pitch)
Sets the maximum pitch the turret can have (in both directions).
Definition: Turret.h:82
float rotationThrust_
The velocity the turret rotates with.
Definition: Turret.h:128
Ogre::Real maxPitch_
The maxmium pitch the turret can have (on one side).
Definition: Turret.h:126
Vector3 startDir_
The initial facing direction, in local coordinates.
Definition: Turret.h:112
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
void setRotationThrust(float rotationthrust)
Definition: Turret.h:105
xmlelement
Definition: Super.h:519
Quaternion rotation_
The rotation to be done by the turret.
Definition: Turret.h:116
Ogre::RaySceneQuery * rayTest_
Used to perform a raytest, currently unused.
Definition: Turret.h:129
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
void setMaxAttackRadius(float radius)
Sets the maximum distance the turret is allowed to shoot.
Definition: Turret.h:74
float getMaxPitch() const
Returns the maximum pitch the turret can have.
Definition: Turret.h:98
Mode
Definition: CorePrereqs.h:102
void setMinAttackRadius(float radius)
Sets the minimum distance the turret is allowed to shoot.
Definition: Turret.h:78
Creates a turret with limited rotation.
Definition: Turret.h:58
Vector3 localXStart_
The local x-axis, without the parent's rotation.
Definition: Turret.h:123
Vector3 localZStart_
The local z-axis, without the parent's rotation.
Definition: Turret.h:121
Shared library macros, enums, constants and forward declarations for the objects module ...
float getMinAttackRadius() const
Returns the minimum distance the turret is allowed to shoot.
Definition: Turret.h:94
void setMaxYaw(float yaw)
Sets the maximum yaw the turret can have (in both directions).
Definition: Turret.h:86
float maxAttackRadius_
The maximum distance the turret is allowed to shoot.
Definition: Turret.h:124
Vector3 localX_
The local x-axis, includes for the parent's rotation and rotations done in xml.
Definition: Turret.h:115
float getMaxYaw() const
Returns the maximum yaw the turret can have.
Definition: Turret.h:102
Vector3 localYStart_
The local y-axis, without the parent's rotation.
Definition: Turret.h:122
Vector3 localY_
The local y-axis, includes for the parent's rotation and rotations done in xml.
Definition: Turret.h:114
float minAttackRadius_
The minimum distance the turret is allowed to shoot.
Definition: Turret.h:125