Spinning Topp Logo BlackTopp Studios
inc
Classes | Typedefs | Enumerations | Functions | Variables
Mezzanine::Physics Namespace Reference

This namespace is for all the classes belonging to the Physics Subsystem. More...

Classes

class  BoxCollisionShape
 A box physics shape. More...
 
class  CapsuleCollisionShape
 A capsule physics shape. More...
 
class  CollidablePair
 This is a helper class for storing pairs of collidable proxies in associative containers. More...
 
class  CollidableProxy
 This is a proxy from which physics objects that can collide with each other are handled. More...
 
class  Collision
 This is an event class used to track collsions in the physics world. More...
 
class  CollisionDispatcher
 Used to provide better reporting of collisions. More...
 
struct  CollisionInternalData
 Used to insulate the interface from the implementation details for bullet. More...
 
class  CollisionShape
 This is the base class for all collision shapes. More...
 
class  CollisionShapeDeSerializer
 A tool to aid in deserialization for the specific instances that DeSerialization CollisionShapes other ways does not make sense. More...
 
class  CollisionShapeManager
 This manager is for the storage of all shapes and creation of mesh shapes. More...
 
class  CompoundCollisionShape
 A collision shape composed of many other collision shapes placed and oriented in local space. More...
 
class  ConeCollisionShape
 A cone physics shape. More...
 
class  ConeTwistConstraint
 This is a constraint that will limit the movement allowed from one body to within a cone area around another object. More...
 
class  Constraint
 This is the base class for all constraints supported. More...
 
class  ConvexHullCollisionShape
 A simple convex shape built from a low number of points in local space. More...
 
class  CylinderCollisionShape
 A cylinder physics shape. More...
 
class  DebugDrawWorkUnit
 This is a Mezzanine::Threading::iWorkUnit for the updating of the physics debug drawer. More...
 
class  DefaultCollisionShapeManagerFactory
 A factory responsible for the creation and destruction of the default collisionshapemanager. More...
 
class  DefaultPhysicsManagerFactory
 A factory responsible for the creation and destruction of the default physicsmanager. More...
 
class  DualTransformConstraint
 All constraints that track rotation and location of the Pivot relative to each Actor inherit from this. More...
 
class  DynamicMeshCollisionShape
 A triangle mesh collsion shape based on a graphics mesh. More...
 
class  FieldCollisionShape
 This is the base class for all Field shapes. More...
 
class  GearConstraint
 This is a constraint that duplicate the angular motion of one object to another, adjusted by the provided ratio. More...
 
class  Generic6DofConstraint
 Create simple but specific limits on any axis of movement or rotation. More...
 
class  Generic6DofSpringConstraint
 Creates a constraint as configurable as the 6Dof constraint, but has added support for spring motion. More...
 
class  GhostProxy
 This is the proxy object for ghost objects with no contact response. More...
 
class  HeightfieldCollisionShape
 A series of values that store hieght in a grid like fashion. More...
 
class  Hinge2Constraint
 This is a convience class that will configure a 6DoF spring constraint with 2 angular and 1 linear (with a spring) axes of freedom such that it can behave like a wheel and axel. More...
 
class  HingeConstraint
 This is a constraint to be used to restrict the movement between two objects to angular rotation on a single axis. More...
 
class  ManagerConstructionInfo
 This is a helper class storing information needed for the construction of a PhysicsManager. More...
 
class  MeshCollisionShape
 This is the base class for all Mesh shapes. More...
 
class  MultiSphereCollisionShape
 A physics shape comprised of multiple sphere's placed in local space. More...
 
class  ParallelCollisionDispatcher
 Used to provide better reporting of collisions in a multithreaded environment. More...
 
class  PhysicsManager
 This is simply a place for storing all the Physics Related functions. More...
 
class  PlaneCollisionShape
 A Flat wall/floor of limitless size. More...
 
class  Point2PointConstraint
 Tries to make a point relative to each of two actors match in 3d space, without regard to rotation. More...
 
class  PrimitiveCollisionShape
 This is the base class for all Primitive shapes. More...
 
class  RigidProxy
 This is a proxy from which rigid body proxys are handled. More...
 
class  SimulationMonopolyWorkUnit
 This is a Mezzanine::Threading::iWorkUnit for the multi-threaded processing of physics simulations. More...
 
class  SimulationWorkUnit
 This is a Mezzanine::Threading::iWorkUnit for the single threaded processing of physics simulations. More...
 
class  SliderConstraint
 This is a constraint for permitting movement on only a singular linear or angular axis. More...
 
class  SoftCollisionShape
 A collision shape for soft proxies. More...
 
class  SoftProxy
 This is the proxy object for soft/compressable bodies. More...
 
class  SphereCollisionShape
 A sphere physics shape. More...
 
class  StaticMeshCollisionShape
 A triangle mesh collsion shape based on a graphics mesh. More...
 
struct  StickyConstraintConstructionInfo
 Simple struct for holding information on how sticky constraints should be constructed. More...
 
struct  StickyData
 This is a basic class for storing the data related to the sticky behavior available to rigid bodies. More...
 
class  UniversalConstraint
 This is a constraint for sharing the rotation of one object along an angular axis with another. More...
 
class  WorldTriggerUpdateWorkUnit
 This is a Mezzanine::Threading::iWorkUnit for the updating of WorldTriggers. More...
 

Typedefs

typedef std::list< btCollisionAlgorithm * > AlgoList
 Convenience datatype for a collection of Collision Algorithms.
 
typedef Generic6DofConstraint StickyConstraint
 

Enumerations

enum  ActivationState {
  AS_Active = 1, AS_Island_Sleeping = 2, AS_Wants_Deactivation = 3, AS_DisableDeactivation = 4,
  AS_DisableSimulation = 5
}
 This is used by physics proxies to monitor and set their physics activation.
 
enum  AnisotropicFrictionFlags { AFF_AnisotropicFrictionDisabled = 0, AFF_AnisotropicFriction = 1, AFF_AnisotropicRollingFriction = 2 }
 This is used by physics proxies to help determine the behavior of it's anistropic friction behavior. More...
 
enum  CollisionFilter {
  CF_GenericFilter = 1, CF_StaticFilter = 2, CF_KinematicFilter = 4, CF_DebrisFilter = 8,
  CF_SensorFilter = 16, CF_CharacterFilter = 32, CF_AllFilter = -1, CF_UserFilter1 = 64,
  CF_UserFilter2 = 128, CF_UserFilter3 = 256, CF_UserFilter4 = 512
}
 These are the various filters that can be applied to all physics accelerated world objects to limit what they collide with. More...
 
enum  CollisionFlags {
  CF_StaticObject = 1, CF_KinematicObject = 2, CF_NoContactResponse = 4, CF_CustomMaterialCallback = 8,
  CF_CharacterObject = 16, CF_DisableVisualizeObject = 32, CF_DisableSPUCollisionProcessing = 64
}
 This is used by physics proxies to help determine collision response behavior of a proxy.
 
enum  CollisionState { Col_Begin, Col_Contacts_Updated, Col_End }
 Enum specifying the state change occuring in the collision.
 
enum  CollisionType {
  Col_Actor_Actor, Col_Actor_AreaEffect, Col_Actor_Debris, Col_Actor_Terrain,
  Col_AreaEffect_AreaEffect, Col_AreaEffect_Debris, Col_AreaEffect_Terrain, Col_Debris_Debris,
  Col_Debris_Terrain
}
 Enum specifying what kind of collision this class is storing. More...
 
enum  ConstraintParam { Con_ERP = 1, Con_Stop_ERP = 2, Con_CFM = 3, Con_Stop_CFM = 4 }
 Used by constraints for setting some parameters. More...
 
enum  DebugDrawMode {
  DDM_NoDebug = 0, DDM_DrawWireframe = 1, DDM_DrawAABB = 2, DDM_DrawFeaturesText = 4,
  DDM_DrawContactPoints = 8, DDM_NoDeactivation = 16, DDM_NoHelpText = 32, DDM_DrawText = 64,
  DDM_ProfileTimings = 128, DDM_EnableSatComparison = 256, DDM_DisableBulletLCP = 512, DDM_EnableCCD = 1024,
  DDM_DrawConstraints = 2048, DDM_DrawConstraintLimits = 4096, DDM_FastWireframe = 8192, DDM_DrawNormals = 16384,
  DDM_All = -1
}
 This is a collection of flags designed to describe what to draw when the Debug Drawer is enabled. More...
 
enum  ProxyType { PT_Rigid = 1, PT_Soft = 2, PT_Ghost = 3 }
 This is used by the PhysicsProxy child classes to describe which proxy type they are.
 

Functions

virtual ~ScalingShape ()
 Class destructor.
 
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin (const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
 No Idea.
 
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia) const
 Calculates the local inertia for this shape and it's child shape.
 
int char4ToAxis (char it)
 used to help convert string to the axis they indicate More...
 
String ConstraintParamAsString (ConstraintParam Param)
 Get a Constraint Parameter as a String. More...
 
CollisionShapeCreateShape (CollisionShape::ShapeType ShapeToCreate, const String &Name_, btCollisionShape *ShapeToModel)
 Create A shape of a type and optionally model it after an example. More...
 
CollisionShapeCreateShape (XML::Node OneNode)
 Create a CollisionShape from a snippet of xml. More...
 
virtual void getAabb (const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax) const
 Gets the AABB of this shape.
 
virtual void getAabbSlow (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 Gets the AABB of this shape.
 
virtual btVector3 GetChildScaling () const
 Gets the amount of scaling being applied to the child shape.
 
virtual btConvexShape * GetChildShape () const
 Gets the child shape being scaled by this wrapper.
 
virtual const btVector3 & getLocalScaling () const
 Gets the scaling being applied to the sharable/global child collision shape.
 
virtual btScalar getMargin () const
 Gets the collision margin of the sharable/global child collision shape.
 
virtual const char * getName () const
 Gets the serialization name of this shape.
 
virtual int getNumPreferredPenetrationDirections () const
 Gets the number of directions available for the first parameter in "getPreferredPenetrationDirection".
 
virtual void getPreferredPenetrationDirection (int index, btVector3 &penetrationVector) const
 Gets the direction objects should follow for penetration recovery at the specified index.
 
CollisionShape::ShapeType InternalShapeTypeToShapeType (int InternalShapeType)
 Convert from a Internal Collision Shape to a CollisionShape::ShapeType. More...
 
virtual btVector3 localGetSupportingVertex (const btVector3 &vec) const
 No Idea.
 
virtual btVector3 localGetSupportingVertexWithoutMargin (const btVector3 &vec) const
 No Idea.
 
 ScalingShape (btConvexShape *ChildShape, const btVector3 &Scaling)
 Class constructor.
 
virtual void SetChildScaling (const btVector3 &Scaling)
 Sets the amount of scaling to be applied to the child shape.
 
virtual void SetChildShape (btConvexShape *ChildShape)
 Sets the child shape to be scaled by this wrapper.
 
virtual void setLocalScaling (const btVector3 &scaling)
 Sets the scaling to be applied to the sharable/global child collision shape.
 
virtual void setMargin (btScalar margin)
 Sets the collision margin of the sharable/global child collision shape.
 
String ShapeTypeToString (CollisionShape::ShapeType ShapeToConvert)
 Get a string suitable for human eyes from a CollisionShape::ShapeType, may not be suitable for endusers. More...
 
ConstraintParam StringAsConstraintParam (String Param)
 Convert A string that might be ConstraintParam to one. More...
 
CollisionShape::ShapeType StringToShapeType (const String &TypeName)
 Convert a human readable string (as provided by ShapeTypeToString()) and convert it to a CollisionShape::ShapeType. More...
 

Variables

const int ConstraintParamCount = 4
 How many ConstraintParam Exist. More...
 

Detailed Description

This namespace is for all the classes belonging to the Physics Subsystem.

By default, this sub-system utilizies Bullet for it's physics acceleration.

Enumeration Type Documentation

This is used by physics proxies to help determine the behavior of it's anistropic friction behavior.

See the documentation on the PhysicsProxy class for more details.

Definition at line 62 of file physicsenumerations.h.

These are the various filters that can be applied to all physics accelerated world objects to limit what they collide with.

You can create your own groups on top of the ones that exist here, but they have to be powers of 2, and not overlap with any of the existing groups defined here. Simply pass in the Whole where appropriate.

Definition at line 72 of file physicsenumerations.h.

Enum specifying what kind of collision this class is storing.

Enumerator
Col_Actor_Actor 

Specifies a collision between two Actors.

Col_Actor_AreaEffect 

Specifies a collision between an Actor and an AreaRffect.

Col_Actor_Debris 

Specifies a collision between an Actor and a Debris.

Col_Actor_Terrain 

Specifies a collision between an Actor and some Terrain.

Col_AreaEffect_AreaEffect 

Specifies a collision between two AreaEffects.

Col_AreaEffect_Debris 

Specifies a collision between an AreaEffect and a Debris.

Col_AreaEffect_Terrain 

Specifies a collision between an AreaEffect and some Terrain.

Col_Debris_Debris 

Specifies a collision between two Debris.

Col_Debris_Terrain 

Specifies a collision between a Debris and some Terrain.

Definition at line 111 of file physicsenumerations.h.

Used by constraints for setting some parameters.

See the constraint class documentation for more details.

Enumerator
Con_ERP 

ERP values adjust how fast the errors in the constraints are reduced.

Con_CFM 

CFM values adds some small value to the main diagonal on the constraint matrix to prevent degenerate matrices.

Definition at line 61 of file constraint.h.

This is a collection of flags designed to describe what to draw when the Debug Drawer is enabled.

Most of these options work, with the exception of text-based modes and contact point modes.

Definition at line 126 of file physicsenumerations.h.

Function Documentation

int Mezzanine::Physics::char4ToAxis ( char  it)

used to help convert string to the axis they indicate

Parameters
itit is the character that is passed in to indicate what the axis is. This should be the [4] character or the 5 character of the string.
Returns
this returns an int that indicates the Axis for the string.
String Mezzanine::Physics::ConstraintParamAsString ( ConstraintParam  Param)

Get a Constraint Parameter as a String.

Parameters
ParamThe Parameter to get as a String.
Returns
A String That contains the name of a ConstraintParam.
CollisionShape *MEZZ_LIB Mezzanine::Physics::CreateShape ( CollisionShape::ShapeType  ShapeToCreate,
const String Name_,
btCollisionShape *  ShapeToModel 
)

Create A shape of a type and optionally model it after an example.

Parameters
ShapeToCreateThe Type of Shape to create.
Namethe name of the new shape.
ShapeToModelAn optional pointer to a bullet shape to include instead of creating one.
Returns
A new Mezzanine::CollisionShape with either default Values or the values of the bullet shape if one is provided.
Warning
The only checking done on the bullet shape is to verify it is not a null pointer. If the Internal shape fails to be of the appropriate kind correlating to ShapeToCreate then undefined behavior will occur.

Definition at line 181 of file collisionshape.cpp.

CollisionShape *MEZZ_LIB Mezzanine::Physics::CreateShape ( XML::Node  OneNode)

Create a CollisionShape from a snippet of xml.

Parameters
OneNodeA Node for any Collision Shape that can be instanstiated
Returns
A pointer to a CollisionShape of the Correct Type with the values stored in the XML.
Todo:
Complete CreateShape function once DynamicMeshCollisionShape can be deserialized
Todo:
Complete CreateShape function once SoftCollisionShape can be deserialized
Todo:
Complete CreateShape function once StaticMeshCollisionShape can be deserialized

Definition at line 221 of file collisionshape.cpp.

CollisionShape::ShapeType MEZZ_LIB Mezzanine::Physics::InternalShapeTypeToShapeType ( int  InternalShapeType)

Convert from a Internal Collision Shape to a CollisionShape::ShapeType.

Parameters
BulletShapeTypeThe ShapeType to Convert
Returns
The corresponding CollisionShape::ShapeType to the passed in bullet Shape Type if asuitable match exists
Exceptions
TheMezzanine engine only uses a subset of Bullets shapes, a Mezzanine::Exception with be thrown in the event an unsupported one is passed in.

Definition at line 263 of file collisionshape.cpp.

String MEZZ_LIB Mezzanine::Physics::ShapeTypeToString ( CollisionShape::ShapeType  ShapeToConvert)

Get a string suitable for human eyes from a CollisionShape::ShapeType, may not be suitable for endusers.

Parameters
ShapeToConvertThe kind of shape you want a string for.
Returns
A String with human readable contents corresponding to the passed in type.

Definition at line 285 of file collisionshape.cpp.

ConstraintParam Mezzanine::Physics::StringAsConstraintParam ( String  Param)

Convert A string that might be ConstraintParam to one.

Parameters
ParamA String that should be storing, a constraint param name.
Returns
if the name matches on of the constraintParams exactly, return that one.
Exceptions
Ifthe Param does not match a type exactly, then this will throw an exception.
CollisionShape::ShapeType MEZZ_LIB Mezzanine::Physics::StringToShapeType ( const String TypeName)

Convert a human readable string (as provided by ShapeTypeToString()) and convert it to a CollisionShape::ShapeType.

Parameters
TypeNameA String that matches exactly what returns from ShapeTypeToString().
Returns
A valid CollisionShape::ShapeType if possible
Exceptions
Thisthrows a Mezzanine::Exception in the event of a gibberish name.

Definition at line 307 of file collisionshape.cpp.

Variable Documentation

const int Mezzanine::Physics::ConstraintParamCount = 4

How many ConstraintParam Exist.

Used in some algorithms and we didn't want it to look like a magic so we defined it here.

Definition at line 82 of file constraint.h.