A cylinder physics shape. More...
#include <collisionshape.h>
Public Member Functions | |
CylinderCollisionShape (const String &Name, const Real &Radius, const Real &Height, const Vector3 &UpAxis) | |
Verbose Vector Constructor. More... | |
CylinderCollisionShape (const String &Name, const Real &Radius, const Real &Height, StandardAxis UpAxis) | |
Verbose Constructor. More... | |
CylinderCollisionShape (const String &Name, const Vector3 &HalfExtents, const Vector3 &UpAxis) | |
Terse Vector Constructor. More... | |
CylinderCollisionShape (const String &Name, const Vector3 &HalfExtents, StandardAxis UpAxis) | |
Terse Constructor. More... | |
CylinderCollisionShape (const String &Name, btCylinderShape *BulletShape) | |
Internal Constructor. More... | |
CylinderCollisionShape (XML::Node OneNode) | |
DeSerializing Constructor. More... | |
virtual | ~CylinderCollisionShape () |
Class Destructor. | |
virtual btCylinderShape * | GetBulletCylinderShape () const |
virtual Vector3 | GetHalfExtents () const |
Gets the half extents used to construct this cylinder. More... | |
virtual Vector3 | GetHalfExtentsWithMargin () const |
Gets the half extents with padding. More... | |
virtual Real | GetRadius () const |
Gets the radius of the cylinder. More... | |
virtual CollisionShape::ShapeType | GetType () const |
Gets the type of Collision shape this is. More... | |
virtual Vector3 | GetUpAxis () const |
Gets which axis this cylinder 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 Vector3 | CreateHalfExtents (const Real &Radius, const Real &Height, StandardAxis UpAxis) |
A (very) simple way to create a Vector3 containing the Half Extents of a Cylinder with given dimenions/. More... | |
static String | SerializableName () |
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 | SerializableName () |
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 | SerializableName () |
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 Vector3 &HalfExtents, StandardAxis UpAxis) |
Does the initialization for a Cylinder. More... | |
void | Construct (const String &Name, btCylinderShape *BulletShape) |
Does the initialization for a Cylinder. 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 cylinder physics shape.
A primitive cylinder shape. Like Capsules and Cones Cylinders can be aligned to any of the 3 linear axes(X, Y, or Z).
Definition at line 58 of file cylindercollisionshape.h.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | const String & | Name, |
const Real & | Radius, | ||
const Real & | Height, | ||
const Vector3 & | UpAxis | ||
) |
Verbose Vector Constructor.
Name | The name of this Shape. |
Radius | The radius of the Cylinder. |
Height | The height of the Cylinder, Height is indicated in the direction of the upAxis. |
UpAxis | Which axis the cylinder 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 82 of file cylindercollisionshape.cpp.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | const String & | Name, |
const Real & | Radius, | ||
const Real & | Height, | ||
StandardAxis | UpAxis | ||
) |
Verbose Constructor.
Name | The name of this Shape. |
Radius | The radius of the Cylinder. |
Height | The height of the Cylinder, Height is indicated in the direction of the upAxis. |
UpAxis | Which StandardAxis the cylinder is to be oriented along. |
Definition at line 85 of file cylindercollisionshape.cpp.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | const String & | Name, |
const Vector3 & | HalfExtents, | ||
const Vector3 & | UpAxis | ||
) |
Terse Vector Constructor.
Name | The name of this Shape. |
HalfExtents | A Vector3 with the Height of the cylinder on the axis corresponding to the UpAxis and the Radius store in the other two axis. |
UpAxis | Which axis the cylinder 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 88 of file cylindercollisionshape.cpp.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | const String & | Name, |
const Vector3 & | HalfExtents, | ||
StandardAxis | UpAxis | ||
) |
Terse Constructor.
Name | The name of this Shape. |
HalfExtents | A Vector3 with the Height of the cylinder on the axis corresponding to the UpAxis and the Radius store in the other two axis. |
UpAxis | Which StandardAxis the cylinder is to be oriented along. |
Definition at line 91 of file cylindercollisionshape.cpp.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | const String & | Name, |
btCylinderShape * | BulletShape | ||
) |
Internal Constructor.
Name | The name of this Shape. |
BulletShape | The internal shape this shape is based on. |
Definition at line 94 of file cylindercollisionshape.cpp.
Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape | ( | XML::Node | OneNode) |
DeSerializing Constructor.
OneNode | The node to use for constructing this shape |
Definition at line 97 of file cylindercollisionshape.cpp.
|
protected |
Does the initialization for a Cylinder.
Name | The name of the shape to initialize |
HalfExtents | This of the shape to initialize |
UpAxis | which direction gets the flat 'top' of the cylinder perpendicular ot it. |
Definition at line 56 of file cylindercollisionshape.cpp.
|
protected |
Does the initialization for a Cylinder.
Name | The name of the shape to initialize |
BulletShape | A pointer to a valid fully constructed internal Collision shape. |
Definition at line 76 of file cylindercollisionshape.cpp.
|
static |
A (very) simple way to create a Vector3 containing the Half Extents of a Cylinder with given dimenions/.
Radius | The radius of the Cylinder. |
Height | The height of the Cylinder, Height is indicated in the direction of the upAxis. |
UpAxis | Which StandardAxis the cylinder is to be oriented along. |
Definition at line 125 of file cylindercollisionshape.cpp.
|
virtual |
Definition at line 157 of file cylindercollisionshape.cpp.
|
virtual |
Gets the half extents used to construct this cylinder.
Definition at line 136 of file cylindercollisionshape.cpp.
|
virtual |
Gets the half extents with padding.
Definition at line 142 of file cylindercollisionshape.cpp.
|
virtual |
Gets the radius of the cylinder.
Definition at line 148 of file cylindercollisionshape.cpp.
|
virtual |
Gets the type of Collision shape this is.
Implements Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 154 of file cylindercollisionshape.cpp.
|
virtual |
Gets which axis this cylinder is oriented along.
Definition at line 151 of file cylindercollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 187 of file cylindercollisionshape.cpp.
|
virtual |
Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.
Definition at line 160 of file cylindercollisionshape.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 205 of file cylindercollisionshape.cpp.