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

Creates a constraint as configurable as the 6Dof constraint, but has added support for spring motion. More...

#include <generic6dofspringconstraint.h>

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

Public Member Functions

 Generic6DofSpringConstraint (const UInt32 ID, RigidProxy *ProxyA, RigidProxy *ProxyB, const Transform &TransA, const Transform &TransB, PhysicsManager *Creator)
 Two proxy Terse constructor. More...
 
 Generic6DofSpringConstraint (const XML::Node &SelfRoot, PhysicsManager *Creator)
 XML constructor. More...
 
virtual ~Generic6DofSpringConstraint ()
 Class destructor.
 
virtual void CalculateSpringEquilibriumPoint (int Index)
 Automatically assigns the rest point of the spring on the specified axis based on the current offset of both constrained bodies. More...
 
virtual void CalculateSpringEquilibriumPoints ()
 Autogenerates the equalibrium points on each axis of this constraint. More...
 
virtual Vector3 GetAngularSpringDamping () const
 Get the Damping for all Angular Axis. More...
 
virtual Real GetAngularSpringDampingOnAxis (Whole RotationAxis) const
 Gets the damping on a specific angular axis on this constraint. More...
 
virtual Vector3 GetAngularSpringEnabled () const
 Get the Enabled Status for all Angular Axis. More...
 
virtual Boole GetAngularSpringEnabledOnAxis (Whole RotationAxis) const
 Get whether or not a spring is enabled on a specific angular axis on this constraint. More...
 
virtual Vector3 GetAngularSpringEquilibriumPoints () const
 Gets the rest point of the spring on each Angular axis. More...
 
virtual Vector3 GetAngularSpringStiffness () const
 Get the Stiffness for all Angular Axis. More...
 
virtual Real GetAngularSpringStiffnessOnAxis (Whole RotationAxis) const
 Gets the stiffness on a specific angular axis on this constraint. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this Constraint. More...
 
virtual Vector3 GetLinearSpringDamping () const
 Get the Damping for all Linear Axis. More...
 
virtual Real GetLinearSpringDampingOnAxis (Whole TranslationAxis) const
 Gets the damping on a specific linear axis on this constraint. More...
 
virtual Vector3 GetLinearSpringEnabled () const
 Get the Enabled Status for all Linear Axis. More...
 
virtual Boole GetLinearSpringEnabledOnAxis (Whole TranslationAxis) const
 Get whether or not a spring is enabled on a specific linear axis on this constraint. More...
 
virtual Vector3 GetLinearSpringEquilibriumPoints () const
 Gets the rest point of the spring on each Linear axis. More...
 
virtual Vector3 GetLinearSpringStiffness () const
 Get the Stiffness for all Linear Axis. More...
 
virtual Real GetLinearSpringStiffnessOnAxis (Whole TranslationAxis) const
 Gets the stiffness on a specific linear axis on this constraint. More...
 
virtual Real GetSpringDamping (int Index) const
 Retrieve the Damping of the spring on the given axis. More...
 
virtual Boole GetSpringEnabled (int Index) const
 Retrieve the EnabledStatus of the spring on the given axis. More...
 
virtual Real GetSpringEquilibriumPoint (int Index) const
 Gets the rest point of the spring on the specified axis. More...
 
virtual Real GetSpringStiffness (int Index) const
 Retrieve the Stiffness of the spring on the given axis. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void SetAngularSpringDamping (const Vector3 &Damps)
 Set the Damping of the springs on each Angular Axis. More...
 
virtual void SetAngularSpringDampingOnAxis (const Real Damping, Whole RotationAxis)
 Sets the damping on a specific angular axis on this constraint. More...
 
virtual void SetAngularSpringEnabled (const Vector3 &Enableness)
 Set the Stiffness of the springs on each Angular Axis. More...
 
virtual void SetAngularSpringEnabledOnAxis (const Boole Enabled, Whole RotationAxis)
 Set whether or not a spring is enabled on a specific angular axis on this constraint. More...
 
virtual void SetAngularSpringStiffness (const Vector3 &Stiffness)
 Set the Stiffness of the springs on each Angular Axis. More...
 
virtual void SetAngularSpringStiffnessOnAxis (const Real Stiffness, Whole RotationAxis)
 Sets the stiffness on a specific angular axis on this constraint. More...
 
virtual void SetLinearSpringDamping (const Vector3 &Damps)
 Set the Damping of the springs on each Linear Axis. More...
 
virtual void SetLinearSpringDampingOnAxis (const Real Damping, Whole TranslationAxis)
 Sets the damping on a specific linear axis on this constraint. More...
 
virtual void SetLinearSpringEnabled (const Vector3 &Enabled)
 Set whether or not a spring is enabled on a specific linear axis on this constraint. More...
 
virtual void SetLinearSpringEnabledOnAxis (const Boole Enabled, Whole TranslationAxis)
 Set whether or not a spring is enabled on a specific linear axis on this constraint. More...
 
virtual void SetLinearSpringStiffness (const Vector3 &Stiffness)
 Set the Stiffness of the springs on each Linear Axis. More...
 
virtual void SetLinearSpringStiffnessOnAxis (const Real Stiffness, Whole TranslationAxis)
 Sets the stiffness on a specific linear axis on this constraint. More...
 
virtual void SetSpringDamping (int Index, Real Damping)
 Set the spring Damping on a given axis. More...
 
virtual void SetSpringEnabled (int Index, Boole Enable)
 Set the spring's enabled status on a given axis. More...
 
virtual void SetSpringEquilibriumPoint (int Index, const Real Point)
 Sets the rest point of the spring on the specified axis. More...
 
virtual void SetSpringStiffness (int Index, Real Stiffness)
 Set the spring stiffness on a given axis. More...
 
- Public Member Functions inherited from Mezzanine::Physics::Generic6DofConstraint
 Generic6DofConstraint (const UInt32 ID, RigidProxy *ProxyA, RigidProxy *ProxyB, const Transform &TransA, const Transform &TransB, PhysicsManager *Creator)
 Dual body constructor. More...
 
 Generic6DofConstraint (const UInt32 ID, RigidProxy *ProxyB, const Transform &TransB, PhysicsManager *Creator)
 Single body constructor. More...
 
 Generic6DofConstraint (const XML::Node &SelfRoot, PhysicsManager *Creator)
 XML constructor. More...
 
virtual ~Generic6DofConstraint ()
 Class destructor.
 
virtual btTypedConstraint * _GetConstraintBase () const
 Get the Bullet constraint that this class encapsulates. More...
 
virtual Whole ConvertAngularTo6Axis (const Whole Axis) const
 Convert an angular Axis from a 3 digit range to a full 6 digit range. More...
 
virtual Whole ConvertFrom6AxisTo3Axis (const Whole Axis) const
 Convert an Axis from a full 6 digit range to a 3 digit range. More...
 
virtual Vector3 GetAngularLimitLower () const
 Get the Upper limits on rotation. More...
 
Real GetAngularLimitLowerOnAxis (Whole RotationAxis) const
 Get a specific lower rotation limit. More...
 
virtual Vector3 GetAngularLimitMaxForce () const
 Get the Maximimum amount of force applied to ensure limits are not surpassed. More...
 
virtual Real GetAngularLimitMaxForceOnAxis (Whole Axis) const
 Get the Maximimum amount of force applied to ensure a limit one axis is not surpassed. More...
 
virtual Vector3 GetAngularLimitUpper () const
 Get the Power limits on rotation. More...
 
Real GetAngularLimitUpperOnAxis (Whole RotationAxis) const
 Get a specific upper rotation limit. More...
 
virtual Vector3 GetAngularMotorDamping () const
 Get the Damping for all Angular Axis. More...
 
virtual Real GetAngularMotorDampingOnAxis (Whole Axis) const
 Get the Damping for one given Axis. More...
 
virtual Vector3 GetAngularMotorEnabled () const
 Get a Vector3 with 3 zero or nonzero values that store whether or not a given rotational motor is enable. More...
 
virtual Boole GetAngularMotorEnabledOnAxis (Whole Axis) const
 Is a specific rotational motor enabled. More...
 
virtual Vector3 GetAngularMotorMaxForce () const
 Get the Max Motor Force for each Axis. More...
 
virtual Real GetAngularMotorMaxForceOnAxis (Whole Axis) const
 Get the Max motor Force on a certain Axis. More...
 
virtual Vector3 GetAngularMotorRestitution () const
 Get the Restitution values for all three axis. More...
 
virtual Real GetAngularMotorRestitutionOnAxis (Whole Axis) const
 Get the Restitution/Bounciness for a single Axis. More...
 
virtual Vector3 GetAngularMotorTargetVelocity () const
 Get the target velocity for all angular Axis. More...
 
virtual Real GetAngularMotorTargetVelocityOnAxis (Whole Axis) const
 Get the Target Velocity for one axis. More...
 
virtual Real GetLinearLimitDamping () const
 Get the Damping of the linear Limits. More...
 
virtual Vector3 GetLinearLimitLower () const
 Get the Upper limits on translation. More...
 
Real GetLinearLimitLowerOnAxis (Whole TranslationAxis) const
 Get a specific lower translation limit. More...
 
virtual Real GetLinearLimitRestitution () const
 Get the Restitution of the linear Limits. More...
 
virtual Real GetLinearLimitSoftness () const
 Get the Softness of the linear Limits. More...
 
virtual Vector3 GetLinearLimitUpper () const
 Get the lower limits on translation. More...
 
Real GetLinearLimitUpperOnAxis (Whole TranslationAxis) const
 Get a specific upper translation limit. More...
 
virtual Vector3 GetLinearMotorEnabled () const
 Get a Vector3 with 3 zero or nonzero values that store whether or not a given rotational motor is enable. More...
 
virtual Boole GetLinearMotorEnabledOnAxis (Whole Axis) const
 Is a specific Linear motor enabled. More...
 
virtual Vector3 GetLinearMotorMaxForce () const
 Get the Max Motor Force for each Axis. More...
 
virtual Real GetLinearMotorMaxForceOnAxis (Whole Axis) const
 Get the Max motor Force on a certain Axis. More...
 
virtual Vector3 GetLinearMotorTargetVelocity () const
 Get the target velocity for all Linear Axis. More...
 
virtual Real GetLinearMotorTargetVelocityOnAxis (Whole Axis) const
 Get the Target Velocity for one axis. More...
 
virtual Vector3 GetPivotALocation () const
 Gets the location of the pivot relative to ProxA's Center of gravity. More...
 
virtual Quaternion GetPivotARotation () const
 Gets the relative rotation for ProxA. More...
 
virtual Transform GetPivotATransform () const
 Gets the current Rotation and Location of ProxyA. More...
 
virtual Vector3 GetPivotBLocation () const
 Gets the location of the pivot relative to ProxB's Center of gravity. More...
 
virtual Quaternion GetPivotBRotation () const
 Gets the relative rotation for ProxB. More...
 
virtual Transform GetPivotBTransform () const
 Gets the current Rotation and Location of ProxyB. More...
 
virtual Boole GetUseFrameOffset () const
 Gets whether or not an offset of the constraint frame should be used to calculate internal data. More...
 
Boole GetUseLinearReferenceFrameA () const
 Gets whether or not to perform linear math from ProxyA's perspective. More...
 
virtual Constraint::AxisList GetValidAngularAxes () const
 Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation) More...
 
virtual Constraint::AxisList GetValidLinearAxes () const
 Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation) More...
 
virtual Constraint::ParamList GetValidParamsOnAxis (int Axis) const
 Get a sorted (low to high) list of Parameters that are valid on this Axis. More...
 
virtual Boole HasParamBeenSet (ConstraintParam Param, int Axis) const
 
virtual void SetAngularLimitLower (const Vector3 &Limit)
 Set the Lower limits on rotation. More...
 
void SetAngularLimitLowerOnAxis (const Real Limit, Whole RotationAxis)
 Sets the lower rotation limit on a specific axis of the constraint. More...
 
virtual void SetAngularLimitMaxForce (const Vector3 &MaxLimitForces)
 Set the Maximimum amount of force applied to ensure limits are not surpassed. More...
 
virtual void SetAngularLimitMaxForceOnAxis (const Real MaxLimitForce, Whole Axis)
 Set the Maximimum amount of force applied to ensure a limit on one axis is not surpassed. More...
 
virtual void SetAngularLimitUpper (const Vector3 &Limit)
 Set the Upper limits on rotation. More...
 
void SetAngularLimitUpperOnAxis (const Real Limit, Whole RotationAxis)
 Sets the upper rotation limit on a specific axis of the constraint. More...
 
virtual void SetAngularMotorDamping (const Vector3 &Dampings)
 Set the Angular Motor Damping for each Angular Axis. More...
 
virtual void SetAngularMotorDampingOnAxis (const Real Damping, Whole Axis)
 For one Axis, set the Damping. More...
 
virtual void SetAngularMotorEnabled (const Vector3 &Enableds)
 Set whether or not the motor is enabled for all Axis Simultaneously. More...
 
virtual void SetAngularMotorEnabledOnAxis (const Boole Enabled, Whole Axis)
 For one Axis, set whether or not the motor is enabled. More...
 
virtual void SetAngularMotorMaxForce (const Vector3 &Forces)
 Set the Angular Motor Maximum force on all 3 rotational axis. More...
 
virtual void SetAngularMotorMaxForceOnAxis (const Real Force, Whole Axis)
 For one Axis, set the Maximimum Motor Force. More...
 
virtual void SetAngularMotorRestitution (const Vector3 &Restitutions)
 Set the Bounciness/Restition for rotation on all three Axis. More...
 
virtual void SetAngularMotorRestitutionOnAxis (const Real Restitution, Whole Axis)
 For one Axis, set the Restitution/Bounciness/. More...
 
virtual void SetAngularMotorTargetVelocity (const Vector3 &Velocities)
 Set the Target velocity of the motor on each anuglar axis. More...
 
virtual void SetAngularMotorTargetVelocityOnAxis (const Real Velocity, Whole Axis)
 For one Axis, set the target velocity of the angular motor. More...
 
virtual void SetLimit (Whole Axis, Real Lower, Real Upper)
 Change the upper and lower limit for one axis of translation or rotation limit. More...
 
virtual void SetLinearLimitDamping (const Real Damping)
 Set the Damping of the linear Limits. More...
 
virtual void SetLinearLimitLower (const Vector3 &Limit)
 Set the Upper limits on translation. More...
 
void SetLinearLimitLowerOnAxis (const Real Limit, Whole TranslationAxis)
 Sets the lower linear limit on a specific axis of the constraint. More...
 
virtual void SetLinearLimitRestitution (const Real Restitution)
 Set the Restitution of the linear Limits. More...
 
virtual void SetLinearLimitSoftness (const Real Softness)
 Set the Softness of the linear Limits. More...
 
virtual void SetLinearLimitUpper (const Vector3 &Limit)
 Set the lower limits on translation. More...
 
void SetLinearLimitUpperOnAxis (const Real Limit, Whole TranslationAxis)
 Sets the upper linear limit on a specific axis of the constraint. More...
 
virtual void SetLinearMotorEnabled (const Vector3 &Enableds)
 Set whether or not the motor is enabled for all Linear Axis Simultaneously. More...
 
virtual void SetLinearMotorEnabledOnAxis (const Boole Enabled, Whole Axis)
 For one Axis, set whether or not the motor is enabled. More...
 
virtual void SetLinearMotorMaxForce (const Vector3 &Forces)
 Set the Linear Motor Maximum force on all 3 translation axis. More...
 
virtual void SetLinearMotorMaxForceOnAxis (const Real Force, Whole Axis)
 For one Axis, set the Maximimum Motor Force. More...
 
virtual void SetLinearMotorTargetVelocity (const Vector3 &Velocities)
 Set the Target velocity of the motor on each anuglar axis. More...
 
virtual void SetLinearMotorTargetVelocityOnAxis (const Real Velocity, Whole Axis)
 For one Axis, set the target velocity of the Linear motor. More...
 
virtual void SetPivotALocation (const Vector3 &Location)
 Sets The relative location of the pivot from ProxA's Center of gravity. More...
 
virtual void SetPivotARotation (const Quaternion &Rotation)
 Sets The relative rotation of ProxA. More...
 
virtual void SetPivotATransform (const Transform &TransA)
 Sets the Position and Rotation for the first body using a Transform. More...
 
virtual void SetPivotBLocation (const Vector3 &Location)
 Sets The relative location of the pivot from ProxB's Center of gravity. More...
 
virtual void SetPivotBRotation (const Quaternion &Rotation)
 Sets The relative rotation of ProxB. More...
 
virtual void SetPivotBTransform (const Transform &TransB)
 Sets the Position and Rotation for the second body using a Transform. More...
 
virtual void SetPivotTransforms (const Transform &TransA, const Transform &TransB)
 Sets the Position and Rotation for the first and second body using a Transform. More...
 
virtual void SetUseFrameOffset (const Boole FrameOffset)
 Sets whether or not an offset of the constraint frame should be used to calculate internal data. More...
 
void SetUseLinearReferenceFrameA (const Boole UseRefFrameA)
 Sets whether or not to perform linear math from ProxyA's perspective. More...
 
- Public Member Functions inherited from Mezzanine::Physics::DualTransformConstraint
virtual ~DualTransformConstraint ()
 Class destructor.
 
virtual void ProtoDeSerializeInitData (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and initializes a new internal object with it. More...
 
virtual void ProtoSerializeInitData (XML::Node &SelfRoot) const
 Convert the data needed to initialize this class to an XML::Node ready for serialization. More...
 
- Public Member Functions inherited from Mezzanine::Physics::Constraint
virtual ~Constraint ()
 Class destructor.
 
virtual void EnableConstraint (const Boole Enable)
 Enables or disables this constraint. More...
 
virtual Boole GetAllowCollisions () const
 Gets whether or not collisions can/will occur between the two constrained bodies. More...
 
virtual UInt32 GetConstraintID () const
 Gets the unique ID of this constraint. More...
 
virtual Real GetParam (ConstraintParam Param, int Axis=-1) const
 Gets value of constraint parameters. More...
 
virtual RigidProxyGetProxyA () const
 Gets the first Proxy this constraint applies to. More...
 
virtual RigidProxyGetProxyB () const
 Gets the second Proxy this constraint applies to. More...
 
virtual AxisList GetValidAxes () const
 Get a sorted (low to high) list of All Valid Axis. More...
 
virtual ParamList GetValidParams () const
 Get A sorted (low to high) list of Parameters that are valid on all Axis. More...
 
virtual Boole IsConstraintEnabled () const
 Gets whether or not this constraint is enabled. More...
 
virtual Boole IsParamValidOnAxis (ConstraintParam Param, int Axis) const
 Is a certain Parameter valid on a certain axis. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoDeSerializeGlobalOverrides (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the global overrides of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeGlobalOverrides (XML::Node &SelfRoot) const
 Convert the global overrides of this class to an XML::Node ready for serialization. More...
 
virtual void SetAllowCollisions (const Boole Allow)
 Sets whether collisions between the two constrained bodies should occur. More...
 
virtual void SetParam (ConstraintParam Param, Real Value, int Axis=-1)
 Provides override of constraint parameters. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Physics::Generic6DofConstraint
static String GetSerializableName ()
 Get the name of the the XML tag the class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Physics::DualTransformConstraint
static String GetSerializableName ()
 Get the name of the the XML tag the class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Physics::Constraint
static String GetSerializableName ()
 Get the name of the the XML tag the class will leave behind as its instances are serialized. More...
 

Protected Member Functions

 Generic6DofSpringConstraint (const UInt32 ID, RigidProxy *Prox1, PhysicsManager *Creator)
 Single body inheritance constructor. More...
 
 Generic6DofSpringConstraint (const UInt32 ID, RigidProxy *Prox1, RigidProxy *Prox2, PhysicsManager *Creator)
 Dual body inheritance constructor. More...
 
virtual void CreateConstraint (RigidProxy *RigidA, RigidProxy *RigidB, const Transform &TransA, const Transform &TransB)
 Creates the internal constraint. More...
 
virtual btGeneric6DofSpringConstraint * Generic6dofSpring () const
 
- Protected Member Functions inherited from Mezzanine::Physics::Generic6DofConstraint
 Generic6DofConstraint (const UInt32 ID, RigidProxy *Prox1, PhysicsManager *Creator)
 Single body inheritance constructor. More...
 
 Generic6DofConstraint (const UInt32 ID, RigidProxy *Prox1, RigidProxy *Prox2, PhysicsManager *Creator)
 Dual body inheritance constructor. More...
 
virtual void DestroyConstraint ()
 Destroys the internal constraint. More...
 
- Protected Member Functions inherited from Mezzanine::Physics::DualTransformConstraint
 DualTransformConstraint (const UInt32 ID, RigidProxy *Prox1, PhysicsManager *Creator)
 Single body inheritance constructor. More...
 
 DualTransformConstraint (const UInt32 ID, RigidProxy *Prox1, RigidProxy *Prox2, PhysicsManager *Creator)
 Dual body inheritance constructor. More...
 
- Protected Member Functions inherited from Mezzanine::Physics::Constraint
 Constraint (const UInt32 ID, PhysicsManager *Creator)
 Zero body constructor. More...
 
 Constraint (const UInt32 ID, RigidProxy *Prox1, PhysicsManager *Creator)
 Single body constructor. More...
 
 Constraint (const UInt32 ID, RigidProxy *Prox1, RigidProxy *Prox2, PhysicsManager *Creator)
 Dual body constructor. More...
 

Additional Inherited Members

- Public Types inherited from Mezzanine::Physics::Generic6DofConstraint
enum  UsableAxis {
  LinearStart = 0, LinearX = 0, LinearY = 1, LinearZ = 2,
  LinearEnd = 3, AngularStart = 3, AngularX = 3, AngularY = 4,
  AngularZ = 5, AngularEnd = 6, AngularXAsRotationAxis = 0, AngularYAsRotationAxis = 1,
  AngularZAsRotationAxis = 2
}
 Identify the Axis a bit easier when iterating over them is less convienent than typing an Identifier. More...
 
- Public Types inherited from Mezzanine::Physics::Constraint
typedef std::vector< int > AxisList
 Used to Store lists of Int Axis for return types. More...
 
typedef std::vector< ConstraintParamParamList
 Used to Store lists of param for return types.
 
- Protected Attributes inherited from Mezzanine::Physics::Generic6DofConstraint
btGeneric6DofConstraint * Generic6dof
 The internal constraint that this class encapsulates. More...
 
- Protected Attributes inherited from Mezzanine::Physics::Constraint
Boole AllowCollisions
 Whether or not collisions will be allowed to occure between the constrained bodies. More...
 
UInt32 ConstraintID
 The unique ID used to identify this constraint. More...
 
Boole Enabled
 Whether or not the constraint is currently taking effect. More...
 
PhysicsManagerManager
 This is a pointer to the physics manager that created and owns this constraint. More...
 
RigidProxyProxA
 The first Collidable this constraint applies to. More...
 
RigidProxyProxB
 The second Collidable this constraint applies to. More...
 

Detailed Description

Creates a constraint as configurable as the 6Dof constraint, but has added support for spring motion.

When using functions of this class that require you to specify the index, the springs are arranged like so:

Definition at line 62 of file generic6dofspringconstraint.h.

Constructor & Destructor Documentation

Mezzanine::Physics::Generic6DofSpringConstraint::Generic6DofSpringConstraint ( const UInt32  ID,
RigidProxy Prox1,
PhysicsManager Creator 
)
protected

Single body inheritance constructor.

Parameters
IDThe unique identifier assigned to this constraint.
Prox1A pointer to the first/only proxy that will be constrained.
CreatorA pointer to the manager that created this constraint.

Definition at line 58 of file generic6dofspringconstraint.cpp.

Mezzanine::Physics::Generic6DofSpringConstraint::Generic6DofSpringConstraint ( const UInt32  ID,
RigidProxy Prox1,
RigidProxy Prox2,
PhysicsManager Creator 
)
protected

Dual body inheritance constructor.

Parameters
IDThe unique identifier assigned to this constraint.
Prox1A pointer to the first proxy that will be constrained.
Prox2A pointer to the second proxy that will be constrained.
CreatorA pointer to the manager that created this constraint.

Definition at line 62 of file generic6dofspringconstraint.cpp.

Mezzanine::Physics::Generic6DofSpringConstraint::Generic6DofSpringConstraint ( const UInt32  ID,
RigidProxy ProxyA,
RigidProxy ProxyB,
const Transform TransA,
const Transform TransB,
PhysicsManager Creator 
)

Two proxy Terse constructor.

Parameters
IDThe unique identifier assigned to this constraint.
ProxyAThe First proxy to be bound.
ProxyBThe Second proxy to be bound.
TransAThe offset and rotation from ProxyAs center of gravity to get to match an offset from ProxyB.
TransBThe offset and rotation from ProxyBs center of gravity.
CreatorA pointer to the manager that created this constraint.

Definition at line 66 of file generic6dofspringconstraint.cpp.

Mezzanine::Physics::Generic6DofSpringConstraint::Generic6DofSpringConstraint ( const XML::Node SelfRoot,
PhysicsManager Creator 
)

XML constructor.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
CreatorA pointer to the manager that created this constraint.

Definition at line 70 of file generic6dofspringconstraint.cpp.

Member Function Documentation

void Mezzanine::Physics::Generic6DofSpringConstraint::CalculateSpringEquilibriumPoint ( int  Index)
virtual

Automatically assigns the rest point of the spring on the specified axis based on the current offset of both constrained bodies.

Parameters
IndexThe Axis to work with.

Definition at line 198 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::CalculateSpringEquilibriumPoints ( )
virtual

Autogenerates the equalibrium points on each axis of this constraint.

Remarks
The current offsets of both bodies in constraint space is what is used as the equalibrium points for each axis.

Definition at line 90 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::CreateConstraint ( RigidProxy RigidA,
RigidProxy RigidB,
const Transform TransA,
const Transform TransB 
)
protectedvirtual

Creates the internal constraint.

Remarks
This methods exists primarily as a convenience for serialization, and shouldn't be called unless it is known to be safe.
Parameters
RigidAA pointer to the first Proxy to be constrained.
RigidBA pointer to the second Proxy to be constrained.
TransAThe offset to place the constraint in the first proxys local space.
TransBThe offset to place the constraint in the second proxys local space.

Reimplemented from Mezzanine::Physics::Generic6DofConstraint.

Reimplemented in Mezzanine::Physics::Hinge2Constraint.

Definition at line 80 of file generic6dofspringconstraint.cpp.

btGeneric6DofSpringConstraint * Mezzanine::Physics::Generic6DofSpringConstraint::Generic6dofSpring ( ) const
protectedvirtual

Definition at line 77 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringDamping ( ) const
virtual

Get the Damping for all Angular Axis.

Returns
A Vector3 with the Damping on the X, Y and Z Angular Axis.

Definition at line 153 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringDampingOnAxis ( Whole  RotationAxis) const
virtual

Gets the damping on a specific angular axis on this constraint.

Parameters
RotationAxisThe Axis to work with.
Returns
Returns the currently set damping on the specified axis.

Definition at line 159 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringEnabled ( ) const
virtual

Get the Enabled Status for all Angular Axis.

Returns
A Vector3 with the Enabled Status on the X, Y and Z Angular Axis.

Definition at line 165 of file generic6dofspringconstraint.cpp.

Boole Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringEnabledOnAxis ( Whole  RotationAxis) const
virtual

Get whether or not a spring is enabled on a specific angular axis on this constraint.

Parameters
RotationAxisThe Axis to work with.
Returns
Returns true if the spring on the specified axis is enabled, false otherwise.

Definition at line 171 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringEquilibriumPoints ( ) const
virtual

Gets the rest point of the spring on each Angular axis.

Returns
Returns a Vector3 containing the values of the rest position on the respective axis in constraint space.

Definition at line 174 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringStiffness ( ) const
virtual

Get the Stiffness for all Angular Axis.

Returns
A Vector3 with the Stiffness on the X, Y and Z Angular Axis.

Definition at line 141 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetAngularSpringStiffnessOnAxis ( Whole  RotationAxis) const
virtual

Gets the stiffness on a specific angular axis on this constraint.

Parameters
RotationAxisThe Axis to work with.
Returns
Returns the currently set stiffness on the specified axis.

Definition at line 147 of file generic6dofspringconstraint.cpp.

String Mezzanine::Physics::Generic6DofSpringConstraint::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this Constraint.

Note
When creating a new Constraint class verify this method has a valid return for it in order for serialization to work properly.
Returns
Returns the name of the XML tag from the most derived class of "this".

Reimplemented from Mezzanine::Physics::Generic6DofConstraint.

Reimplemented in Mezzanine::Physics::Hinge2Constraint.

Definition at line 331 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringDamping ( ) const
virtual

Get the Damping for all Linear Axis.

Returns
A Vector3 with the Damping on the X, Y and Z Linear Axis.

Definition at line 111 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringDampingOnAxis ( Whole  TranslationAxis) const
virtual

Gets the damping on a specific linear axis on this constraint.

Parameters
TranslationAxisThe Axis to work with.
Returns
Returns the currently set damping on the specified axis.

Definition at line 117 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringEnabled ( ) const
virtual

Get the Enabled Status for all Linear Axis.

Returns
A Vector3 with the Enabled Status on the X, Y and Z Linear Axis.

Definition at line 123 of file generic6dofspringconstraint.cpp.

Boole Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringEnabledOnAxis ( Whole  TranslationAxis) const
virtual

Get whether or not a spring is enabled on a specific linear axis on this constraint.

Parameters
TranslationAxisThe Axis to work with.
Returns
Returns true if the spring on the specified axis is enabled, false otherwise.

Definition at line 129 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringEquilibriumPoints ( ) const
virtual

Gets the rest point of the spring on each Linear axis.

Returns
Returns a Vector3 containing the values of the rest position on the respective axis in constraint space.

Definition at line 132 of file generic6dofspringconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringStiffness ( ) const
virtual

Get the Stiffness for all Linear Axis.

Returns
A Vector3 with the Stiffness on the X, Y and Z Linear Axis.

Definition at line 99 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetLinearSpringStiffnessOnAxis ( Whole  TranslationAxis) const
virtual

Gets the stiffness on a specific linear axis on this constraint.

Parameters
TranslationAxisThe Axis to work with.
Returns
Returns the currently set stiffness on the specified axis.

Definition at line 105 of file generic6dofspringconstraint.cpp.

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

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

Returns
A string containing the name of this class.

Definition at line 334 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetSpringDamping ( int  Index) const
virtual

Retrieve the Damping of the spring on the given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
Returns
A real with the requested value.

Definition at line 189 of file generic6dofspringconstraint.cpp.

Boole Mezzanine::Physics::Generic6DofSpringConstraint::GetSpringEnabled ( int  Index) const
virtual

Retrieve the EnabledStatus of the spring on the given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
Returns
A Boole with the requested value.

Definition at line 195 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetSpringEquilibriumPoint ( int  Index) const
virtual

Gets the rest point of the spring on the specified axis.

Parameters
IndexThe Axis to work with.

Definition at line 204 of file generic6dofspringconstraint.cpp.

Real Mezzanine::Physics::Generic6DofSpringConstraint::GetSpringStiffness ( int  Index) const
virtual

Retrieve the Stiffness of the spring on the given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
Returns
A real with the requested value;

Definition at line 183 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual

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

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented from Mezzanine::Physics::Generic6DofConstraint.

Definition at line 255 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual

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

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented from Mezzanine::Physics::Generic6DofConstraint.

Definition at line 210 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringDamping ( const Vector3 Damps)
virtual

Set the Damping of the springs on each Angular Axis.

Parameters
DampsA Vector3 containing the X, Y and Z desired damping.

Definition at line 150 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringDampingOnAxis ( const Real  Damping,
Whole  RotationAxis 
)
virtual

Sets the damping on a specific angular axis on this constraint.

Parameters
DampingThe amount of damping to apply to all movement on the spring.
RotationAxisThe Axis to work with.

Definition at line 156 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringEnabled ( const Vector3 Enableness)
virtual

Set the Stiffness of the springs on each Angular Axis.

Parameters
StiffiesA Vector3 containing the X, Y and Z enabled statuses. This is interpretted as 0 for false and any other value for true.

Definition at line 162 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringEnabledOnAxis ( const Boole  Enabled,
Whole  RotationAxis 
)
virtual

Set whether or not a spring is enabled on a specific angular axis on this constraint.

Parameters
EnabledThe enabled status of the spring on the specified axis.
RotationAxisThe Axis to work with.

Definition at line 168 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringStiffness ( const Vector3 Stiffness)
virtual

Set the Stiffness of the springs on each Angular Axis.

Parameters
StiffnessA Vector3 containing the X, Y and Z stiffnesses.

Definition at line 138 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetAngularSpringStiffnessOnAxis ( const Real  Stiffness,
Whole  RotationAxis 
)
virtual

Sets the stiffness on a specific angular axis on this constraint.

Parameters
StiffnessThe amount of resistence to compressing force the spring should have.
RotationAxisThe Axis to work with.

Definition at line 144 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringDamping ( const Vector3 Damps)
virtual

Set the Damping of the springs on each Linear Axis.

Parameters
DampsA Vector3 containing the X, Y and Z desired damping.

Definition at line 108 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringDampingOnAxis ( const Real  Damping,
Whole  TranslationAxis 
)
virtual

Sets the damping on a specific linear axis on this constraint.

Parameters
DampingThe amount of damping to apply to all movement on the spring.
TranslationAxisThe Axis to work with.

Definition at line 114 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringEnabled ( const Vector3 Enabled)
virtual

Set whether or not a spring is enabled on a specific linear axis on this constraint.

Parameters
StiffiesA Vector3 containing the X, Y and Z enabled statuses. This is interpretted as 0 for false and any other value for true.

Definition at line 120 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringEnabledOnAxis ( const Boole  Enabled,
Whole  TranslationAxis 
)
virtual

Set whether or not a spring is enabled on a specific linear axis on this constraint.

Parameters
EnabledThe enabled status of the spring on the specified axis.
TranslationAxisThe Axis to work with.

Definition at line 126 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringStiffness ( const Vector3 Stiffness)
virtual

Set the Stiffness of the springs on each Linear Axis.

Parameters
StiffnessA Vector3 containing the X, Y and Z stiffnesses.

Definition at line 96 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetLinearSpringStiffnessOnAxis ( const Real  Stiffness,
Whole  TranslationAxis 
)
virtual

Sets the stiffness on a specific linear axis on this constraint.

Parameters
StiffnessThe amount of resistence to compressing force the spring should have.
TranslationAxisThe Axis to work with.

Definition at line 102 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetSpringDamping ( int  Index,
Real  Damping 
)
virtual

Set the spring Damping on a given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
DampingA real with the new desired Damping.

Definition at line 186 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetSpringEnabled ( int  Index,
Boole  Enable 
)
virtual

Set the spring's enabled status on a given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
EnableA Boole with the spring's enabled status.

Definition at line 192 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetSpringEquilibriumPoint ( int  Index,
const Real  Point 
)
virtual

Sets the rest point of the spring on the specified axis.

Parameters
IndexThe Axis to work with.
PointThe position in constraint space on the specified Axis to set as the rest spot.

Definition at line 201 of file generic6dofspringconstraint.cpp.

void Mezzanine::Physics::Generic6DofSpringConstraint::SetSpringStiffness ( int  Index,
Real  Stiffness 
)
virtual

Set the spring stiffness on a given axis.

Parameters
IndexThe Desired axis. This accepts 0,1,2 for Linear X,Y, and Z or 3,4,5 for Angular X,Y, and Z. This can also accept Item from this classes Usable Axis enum;
StiffnessA real with the new desired stiffness.

Definition at line 180 of file generic6dofspringconstraint.cpp.


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