A collision shape composed of many other collision shapes placed and oriented in local space. More...
#include <collisionshape.h>
Public Member Functions | |
CompoundCollisionShape (const String &Name) | |
Class Constructor. More... | |
CompoundCollisionShape (const String &Name, btCompoundShape *BulletShape) | |
Internal Constructor. More... | |
virtual | ~CompoundCollisionShape () |
Class Destructor. | |
virtual void | AddChildShape (CollisionShape *Child, const Vector3 &ChildLocation, const Quaternion &ChildRotation) |
Adds a shape to this compound shape. More... | |
virtual void | AddChildShape (CollisionShape *Child, const Vector3 &ChildLocation) |
Adds a shape to this compound shape. More... | |
virtual void | AddChildShape (CollisionShape *Child, const Transform &ChildLocation) |
Adds a shape to this compound shape. More... | |
virtual btCompoundShape * | GetBulletCompoundShape () const |
virtual CollisionShape * | GetChild (Whole Index) const |
Get a specific child. More... | |
virtual Whole | GetNumChildren () const |
Gets the number of children belonging to this compound shape. More... | |
virtual CollisionShape::ShapeType | GetType () const |
Gets the type of Collision shape this is. More... | |
virtual void | ProtoDeSerialize (const XML::Node &OneNode) |
virtual void | ProtoSerialize (XML::Node &CurrentRoot) const |
virtual void | RemoveChildShape (CollisionShape *Child) |
Removes a Child shape from this compound shape. More... | |
virtual void | RemoveChildShape (const Whole &ChildIndex) |
Removed a Child shape from this compound shape by index. More... | |
Public Member Functions inherited from Mezzanine::Physics::CollisionShape | |
CollisionShape () | |
Class Constructor. | |
virtual | ~CollisionShape () |
Class Destructor. | |
virtual btCollisionShape * | _GetInternalShape () const |
Gets the internal shape pointer this collision shape is based on. More... | |
virtual void | _SetShapeName (const String &NewName) |
Sets the name of this collision shape. More... | |
virtual Real | GetMargin () const |
Gets the amount of padding currently being applied to the collision shape. More... | |
virtual const String & | GetName () const |
Gets the name of this shape. More... | |
virtual Vector3 | GetScaling () const |
Gets the current scaling being applied to the collision shape. More... | |
virtual void | SetMargin (const Real &Margin) |
Sets the padding that will be applied when checking for collisions. More... | |
virtual void | SetScaling (const Vector3 &Scaling) |
Scales the collision shape on each of it's axes. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag this class will leave behind as its instances are serialized. More... | |
Static Public Member Functions inherited from Mezzanine::Physics::CollisionShape | |
static String | GetSerializableName () |
Get the name of the the XML tag this class will leave behind as its instances are serialized. More... | |
Protected Attributes | |
std::vector< CollisionShape * > | ChildShapes |
Storage for Child shapes. | |
Protected Attributes inherited from Mezzanine::Physics::CollisionShape | |
String | Name |
Storage for the name of this class instance. | |
btCollisionShape * | ShapeBase |
A pointer to the bullet collision this uses. | |
Additional Inherited Members | |
Public Types inherited from Mezzanine::Physics::CollisionShape | |
enum | ShapeType { ST_Box = 0, ST_Capsule = 1, ST_Compound = 2, ST_Cone = 3, ST_ConvexHull = 4, ST_Cylinder = 5, ST_MultiSphere = 6, ST_Sphere = 7, ST_DynamicTriMesh = 8, ST_Heightfield = 9, ST_Plane = 10, ST_Soft = 11, ST_StaticTriMesh = 12 } |
This enum describes what kind of shape you are currently working with. More... | |
A collision shape composed of many other collision shapes placed and oriented in local space.
This shape is the sum of all it's child shapes. Unlike the MultiSphereCollisionShape and the ConvexHullCollisionShape, this shape does not form a convex hull of it's children. When populating with primitives, Compound shapes offer the most flexibility with the best performace that you can get.
When deleted a CompoundCollisionShape will clean up all of it's child shapes.
Definition at line 60 of file compoundcollisionshape.h.
Mezzanine::Physics::CompoundCollisionShape::CompoundCollisionShape | ( | const String & | Name | ) |
Class Constructor.
Name | The name of this Shape. |
Definition at line 56 of file compoundcollisionshape.cpp.
Mezzanine::Physics::CompoundCollisionShape::CompoundCollisionShape | ( | const String & | Name, |
btCompoundShape * | BulletShape | ||
) |
Internal Constructor.
Name | The name of this Shape. |
BulletShape | The internal shape this shape is based on. |
Definition at line 62 of file compoundcollisionshape.cpp.
|
virtual |
Adds a shape to this compound shape.
Child | The shape to be added to this shape. |
ChildLocation | The location this child is to have in local space. |
ChildRotation | The rotation to apply to this child in local space. |
Definition at line 88 of file compoundcollisionshape.cpp.
|
virtual |
Adds a shape to this compound shape.
Child | The shape to be added to this shape. |
ChildLocation | The location this child is to have in local space. |
Definition at line 96 of file compoundcollisionshape.cpp.
|
virtual |
Adds a shape to this compound shape.
Child | The shape to be added to this shape. |
ChildLocation | The location and Rotation this child is to have in local space. |
Definition at line 106 of file compoundcollisionshape.cpp.
|
virtual |
Definition at line 148 of file compoundcollisionshape.cpp.
|
virtual |
Get a specific child.
Index | A number indicating which CollisionShape you want a pointer to. |
Definition at line 118 of file compoundcollisionshape.cpp.
|
virtual |
Gets the number of children belonging to this compound shape.
Definition at line 113 of file compoundcollisionshape.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 222 of file compoundcollisionshape.cpp.
|
virtual |
Gets the type of Collision shape this is.
Implements Mezzanine::Physics::CollisionShape.
Definition at line 143 of file compoundcollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::CollisionShape.
Definition at line 182 of file compoundcollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::CollisionShape.
Definition at line 151 of file compoundcollisionshape.cpp.
|
virtual |
Removes a Child shape from this compound shape.
Child | The child shape to be removed. |
Definition at line 123 of file compoundcollisionshape.cpp.
|
virtual |
Removed a Child shape from this compound shape by index.
ChildIndex | The index of the child shape to be removed. |
Definition at line 136 of file compoundcollisionshape.cpp.