Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Mezzanine::Physics::CylinderCollisionShape Class Reference

A cylinder physics shape. More...

#include <collisionshape.h>

+ Inheritance diagram for Mezzanine::Physics::CylinderCollisionShape:
+ Collaboration diagram for Mezzanine::Physics::CylinderCollisionShape:

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

Detailed Description

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.

Constructor & Destructor Documentation

Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape ( const String Name,
const Real Radius,
const Real Height,
const Vector3 UpAxis 
)

Verbose Vector Constructor.

Parameters
NameThe name of this Shape.
RadiusThe radius of the Cylinder.
HeightThe height of the Cylinder, Height is indicated in the direction of the upAxis.
UpAxisWhich 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.

Parameters
NameThe name of this Shape.
RadiusThe radius of the Cylinder.
HeightThe height of the Cylinder, Height is indicated in the direction of the upAxis.
UpAxisWhich 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.

Parameters
NameThe name of this Shape.
HalfExtentsA Vector3 with the Height of the cylinder on the axis corresponding to the UpAxis and the Radius store in the other two axis.
UpAxisWhich 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.

Parameters
NameThe name of this Shape.
HalfExtentsA Vector3 with the Height of the cylinder on the axis corresponding to the UpAxis and the Radius store in the other two axis.
UpAxisWhich 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.

Parameters
NameThe name of this Shape.
BulletShapeThe internal shape this shape is based on.

Definition at line 94 of file cylindercollisionshape.cpp.

Mezzanine::Physics::CylinderCollisionShape::CylinderCollisionShape ( XML::Node  OneNode)

DeSerializing Constructor.

Parameters
OneNodeThe node to use for constructing this shape

Definition at line 97 of file cylindercollisionshape.cpp.

Member Function Documentation

void Mezzanine::Physics::CylinderCollisionShape::Construct ( const String Name,
const Vector3 HalfExtents,
StandardAxis  UpAxis 
)
protected

Does the initialization for a Cylinder.

Parameters
NameThe name of the shape to initialize
HalfExtentsThis of the shape to initialize
UpAxiswhich direction gets the flat 'top' of the cylinder perpendicular ot it.

Definition at line 56 of file cylindercollisionshape.cpp.

void Mezzanine::Physics::CylinderCollisionShape::Construct ( const String Name,
btCylinderShape *  BulletShape 
)
protected

Does the initialization for a Cylinder.

Parameters
NameThe name of the shape to initialize
BulletShapeA pointer to a valid fully constructed internal Collision shape.

Definition at line 76 of file cylindercollisionshape.cpp.

Vector3 Mezzanine::Physics::CylinderCollisionShape::CreateHalfExtents ( const Real Radius,
const Real Height,
StandardAxis  UpAxis 
)
static

A (very) simple way to create a Vector3 containing the Half Extents of a Cylinder with given dimenions/.

Parameters
RadiusThe radius of the Cylinder.
HeightThe height of the Cylinder, Height is indicated in the direction of the upAxis.
UpAxisWhich StandardAxis the cylinder is to be oriented along.

Definition at line 125 of file cylindercollisionshape.cpp.

btCylinderShape * Mezzanine::Physics::CylinderCollisionShape::GetBulletCylinderShape ( ) const
virtual

Definition at line 157 of file cylindercollisionshape.cpp.

Vector3 Mezzanine::Physics::CylinderCollisionShape::GetHalfExtents ( ) const
virtual

Gets the half extents used to construct this cylinder.

Returns
Returns a vector3 containing the half extents of this cylinder.

Definition at line 136 of file cylindercollisionshape.cpp.

Vector3 Mezzanine::Physics::CylinderCollisionShape::GetHalfExtentsWithMargin ( ) const
virtual

Gets the half extents with padding.

Returns
Returns a vector3 containing the half extents with the margin added to each axis.

Definition at line 142 of file cylindercollisionshape.cpp.

Real Mezzanine::Physics::CylinderCollisionShape::GetRadius ( ) const
virtual

Gets the radius of the cylinder.

Returns
Returns a real representing the radius at the base of the cylinder.

Definition at line 148 of file cylindercollisionshape.cpp.

String Mezzanine::Physics::CylinderCollisionShape::GetSerializableName ( )
static

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns
A string containing "CylinderCollisionShape"

Definition at line 205 of file cylindercollisionshape.cpp.

CollisionShape::ShapeType Mezzanine::Physics::CylinderCollisionShape::GetType ( ) const
virtual

Gets the type of Collision shape this is.

Returns
Returns an enum value indicating the type of collision shape this is.

Implements Mezzanine::Physics::PrimitiveCollisionShape.

Definition at line 154 of file cylindercollisionshape.cpp.

Vector3 Mezzanine::Physics::CylinderCollisionShape::GetUpAxis ( ) const
virtual

Gets which axis this cylinder is oriented along.

Returns
Returns a Vector3 representing which local axis is oriented along the world up axis.

Definition at line 151 of file cylindercollisionshape.cpp.

void Mezzanine::Physics::CylinderCollisionShape::ProtoDeSerialize ( const XML::Node OneNode)
virtual

Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.

Definition at line 187 of file cylindercollisionshape.cpp.

void Mezzanine::Physics::CylinderCollisionShape::ProtoSerialize ( XML::Node CurrentRoot) const
virtual

Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.

Definition at line 160 of file cylindercollisionshape.cpp.


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