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

A cone physics shape. More...

#include <collisionshape.h>

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

Public Member Functions

 ConeCollisionShape (const String &Name, const Real &Radius, const Real &Height, const Vector3 &UpAxis)
 Class Constructor. More...
 
 ConeCollisionShape (const String &Name, const Real &Radius, const Real &Height, StandardAxis UpAxis)
 Class Constructor. More...
 
 ConeCollisionShape (const String &Name, btConeShape *BulletShape)
 Internal Constructor. More...
 
 ConeCollisionShape (XML::Node OneNode)
 DeSerializing Constructor. More...
 
virtual ~ConeCollisionShape ()
 Class Destructor.
 
virtual btConeShape * GetBulletConeShape () const
 Gets a pointer to the upcasted internal shape. More...
 
virtual Real GetCleanHeight () const
 Gets the height of the cone, as originally passed in. More...
 
virtual Real GetCleanRadius () const
 Gets the radius of the cone, as originally passed in. More...
 
virtual Real GetHeight () const
 Gets the height of the cone, as used for collision checking. More...
 
Real GetHeightScaling () const
 Which axis is up defines which axis is used to scale height. More...
 
virtual Real GetRadius () const
 Gets the radius of the cone, as used for collision checking. More...
 
Real GetRadiusScaling () const
 Which axis is up defines which 2 axis are used to scale the radius. More...
 
virtual CollisionShape::ShapeType GetType () const
 Gets the type of Collision shape this is. More...
 
virtual Vector3 GetUpAxis () const
 Gets which axis this cone is oriented along. More...
 
virtual StandardAxis GetUpStandardAxis () const
 Gets which axis this cone is oriented along. More...
 
virtual void ProtoDeSerialize (const XML::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &CurrentRoot) const
 Convert this class to an XML::Node ready for serialization. More...
 
- 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 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)
 Performe shared contructor work. More...
 
Vector3 GetAxisMathBS () const
 Simulate some messed up the physics library does. 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 cone physics shape.

Keep in mind when building a cone shape, the provided radius is for the base of the cone, but the pivot point of the shape is still at it's center and not it's base. Like Capsules and Cylinders, Cones can be aligned to any of the 3 linear axes(X, Y, or Z).

Definition at line 59 of file conecollisionshape.h.

Constructor & Destructor Documentation

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

Class Constructor.

Parameters
NameThe name of this Shape.
RadiusThe radius of the base of the Cone.
HeightThe height of the Cone.
UpAxisWhich axis the Cone 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 95 of file conecollisionshape.cpp.

Mezzanine::Physics::ConeCollisionShape::ConeCollisionShape ( const String Name,
const Real Radius,
const Real Height,
StandardAxis  UpAxis 
)

Class Constructor.

Parameters
NameThe name of this Shape.
RadiusThe radius of the base of the Cone.
HeightThe height of the Cone.
UpAxisWhich axis the Cone is to be oriented along. Uses StandardAxis enum, Axis_Y to make a vertical capsule

Definition at line 98 of file conecollisionshape.cpp.

Mezzanine::Physics::ConeCollisionShape::ConeCollisionShape ( const String Name,
btConeShape *  BulletShape 
)

Internal Constructor.

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

Definition at line 123 of file conecollisionshape.cpp.

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

DeSerializing Constructor.

Parameters
OneNodeThe node to use for constructing this shape

Definition at line 101 of file conecollisionshape.cpp.

Member Function Documentation

void Mezzanine::Physics::ConeCollisionShape::Construct ( const String Name,
const Real Radius,
const Real Height,
StandardAxis  UpAxis 
)
protected

Performe shared contructor work.

Parameters
NameThe name of this Shape.
RadiusThe radius of the base of the Cone.
HeightThe height of the Cone.
UpAxisWhich axis the Cone is to be oriented along. Uses StandardAxis enum, Axis_Y to make a vertical capsule

Definition at line 56 of file conecollisionshape.cpp.

Vector3 Mezzanine::Physics::ConeCollisionShape::GetAxisMathBS ( ) const
protected

Simulate some messed up the physics library does.

Returns
A Vector3 containing some StandarAxis based on what needs to go where.

Definition at line 68 of file conecollisionshape.cpp.

btConeShape * Mezzanine::Physics::ConeCollisionShape::GetBulletConeShape ( ) const
virtual

Gets a pointer to the upcasted internal shape.

Returns
Returns a pointer to the internal Cone shape this class gets it's functionality from.

Definition at line 173 of file conecollisionshape.cpp.

Real Mezzanine::Physics::ConeCollisionShape::GetCleanHeight ( ) const
virtual

Gets the height of the cone, as originally passed in.

Returns
Returns a real representing height of the cone.

Definition at line 150 of file conecollisionshape.cpp.

Real Mezzanine::Physics::ConeCollisionShape::GetCleanRadius ( ) const
virtual

Gets the radius of the cone, as originally passed in.

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

Definition at line 145 of file conecollisionshape.cpp.

Real Mezzanine::Physics::ConeCollisionShape::GetHeight ( ) const
virtual

Gets the height of the cone, as used for collision checking.

Returns
Returns a real representing height of the cone.

Definition at line 140 of file conecollisionshape.cpp.

Real Mezzanine::Physics::ConeCollisionShape::GetHeightScaling ( ) const

Which axis is up defines which axis is used to scale height.

Returns
A value that represent the scaling that only the height undergoes.

Definition at line 158 of file conecollisionshape.cpp.

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

Gets the radius of the cone, as used for collision checking.

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

Definition at line 135 of file conecollisionshape.cpp.

Real Mezzanine::Physics::ConeCollisionShape::GetRadiusScaling ( ) const

Which axis is up defines which 2 axis are used to scale the radius.

Returns
A value that represent the scaling that only the radius undergoes.

Definition at line 155 of file conecollisionshape.cpp.

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

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

Returns
A string containing "ConeCollisionShape"

Definition at line 232 of file conecollisionshape.cpp.

CollisionShape::ShapeType Mezzanine::Physics::ConeCollisionShape::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 168 of file conecollisionshape.cpp.

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

Gets which axis this cone is oriented along.

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

Definition at line 161 of file conecollisionshape.cpp.

StandardAxis Mezzanine::Physics::ConeCollisionShape::GetUpStandardAxis ( ) const
virtual

Gets which axis this cone is oriented along.

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

Definition at line 164 of file conecollisionshape.cpp.

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

Take the data stored in an XML and overwrite this instance of this object with it.

Parameters
OneNodeand XML::Node containing the data.
Warning
A precondition of using this is that all of the actors intended for use must already be Deserialized.

Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.

Definition at line 214 of file conecollisionshape.cpp.

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

Convert this class to an XML::Node ready for serialization.

Parameters
CurrentRootThe point in the XML hierarchy that all this collision shape should be appended to.

Reimplemented from Mezzanine::Physics::PrimitiveCollisionShape.

Definition at line 176 of file conecollisionshape.cpp.


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