A capsule physics shape. More...
#include <collisionshape.h>
Public Member Functions | |
CapsuleCollisionShape (const String &Name, const Real &Radius, const Real &Height, const Vector3 &UpAxis) | |
Class Constructor. More... | |
CapsuleCollisionShape (const String &Name, const Real &Radius, const Real &Height, StandardAxis UpAxis) | |
Class Constructor. More... | |
CapsuleCollisionShape (XML::Node OneNode) | |
DeSerializing Constructor. More... | |
CapsuleCollisionShape (const String &Name, btCapsuleShape *BulletShape) | |
Internal Constructor. More... | |
virtual | ~CapsuleCollisionShape () |
Class Destructor. | |
virtual btCapsuleShape * | GetBulletCapsuleShape () const |
virtual Real | GetCleanHeight () const |
Gets the height of the capsule, as the original value passed, without scaling and margin applied. More... | |
virtual Real | GetCleanRadius () const |
Gets the radius of the capsule, as the original value passed, without scaling and margin applied. More... | |
virtual Real | GetHeight () const |
Gets the height of the capsule, as used in collision checking, with scaling and margin subtracted. More... | |
virtual Real | GetRadius () const |
Gets the radius of the capsule, as used in collision checking, with scaling and margin subtracted. More... | |
virtual CollisionShape::ShapeType | GetType () const |
Gets the type of Collision shape this is. More... | |
virtual Vector3 | GetUpAxis () const |
Gets which axis this capsule is oriented along. More... | |
virtual StandardAxis | GetUpStandardAxis () const |
Gets which axis this capsule is oriented along. More... | |
virtual void | ProtoDeSerialize (const XML::Node &OneNode) |
virtual void | ProtoSerialize (XML::Node &CurrentRoot) const |
Public Member Functions inherited from Mezzanine::Physics::PrimitiveCollisionShape | |
PrimitiveCollisionShape () | |
Class Constructor. | |
virtual | ~PrimitiveCollisionShape () |
Class Destructor. | |
virtual btConvexInternalShape * | GetBulletConvexShape () const |
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::PrimitiveCollisionShape | |
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 Member Functions | |
void | Construct (const String &Name, const Real &Radius, const Real &Height, StandardAxis UpAxis) |
Performed share contructor work. More... | |
Protected Member Functions inherited from Mezzanine::Physics::PrimitiveCollisionShape | |
void | SetPointers (btConvexInternalShape *Shape) |
Sets the internal pointers on the base classes. | |
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... | |
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. | |
A capsule physics shape.
This shape is commonly used for characters. Keep in mind the total height of any capsule is height+2*radius, since the height provided only applies to the cylinder portion of the capsule. Like Cones and Cylinders, Capsules can be aligned to any of the 3 linear axes(X, Y, or Z).
Definition at line 60 of file capsulecollisionshape.h.
Mezzanine::Physics::CapsuleCollisionShape::CapsuleCollisionShape | ( | const String & | Name, |
const Real & | Radius, | ||
const Real & | Height, | ||
const Vector3 & | UpAxis | ||
) |
Class Constructor.
Name | The name of this Shape. |
Radius | The radius of the capsule. |
Height | The height of the cylindrical portion of the capsule. Total height would be Height+2*radius. |
UpAxis | Which axis the Capsule is to be oriented along. Typical usage is for a capsule to be oriented on the Y axis(0,1,0), which would make it stand upright. |
Definition at line 67 of file capsulecollisionshape.cpp.
Mezzanine::Physics::CapsuleCollisionShape::CapsuleCollisionShape | ( | const String & | Name, |
const Real & | Radius, | ||
const Real & | Height, | ||
StandardAxis | UpAxis | ||
) |
Class Constructor.
Name | The name of this Shape. |
Radius | The radius of the capsule. |
Height | The height of the cylindrical portion of the capsule. Total height would be Height+2*radius. |
UpAxis | Which axis the Capsule is to be oriented along. Uses StandardAxis enum, Axis_Y to make a vertical capsule |
Definition at line 70 of file capsulecollisionshape.cpp.
Mezzanine::Physics::CapsuleCollisionShape::CapsuleCollisionShape | ( | XML::Node | OneNode | ) |
DeSerializing Constructor.
OneNode | The node to use for constructing this shape |
Definition at line 73 of file capsulecollisionshape.cpp.
Mezzanine::Physics::CapsuleCollisionShape::CapsuleCollisionShape | ( | const String & | Name, |
btCapsuleShape * | BulletShape | ||
) |
Internal Constructor.
Name | The name of this Shape. |
BulletShape | The internal shape this shape is based on. |
Definition at line 100 of file capsulecollisionshape.cpp.
|
protected |
Performed share contructor work.
Name | The name of this Shape. |
Radius | The radius of the capsule. |
Height | The height of the cylindrical portion of the capsule. Total height would be Height+2*radius. |
UpAxis | Which axis the Capsule is to be oriented along. Typical usage is for a capsule to be oriented on the Y axis(0,1,0), which would make it stand upright. |
Definition at line 56 of file capsulecollisionshape.cpp.
|
virtual |
Definition at line 136 of file capsulecollisionshape.cpp.
|
virtual |
Gets the height of the capsule, as the original value passed, without scaling and margin applied.
Definition at line 119 of file capsulecollisionshape.cpp.
|
virtual |
Gets the radius of the capsule, as the original value passed, without scaling and margin applied.
Definition at line 116 of file capsulecollisionshape.cpp.
|
virtual |
Gets the height of the capsule, as used in collision checking, with scaling and margin subtracted.
Definition at line 113 of file capsulecollisionshape.cpp.
|
virtual |
Gets the radius of the capsule, as used in collision checking, with scaling and margin subtracted.
Definition at line 111 of file capsulecollisionshape.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 189 of file capsulecollisionshape.cpp.
|
virtual |
Gets the type of Collision shape this is.
Implements Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 131 of file capsulecollisionshape.cpp.
|
virtual |
Gets which axis this capsule is oriented along.
Definition at line 125 of file capsulecollisionshape.cpp.
|
virtual |
Gets which axis this capsule is oriented along.
Definition at line 128 of file capsulecollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 171 of file capsulecollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 139 of file capsulecollisionshape.cpp.