35 #ifndef _CollisionShape_H__ 36 #define _CollisionShape_H__ 71 {
if(this->position_ == position)
return; this->position_ = position; this->updateParent(); }
77 {
return this->position_; }
85 {
if(this->orientation_ == orientation)
return; this->orientation_ = orientation; this->updateParent(); }
91 {
return this->orientation_; }
98 void yaw(
const Degree& angle)
99 { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Y)); }
106 { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_X)); }
113 { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Z)); }
123 { this->setScale3D(this->getScale3D()*scale); }
124 void setScale3D(
const Vector3& scale);
130 {
return this->scale_; }
138 { this->setScale3D(this->getScale3D()*scale); }
139 void setScale(
float scale);
146 {
if(this->hasUniformScaling())
return this->scale_.x;
return 0.0f; }
153 {
return this->uniformScale_; }
154 virtual void changedScale();
158 void calculateLocalInertia(
float mass, btVector3& inertia)
const;
165 {
return this->collisionShape_; }
167 bool hasTransform()
const;
170 void notifyDetached();
173 virtual void updateParent();
174 virtual void parentChanged();
180 virtual btCollisionShape* createNewShape()
const = 0;
187 void registerVariables();
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
void setOrientation(const Quaternion &orientation)
Set the orientation of the CollisionShape.
Definition: CollisionShape.h:84
unsigned int parentID_
The objectID of the parent of this CollisionShape, which can either be a CompoundCollisionShape or a ...
Definition: CollisionShape.h:184
const Quaternion & getOrientation() const
Get the orientation of the CollisionShape.
Definition: CollisionShape.h:90
This class is the base class of all the Objects in the universe that need to be synchronised over the...
Definition: Synchronisable.h:142
void setPosition(const Vector3 &position)
Set the position of the CollisionShape.
Definition: CollisionShape.h:70
void yaw(const Degree &angle)
Rotate the CollisionShape around the y-axis by the specified angle.
Definition: CollisionShape.h:98
void pitch(const Degree &angle)
Rotate the CollisionShape around the x-axis by the specified angle.
Definition: CollisionShape.h:105
void roll(const Degree &angle)
Rotate the CollisionShape around the z-axis by the specified angle.
Definition: CollisionShape.h:112
Vector3 position_
The position of the CollisionShape.
Definition: CollisionShape.h:189
btCollisionShape * collisionShape_
The bullet collision shape of this CollisionShape.
Definition: CollisionShape.h:182
CompoundCollisionShape * parent_
The CompoundCollisionShape this CollisionShape belongs to, nullptr if it doesn't belong to one...
Definition: CollisionShape.h:183
Vector3 scale_
The scale of the CollisionShape.
Definition: CollisionShape.h:191
bool hasUniformScaling()
Check whether the CollisionShape is uniformly scaled.
Definition: CollisionShape.h:152
xmlelement
Definition: Super.h:519
const Vector3 & getPosition() const
Get the position of the CollisionShape.
Definition: CollisionShape.h:76
Quaternion orientation_
The orientation of the CollisionShape.
Definition: CollisionShape.h:190
Wrapper for the bullet compound collision shape class btCompoundShape.
Definition: CompoundCollisionShape.h:57
Declaration and implementation of several math-functions, typedefs of some Ogre::Math classes to the ...
bool uniformScale_
Whether the scale is uniform.
Definition: CollisionShape.h:192
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
const Vector3 & getScale3D() const
Get the scale of the CollisionShape.
Definition: CollisionShape.h:129
Shared library macros, enums, constants and forward declarations for the orxonox library ...
Declaration of BaseObject, the base class of all objects in Orxonox.
btCollisionShape * getCollisionShape() const
Get the bullet collision shape of this CollisionShape.
Definition: CollisionShape.h:164
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
Wrapper for bullet collision shape class btCollisionShape.
Definition: CollisionShape.h:57
void scale3D(const Vector3 &scale)
Scale the CollisionShape by the input vector.
Definition: CollisionShape.h:122
void scale(float scale)
(Uniformly) scale the CollisionShape by the input scale.
Definition: CollisionShape.h:137
float getScale()
Get the (uniform) scale of the CollisionShape.
Definition: CollisionShape.h:145