Orxonox: orxonox::CompoundCollisionShape Class Reference

# orxonox::CompoundCollisionShape Class Reference

`#include <src/orxonox/objects/collisionshapes/CompoundCollisionShape.h>`

Inheritance diagram for orxonox::CompoundCollisionShape:

List of all members.

## 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_

## Constructor & Destructor Documentation

orxonox::CompoundCollisionShape::CompoundCollisionShape | ( | BaseObject * | creator | ) |

References compoundShape_, and RegisterObject.

orxonox::CompoundCollisionShape::~CompoundCollisionShape | ( |  | ) | `[virtual]`

References attachedShapes_, compoundShape_, and orxonox::BaseObject::isInitialized().

## Member Function Documentation

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

References attachedShapes_.

Referenced by orxonox::WorldEntity::getAttachedCollisionShape().

void orxonox::CompoundCollisionShape::updateAttachedShape | ( | CollisionShape * | shape | ) |

References attachedShapes_, CCOUT, compoundShape_, orxonox::CollisionShape::getCollisionShape(), orxonox::CollisionShape::getOrientation(), orxonox::CollisionShape::getPosition(), and updatePublicShape().

Referenced by orxonox::CollisionShape::updateParent().

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.

Parameters:

  | xmlelement | The XML-element
  | loading | Loading (true) or saving (false)

Returns:
  The XML-element

Reimplemented from orxonox::CollisionShape.

References attach(), detach(), SUPER, and XMLPortObject.

## Member Data Documentation

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().

The documentation for this class was generated from the following files:

- src/orxonox/objects/collisionshapes/CompoundCollisionShape.h
- src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc