#include <src/orxonox/objects/collisionshapes/CollisionShape.h>
Public Member Functions | |
void | calculateLocalInertia (float mass, btVector3 &inertia) const |
CollisionShape (BaseObject *creator) | |
btCollisionShape * | getCollisionShape () const |
const Quaternion & | getOrientation () const |
const Vector3 & | getPosition () const |
const Vector3 & | getScale3D () const |
bool | hasTransform () const |
bool | notifyBeingAttached (CompoundCollisionShape *newParent) |
void | notifyDetached () |
void | pitch (const Degree &angle) |
void | registerVariables () |
void | roll (const Degree &angle) |
void | setOrientation (const Quaternion &orientation) |
void | setPosition (const Vector3 &position) |
virtual void | setScale (float scale) |
virtual void | setScale3D (const Vector3 &scale) |
void | updateShape () |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
void | yaw (const Degree &angle) |
virtual | ~CollisionShape () |
Protected Member Functions | |
virtual btCollisionShape * | createNewShape () const =0 |
virtual void | parentChanged () |
virtual void | updateParent () |
Protected Attributes | |
btCollisionShape * | collisionShape_ |
CompoundCollisionShape * | parent_ |
unsigned int | parentID_ |
Private Attributes | |
Quaternion | orientation_ |
Vector3 | position_ |
Vector3 | scale_ |
orxonox::CollisionShape::CollisionShape | ( | BaseObject * | creator | ) |
References collisionShape_, orxonox::OBJECTID_UNKNOWN, orientation_, parent_, parentID_, position_, RegisterObject, registerVariables(), and scale_.
orxonox::CollisionShape::~CollisionShape | ( | ) | [virtual] |
void orxonox::CollisionShape::calculateLocalInertia | ( | float | mass, | |
btVector3 & | inertia | |||
) | const |
Referenced by orxonox::WorldEntity::recalculateMassProps().
virtual btCollisionShape* orxonox::CollisionShape::createNewShape | ( | ) | const [protected, pure virtual] |
Implemented in orxonox::BoxCollisionShape, orxonox::CompoundCollisionShape, orxonox::ConeCollisionShape, orxonox::PlaneCollisionShape, and orxonox::SphereCollisionShape.
Referenced by updateShape().
btCollisionShape* orxonox::CollisionShape::getCollisionShape | ( | ) | const [inline] |
const Quaternion& orxonox::CollisionShape::getOrientation | ( | ) | const [inline] |
const Vector3& orxonox::CollisionShape::getPosition | ( | ) | const [inline] |
const Vector3& orxonox::CollisionShape::getScale3D | ( | ) | const [inline] |
Referenced by XMLPort().
bool orxonox::CollisionShape::hasTransform | ( | ) | const |
bool orxonox::CollisionShape::notifyBeingAttached | ( | CompoundCollisionShape * | newParent | ) |
void orxonox::CollisionShape::notifyDetached | ( | ) |
References orxonox::OBJECTID_UNKNOWN, parent_, and parentID_.
Referenced by orxonox::CompoundCollisionShape::detach().
void orxonox::CollisionShape::parentChanged | ( | ) | [protected, virtual] |
Reimplemented in orxonox::WorldEntityCollisionShape.
References orxonox::CompoundCollisionShape::attach(), orxonox::WorldEntity::attachCollisionShape(), orxonox::Synchronisable::getSynchronisable(), and parentID_.
Referenced by registerVariables().
void orxonox::CollisionShape::pitch | ( | const Degree & | angle | ) | [inline] |
void orxonox::CollisionShape::registerVariables | ( | ) |
Reimplemented in orxonox::BoxCollisionShape, orxonox::ConeCollisionShape, orxonox::PlaneCollisionShape, and orxonox::SphereCollisionShape.
References parentChanged(), parentID_, orxonox::Synchronisable::registerVariable(), and orxonox::VariableDirection::ToClient.
Referenced by CollisionShape().
void orxonox::CollisionShape::roll | ( | const Degree & | angle | ) | [inline] |
void orxonox::CollisionShape::setOrientation | ( | const Quaternion & | orientation | ) | [inline] |
Referenced by orxonox::WorldEntity::notifyBeingAttached(), orxonox::WorldEntity::notifyDetached(), and XMLPort().
void orxonox::CollisionShape::setPosition | ( | const Vector3 & | position | ) | [inline] |
Referenced by orxonox::WorldEntity::notifyBeingAttached(), orxonox::WorldEntity::notifyDetached(), and XMLPort().
void orxonox::CollisionShape::setScale | ( | float | scale | ) | [virtual] |
void orxonox::CollisionShape::setScale3D | ( | const Vector3 & | scale | ) | [virtual] |
void orxonox::CollisionShape::updateParent | ( | ) | [protected, virtual] |
Reimplemented in orxonox::WorldEntityCollisionShape.
References parent_, and orxonox::CompoundCollisionShape::updateAttachedShape().
Referenced by orxonox::WorldEntityCollisionShape::updateParent(), orxonox::CompoundCollisionShape::updatePublicShape(), and updateShape().
void orxonox::CollisionShape::updateShape | ( | ) |
References collisionShape_, createNewShape(), and updateParent().
Referenced by orxonox::BoxCollisionShape::BoxCollisionShape(), orxonox::ConeCollisionShape::ConeCollisionShape(), orxonox::PlaneCollisionShape::PlaneCollisionShape(), orxonox::SphereCollisionShape::registerVariables(), orxonox::PlaneCollisionShape::registerVariables(), orxonox::ConeCollisionShape::registerVariables(), orxonox::BoxCollisionShape::registerVariables(), and orxonox::SphereCollisionShape::SphereCollisionShape().
void orxonox::CollisionShape::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::BaseObject.
Reimplemented in orxonox::BoxCollisionShape, orxonox::CompoundCollisionShape, orxonox::ConeCollisionShape, orxonox::PlaneCollisionShape, and orxonox::SphereCollisionShape.
References getOrientation(), getPosition(), getScale3D(), pitch(), orxonox::MT_Type::Quaternion, roll(), setOrientation(), setPosition(), setScale(), setScale3D(), SUPER, orxonox::MT_Type::Vector3, XMLPortParamLoadOnly, XMLPortParamTemplate, and yaw().
void orxonox::CollisionShape::yaw | ( | const Degree & | angle | ) | [inline] |
btCollisionShape* orxonox::CollisionShape::collisionShape_ [protected] |
Referenced by CollisionShape(), orxonox::CompoundCollisionShape::updatePublicShape(), updateShape(), orxonox::BoxCollisionShape::~BoxCollisionShape(), orxonox::ConeCollisionShape::~ConeCollisionShape(), orxonox::PlaneCollisionShape::~PlaneCollisionShape(), and orxonox::SphereCollisionShape::~SphereCollisionShape().
Quaternion orxonox::CollisionShape::orientation_ [private] |
Referenced by CollisionShape(), and hasTransform().
CompoundCollisionShape* orxonox::CollisionShape::parent_ [protected] |
Referenced by CollisionShape(), notifyBeingAttached(), notifyDetached(), updateParent(), and ~CollisionShape().
unsigned int orxonox::CollisionShape::parentID_ [protected] |
Referenced by CollisionShape(), notifyBeingAttached(), notifyDetached(), parentChanged(), and registerVariables().
Vector3 orxonox::CollisionShape::position_ [private] |
Referenced by CollisionShape(), and hasTransform().
Vector3 orxonox::CollisionShape::scale_ [private] |
Referenced by CollisionShape().