#include <src/orxonox/objects/collisionshapes/CompoundCollisionShape.h>
Public Member Functions | |
void | attach (CollisionShape *shape) |
CompoundCollisionShape (BaseObject *creator) | |
void | detach (CollisionShape *shape) |
void | detachAll () |
CollisionShape * | getAttachedShape (unsigned int index) const |
void | updateAttachedShape (CollisionShape *shape) |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~CompoundCollisionShape () |
Private Member Functions | |
virtual btCollisionShape * | createNewShape () const |
void | updatePublicShape () |
Private Attributes | |
std::map< CollisionShape *, btCollisionShape * > | attachedShapes_ |
btCompoundShape * | compoundShape_ |
orxonox::CompoundCollisionShape::CompoundCollisionShape | ( | BaseObject * | creator | ) |
References compoundShape_, and RegisterObject.
orxonox::CompoundCollisionShape::~CompoundCollisionShape | ( | ) | [virtual] |
References attachedShapes_, compoundShape_, and orxonox::BaseObject::isInitialized().
void orxonox::CompoundCollisionShape::attach | ( | CollisionShape * | shape | ) |
References attachedShapes_, CCOUT, compoundShape_, orxonox::CollisionShape::getCollisionShape(), orxonox::CollisionShape::getOrientation(), orxonox::CollisionShape::getPosition(), orxonox::CollisionShape::notifyBeingAttached(), and updatePublicShape().
Referenced by orxonox::WorldEntity::attachCollisionShape(), orxonox::CollisionShape::parentChanged(), and XMLPort().
virtual btCollisionShape* orxonox::CompoundCollisionShape::createNewShape | ( | ) | const [inline, private, virtual] |
Implements orxonox::CollisionShape.
void orxonox::CompoundCollisionShape::detach | ( | CollisionShape * | shape | ) |
References attachedShapes_, CCOUT, compoundShape_, orxonox::CollisionShape::getCollisionShape(), orxonox::CollisionShape::notifyDetached(), and updatePublicShape().
Referenced by detachAll(), orxonox::WorldEntity::detachCollisionShape(), orxonox::CollisionShape::notifyBeingAttached(), XMLPort(), and orxonox::CollisionShape::~CollisionShape().
void orxonox::CompoundCollisionShape::detachAll | ( | ) |
References attachedShapes_, and detach().
CollisionShape * orxonox::CompoundCollisionShape::getAttachedShape | ( | unsigned int | index | ) | const |
void orxonox::CompoundCollisionShape::updateAttachedShape | ( | CollisionShape * | shape | ) |
void orxonox::CompoundCollisionShape::updatePublicShape | ( | ) | [private] |
References attachedShapes_, orxonox::CollisionShape::collisionShape_, compoundShape_, and orxonox::CollisionShape::updateParent().
Referenced by attach(), detach(), and updateAttachedShape().
void orxonox::CompoundCollisionShape::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::CollisionShape.
References attach(), detach(), SUPER, and XMLPortObject.
std::map<CollisionShape*, btCollisionShape*> orxonox::CompoundCollisionShape::attachedShapes_ [private] |
Referenced by attach(), detach(), detachAll(), getAttachedShape(), updateAttachedShape(), updatePublicShape(), and ~CompoundCollisionShape().
btCompoundShape* orxonox::CompoundCollisionShape::compoundShape_ [private] |
Referenced by attach(), CompoundCollisionShape(), detach(), updateAttachedShape(), updatePublicShape(), and ~CompoundCollisionShape().