29 #ifndef _MobileEntity_H__ 30 #define _MobileEntity_H__ 60 virtual void tick(
float dt)
override;
62 virtual void setPosition(
const Vector3& position)
override;
63 virtual void setOrientation(
const Quaternion& orientation)
override;
65 virtual void setVelocity(
const Vector3& velocity);
67 { this->setVelocity(Vector3(x, y, z)); }
69 {
return this->linearVelocity_; }
75 {
return (this->getOrientation().Inverse() * this->getVelocity()); }
77 virtual void setAngularVelocity(
const Vector3& velocity);
79 { this->setAngularVelocity(Vector3(x, y, z)); }
81 {
return this->angularVelocity_; }
83 void setAcceleration(
const Vector3& acceleration);
85 { this->setAcceleration(Vector3(x, y, z)); }
87 {
return this->linearAcceleration_; }
88 void addAcceleration(
const Vector3& acceleration,
const Vector3 &relativePosition = Vector3::ZERO);
90 void setAngularAcceleration(
const Vector3& acceleration);
92 { this->setAngularAcceleration(Vector3(x, y, z)); }
94 {
return this->angularAcceleration_; }
96 void applyCentralForce(
const Vector3& force);
98 { this->applyCentralForce(Vector3(x, y, z)); }
101 { this->setAngularVelocity(this->getAngularVelocity().normalisedCopy() * rate.valueRadians()); }
103 {
return Radian(this->getAngularVelocity().length()); }
106 { this->setAngularVelocity(axis * this->getAngularVelocity().length()); }
108 {
return this->getAngularVelocity().normalisedCopy(); }
112 virtual void setWorldTransform(
const btTransform& worldTrans)
override;
113 virtual void getWorldTransform(btTransform& worldTrans)
const override;
void setAngularVelocity(float x, float y, float z)
Definition: MobileEntity.h:78
virtual const Vector3 & getVelocity() const override
Definition: MobileEntity.h:68
const Vector3 & getAngularVelocity() const
Definition: MobileEntity.h:80
Declaration of the Tickable interface.
const Vector3 & getAcceleration() const
Definition: MobileEntity.h:86
Vector3 linearAcceleration_
Definition: MobileEntity.h:115
Vector3 angularAcceleration_
Definition: MobileEntity.h:117
void setRotationRate(Degree rate)
Definition: MobileEntity.h:100
Vector3 linearVelocity_
Definition: MobileEntity.h:116
Vector3 getLocalVelocity() const
Get the velocity in the coordinate-system of the MoblieEntity.
Definition: MobileEntity.h:74
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
xmlelement
Definition: Super.h:519
Vector3 angularVelocity_
Definition: MobileEntity.h:118
void setRotationAxis(const Vector3 &axis)
Definition: MobileEntity.h:105
Degree getRotationRate() const
Definition: MobileEntity.h:102
Declaration and implementation of several math-functions, typedefs of some Ogre::Math classes to the ...
The MobileEntity is a derived class from orxonox::WorldEntity and orxonox::Tickable.
Definition: MobileEntity.h:53
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
CollisionType
Denotes the possible types of physical objects in a Scene.
Definition: WorldEntity.h:265
Shared library macros, enums, constants and forward declarations for the orxonox library ...
Vector3 getRotationAxis() const
Definition: MobileEntity.h:107
void setAcceleration(float x, float y, float z)
Definition: MobileEntity.h:84
void setAngularAcceleration(float x, float y, float z)
Definition: MobileEntity.h:91
void applyCentralForce(float x, float y, float z)
Definition: MobileEntity.h:97
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
void setVelocity(float x, float y, float z)
Definition: MobileEntity.h:66
The Tickable interface provides a tick(dt) function, that gets called every frame.
Definition: Tickable.h:52
const Vector3 & getAngularAcceleration() const
Definition: MobileEntity.h:93