MezzanineEngine March 18, 2012

Mezzanine::ActorRigidPhysicsSettings Class Reference

This is a helper class for configuring physics settings of an ActorRigid. More...

#include <actorphysicssettings.h>

Inheritance diagram for Mezzanine::ActorRigidPhysicsSettings:
Mezzanine::ActorBasePhysicsSettings Mezzanine::NonTriggerPhysicsSettings Mezzanine::WorldObjectPhysicsSettings

List of all members.

Public Member Functions

 ActorRigidPhysicsSettings (ActorRigid *Actor, btRigidBody *PhysicsObject)
 Standard Constructor.
virtual ~ActorRigidPhysicsSettings ()
 Class destructor.
virtual void ApplyForce (const Vector3 &Force)
 Push/Apply force to an object.
virtual void ApplyTorque (const Vector3 &Torque)
 Spin/Apply Torque to an object.
virtual void ClearStickyContacts ()
 Removes all the constraints currently active on this object.
virtual Real GetAngularDamping () const
 Get the Angular damping.
virtual Vector3 GetAngularVelocity () const
 Gets the Angular Velocity of this object.
virtual Vector3 GetForce () const
 Get the total Force/Movement on the actor.
virtual Vector3 GetIndividualGravity () const
 Gets the gravity being applied to this object.
virtual Real GetLinearDamping () const
 Get the linear damping.
virtual Vector3 GetLinearVelocity () const
 Gets the Linear Velocity of this object.
virtual Vector3 GetLocalInertia () const
 Get the current intertia of the Actor.
virtual Real GetMass () const
 Get the total Mass of the actor.
virtual StickyDataGetStickyData () const
 Gets the struct storing the data related to sticky behavior.
virtual Vector3 GetTorque () const
 Get the Torque/Rotation.
virtual void ProtoDeSerialize (const xml::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it.
virtual void ProtoSerialize (xml::Node &CurrentRoot) const
 Convert this class to an xml::Node ready for serialization.
virtual void SetAngularVelocity (const Vector3 &AngVel)
 Sets the Angular Velocity of this object.
virtual void SetCollisionShape (CollisionShape *Shape)
 Sets the collision shape to be used.
virtual void SetDamping (const Real &LinDamping, const Real &AngDamping)
 Sets the Damping for this object.
virtual void SetIndividualGravity (const Vector3 &Gravity)
 Sets the gravity for only this object.
virtual void SetLinearVelocity (const Vector3 &LinVel)
 Sets the Linear Velocity of this object.
virtual void SetMass (Real NewMass)
 Change the mass of the object.
virtual void SetMass (Real NewMass, const Vector3 &NewInertia)
 Change the mass of the object.
virtual void SetStickyData (const Whole &MaxNumContacts)
 Sets the basic parameters for enabling sticky behavior with this actor.

Static Public Member Functions

static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized.

Protected Attributes

btRigidBody * ActorRB
 Physics Object of the actor.
ActorRigidRigidParent
 The Actor this belongs to.
StickyDataStickyContacts
 Data related to sticky behavior, if any is enabled.

Detailed Description

This is a helper class for configuring physics settings of an ActorRigid.

This class contains functions for the configuring of physics specific settings of an ActorRigid. This class can only configure the ActorRigids physics. For configuring actor graphics, see ActorGraphicsSettings.

Definition at line 179 of file actorphysicssettings.h.


Constructor & Destructor Documentation

Mezzanine::ActorRigidPhysicsSettings::ActorRigidPhysicsSettings ( ActorRigid Actor,
btRigidBody *  PhysicsObject 
)

Standard Constructor.

Parameters:
ActorThe actor this settings class configures.
PhysicsObjectThe physics object belonging to the actor this class configures.

Definition at line 177 of file actorphysicssettings.cpp.

Mezzanine::ActorRigidPhysicsSettings::~ActorRigidPhysicsSettings ( ) [virtual]

Class destructor.

Todo:
Occasionally a SIGTRAP occurs here without any breakpoint set while debugging. Needs to be fixed. on Linux it is a SIGSEGV.

Definition at line 190 of file actorphysicssettings.cpp.


Member Function Documentation

void Mezzanine::ActorRigidPhysicsSettings::ApplyForce ( const Vector3 Force) [virtual]

Push/Apply force to an object.

Parameters:
ForceThe amount and direction of the force in a Vector3

Definition at line 285 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::ApplyTorque ( const Vector3 Torque) [virtual]

Spin/Apply Torque to an object.

Parameters:
TorqueThe amount and direction of the torque in a Vector3

Definition at line 288 of file actorphysicssettings.cpp.

Real Mezzanine::ActorRigidPhysicsSettings::GetAngularDamping ( ) const [virtual]

Get the Angular damping.

Returns:
A Real that has the Angular damping.

Definition at line 258 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetAngularVelocity ( ) const [virtual]

Gets the Angular Velocity of this object.

Returns:
Returns the currently set Angular Velocity of this object.

Definition at line 270 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetForce ( ) const [virtual]

Get the total Force/Movement on the actor.

Returns:
A Vector3 with the force of the entire Actor

Definition at line 279 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetIndividualGravity ( ) const [virtual]

Gets the gravity being applied to this object.

This is the gravity applied to this object, which may or may not be the same as the world gravity.

Returns:
Returns a Vector3 representing the gravity currently being applied to this object.

Definition at line 276 of file actorphysicssettings.cpp.

Real Mezzanine::ActorRigidPhysicsSettings::GetLinearDamping ( ) const [virtual]

Get the linear damping.

Returns:
A Real that has the Linear damping.

Definition at line 255 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetLinearVelocity ( ) const [virtual]

Gets the Linear Velocity of this object.

Returns:
Returns the currently set Linear Velocity of this object.

Definition at line 264 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetLocalInertia ( ) const [virtual]

Get the current intertia of the Actor.

Returns:
A Vector3 with the Inertia

Definition at line 294 of file actorphysicssettings.cpp.

Real Mezzanine::ActorRigidPhysicsSettings::GetMass ( ) const [virtual]

Get the total Mass of the actor.

Returns:
A Real with the Mass of the Actor

Definition at line 291 of file actorphysicssettings.cpp.

StickyData * Mezzanine::ActorRigidPhysicsSettings::GetStickyData ( ) const [virtual]

Gets the struct storing the data related to sticky behavior.

Returns:
Returns a pointer to the struct storing the sticky data for this actor.

Definition at line 249 of file actorphysicssettings.cpp.

Vector3 Mezzanine::ActorRigidPhysicsSettings::GetTorque ( ) const [virtual]

Get the Torque/Rotation.

Returns:
A Vector3 with the Torque

Definition at line 282 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::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.

Reimplemented from Mezzanine::ActorBasePhysicsSettings.

Definition at line 365 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::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 quaternion should be appended to.

Reimplemented from Mezzanine::ActorBasePhysicsSettings.

Definition at line 305 of file actorphysicssettings.cpp.

String Mezzanine::ActorRigidPhysicsSettings::SerializableName ( ) [static]

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

Returns:
A string containing "ActorRigidPhysicsSettings"

Reimplemented from Mezzanine::ActorBasePhysicsSettings.

Definition at line 456 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetAngularVelocity ( const Vector3 AngVel) [virtual]

Sets the Angular Velocity of this object.

Parameters:
AngVelVector3 representing the Angular Velocity to be set.

Definition at line 267 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetCollisionShape ( CollisionShape Shape) [virtual]

Sets the collision shape to be used.

Parameters:
ShapeThe shape to be applied.

Reimplemented from Mezzanine::WorldObjectPhysicsSettings.

Definition at line 198 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetDamping ( const Real LinDamping,
const Real AngDamping 
) [virtual]

Sets the Damping for this object.

Both of Linear Damping and Angular Damping default to zero. This is useful if you wish to simulate something like air resistance. Values can range from 0.0 to 1.0.

Parameters:
LinDampingReal representing the amount of Linear Damping(Movement) to be applied.
AngDampingReal representing the amount of Angular Damping(Rotation) to be applied.

Definition at line 252 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetIndividualGravity ( const Vector3 Gravity) [virtual]

Sets the gravity for only this object.

This value will override the world gravity. Should be called after adding to the world. When the object is added to the world the world gravity is applied to it.

Parameters:
GravityVector3 representing the direction and strength of gravity to be applied.

Definition at line 273 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetLinearVelocity ( const Vector3 LinVel) [virtual]

Sets the Linear Velocity of this object.

Parameters:
LinVelVector3 representing the Linear Velocity to be set.

Definition at line 261 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetMass ( Real  NewMass) [virtual]

Change the mass of the object.

Parameters:
NewMassThe amount of mass this should have.

Definition at line 297 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetMass ( Real  NewMass,
const Vector3 NewInertia 
) [virtual]

Change the mass of the object.

Parameters:
NewMassThe amount of mass this should have.
NewInertiaThe new inertia the object has.

Definition at line 300 of file actorphysicssettings.cpp.

void Mezzanine::ActorRigidPhysicsSettings::SetStickyData ( const Whole MaxNumContacts) [virtual]

Sets the basic parameters for enabling sticky behavior with this actor.

Parameters:
MaxNumContactsThe maximum number of object this object can stick to or have stuck to it.

Definition at line 217 of file actorphysicssettings.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines