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

This is a constraint for permitting movement on only a singular linear or angular axis. More...

#include <sliderconstraint.h>

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

Public Member Functions

 SliderConstraint (const UInt32 ID, RigidProxy *ProxyA, RigidProxy *ProxyB, const Transform &TransA, const Transform &TransB, PhysicsManager *Creator)
 Two body Terse constructor. More...
 
 SliderConstraint (const UInt32 ID, RigidProxy *ProxyA, const Transform &TransA, PhysicsManager *Creator)
 Standard one body constructor. More...
 
 SliderConstraint (const XML::Node &SelfRoot, PhysicsManager *Creator)
 XML constructor. More...
 
virtual ~SliderConstraint ()
 Class destructor.
 
virtual btTypedConstraint * _GetConstraintBase () const
 Get the Bullet constraint that this class encapsulates. More...
 
virtual Real GetDampingDirAng () const
 Gets the damping value to be used when within the angular limits of this constraint. More...
 
virtual Real GetDampingDirLin () const
 Gets the damping value to be used when within the linear limits of this constraint. More...
 
virtual Real GetDampingLimAng () const
 Gets the damping value to be used when hitting the angular limit of this constraint. More...
 
virtual Real GetDampingLimLin () const
 Gets the damping value to be used when hitting the linear limit of this constraint. More...
 
virtual Real GetDampingOrthoAng () const
 Gets the damping value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual Real GetDampingOrthoLin () const
 Gets the damping value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this Constraint. More...
 
virtual Real GetLowerAngLimit () const
 Gets the lower angular limit of this slider. More...
 
virtual Real GetLowerLinLimit () const
 Gets the lower linear limit of this slider. More...
 
virtual Real GetMaxAngMotorForce () const
 Gets the maximum force allowed to be applied on the angular axis of this constraint. More...
 
virtual Real GetMaxLinMotorForce () const
 Gets the maximum force allowed to be applied on the linear axis of this constraint. 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 GetPoweredAngMotor () const
 Gets whether or not the motor for the angular axis of this constraint is enabled. More...
 
virtual Boole GetPoweredLinMotor () const
 Gets whether or not the motor for the linear axis of this constraint is enabled. More...
 
virtual Real GetRestitutionDirAng () const
 Gets the restitution value to be used when within the angular limits of this constraint. More...
 
virtual Real GetRestitutionDirLin () const
 Gets the restitution value to be used when within the linear limits of this constraint. More...
 
virtual Real GetRestitutionLimAng () const
 Gets the restitution value to be used when hitting the angular limit of this constraint. More...
 
virtual Real GetRestitutionLimLin () const
 Gets the restitution value to be used when hitting the linear limit of this constraint. More...
 
virtual Real GetRestitutionOrthoAng () const
 Gets the restitution value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual Real GetRestitutionOrthoLin () const
 Gets the restitution value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual Real GetSoftnessDirAng () const
 Gets the softness value to be used when within the angular limits of this constraint. More...
 
virtual Real GetSoftnessDirLin () const
 Gets the softness value to be used when within the linear limits of this constraint. More...
 
virtual Real GetSoftnessLimAng () const
 Gets the softness value to be used when hitting the angular limit of this constraint. More...
 
virtual Real GetSoftnessLimLin () const
 Gets the softness value to be used when hitting the linear limit of this constraint. More...
 
virtual Real GetSoftnessOrthoAng () const
 Gets the softness value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual Real GetSoftnessOrthoLin () const
 Gets the softness value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual Real GetTargetAngMotorVelocity () const
 Gets the target velocity of the motor on the angular axis of ths constraint. More...
 
virtual Real GetTargetLinMotorVelocity () const
 Gets the target velocity of the motor on the linear axis of ths constraint. More...
 
virtual Real GetUpperAngLimit () const
 Gets the upper angular limit of this slider. More...
 
virtual Real GetUpperLinLimit () const
 Gets the upper linear limit of this slider. More...
 
virtual Boole GetUseFrameOffset () const
 Gets whether or not an offset of the constraint frame should be used to calculate internal data. 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 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 SetDampingDirAng (const Real DampingDirAng)
 Sets the damping value to be used when within the angular limits of this constraint. More...
 
virtual void SetDampingDirLin (const Real DampingDirLin)
 Sets the damping value to be used when within the linear limits of this constraint. More...
 
virtual void SetDampingLimAng (const Real DampingLimAng)
 Sets the damping value to be used when hitting the angular limit of this constraint. More...
 
virtual void SetDampingLimLin (const Real DampingLimLin)
 Sets the damping value to be used when hitting the linear limit of this constraint. More...
 
virtual void SetDampingOrthoAng (const Real DampingOrthoAng)
 Sets the damping value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual void SetDampingOrthoLin (const Real DampingOrthoLin)
 Sets the damping value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual void SetLowerAngLimit (const Real LowerLimit)
 Sets the lower angular limit of this slider. More...
 
virtual void SetLowerLinLimit (const Real LowerLimit)
 Sets the lower linear limit of this slider. More...
 
virtual void SetMaxAngMotorForce (const Real MaxAngMotorForce)
 Sets the maximum force allowed to be applied on the angular axis of this constraint. More...
 
virtual void SetMaxLinMotorForce (const Real MaxLinMotorForce)
 Sets the maximum force allowed to be applied on the linear axis of this constraint. 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 &TranA)
 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 &TranB)
 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 SetPoweredAngMotor (const Boole OnOff)
 Sets whether or not the motor for the angular axis of this constraint is enabled. More...
 
virtual void SetPoweredLinMotor (const Boole OnOff)
 Sets whether or not the motor for the linear axis of this constraint is enabled. More...
 
virtual void SetRestitutionDirAng (const Real RestitutionDirAng)
 Sets the restitution value to be used when within the angular limits of this constraint. More...
 
virtual void SetRestitutionDirLin (const Real RestitutionDirLin)
 Sets the restitution value to be used when within the linear limits of this constraint. More...
 
virtual void SetRestitutionLimAng (const Real RestitutionLimAng)
 Sets the restitution value to be used when hitting the angular limit of this constraint. More...
 
virtual void SetRestitutionLimLin (const Real RestitutionLimLin)
 Sets the restitution value to be used when hitting the linear limit of this constraint. More...
 
virtual void SetRestitutionOrthoAng (const Real RestitutionOrthoAng)
 Sets the restitution value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual void SetRestitutionOrthoLin (const Real RestitutionOrthoLin)
 Sets the restitution value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual void SetSoftnessDirAng (const Real SoftnessDirAng)
 Sets the softness value to be used when within the angular limits of this constraint. More...
 
virtual void SetSoftnessDirLin (const Real SoftnessDirLin)
 Sets the softness value to be used when within the linear limits of this constraint. More...
 
virtual void SetSoftnessLimAng (const Real SoftnessLimAng)
 Sets the softness value to be used when hitting the angular limit of this constraint. More...
 
virtual void SetSoftnessLimLin (const Real SoftnessLimLin)
 Sets the softness value to be used when hitting the linear limit of this constraint. More...
 
virtual void SetSoftnessOrthoAng (const Real SoftnessOrthoAng)
 Sets the softness value to be used when force is applied against the configured angular axis of this constraint. More...
 
virtual void SetSoftnessOrthoLin (const Real SoftnessOrthoLin)
 Sets the softness value to be used when force is applied against the configured linear axis of this constraint. More...
 
virtual void SetTargetAngMotorVelocity (const Real TargetAngMotorVelocity)
 Sets the target velocity of the motor on the angular axis of ths constraint. More...
 
virtual void SetTargetLinMotorVelocity (const Real TargetLinMotorVelocity)
 Sets the target velocity of the motor on the linear axis of ths constraint. More...
 
virtual void SetUpperAngLimit (const Real UpperLimit)
 Sets the upper angular limit of this slider. More...
 
virtual void SetUpperLinLimit (const Real UpperLimit)
 Sets the upper linear limit of this slider. 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...
 
- 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::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

virtual void CreateConstraint (RigidProxy *RigidA, RigidProxy *RigidB, const Transform &TransA, const Transform &TransB)
 Creates the internal constraint. 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...
 

Protected Attributes

btSliderConstraint * Slider
 Bullet 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...
 

Additional Inherited Members

- 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.
 

Detailed Description

This is a constraint for permitting movement on only a singular linear or angular axis.

This class comes with an unusually high amount of parameters that can be set. A lot of the parameters are obsolete but remain in the class in case they become used again or their boilerplate is proven to be useful. In other words, they exist because they are still there in the internal implementation so we reflect that.

Like other constraints with limits, such as the ConeTwistConstraint, there are a small series of parameters that control how the constraint is to behave when near, at, or beyond it's set limits. In the case of the Slider they are; Softness, Damping, and Restituion.
Constraint Softness is the act of applying a pre-emptive force to smooth out the force to be applied. Lower values means a smoother transition from further away from the limit whereas higher values mean a more rapid transition closer to the limit. Values should be in a range of 0.0-1.0. Values in the higher end of the range (0.9-1.0) are recommended.
Constraint Damping is similar to damping in other parts of the physics engine. It is more-or-less something that inhibits movement along appropriate axes. Damping is useful to simulate some forms of friction, or even air resistance. Values should be in a range of 0.0-1.0. Values in the higher end of the range (0.7-1.0) are recommended.
Constraint Restitution is also similar to other parts of the physics engine. It is the force applied back after a limit is reached, based on the size of the force that hit the limit. Larger values mean it'll bounce back more, whereas lower values will give little to no bounce back. Values should in a range of 0.0-1.0. Values in the lower end of the range (0.0-0.3) are recommended.

To further complicate the SliderConstraint compared to other systems in the physics subsystem, there are multiple types of limits defined. The different properties mentioned above can be used at different times depending on the position of the child object and how it is moving.
The definition of the "Dir" prefix used in the SliderConstraint methods is unknown, but it applies to whenever the child object is within the set limits of the constraint and moving along the configured axis of the constraint.
The definition of the "Lim" prefix is "Limit", and it applies to whenever the child object hits the configured limit of the constraint along the configured axis of the constraint.
The definition of the "Ortho" prefix is "Orthogonal", and it applies to any forces that are enacted on the child object that force it to move against the configured axis on the constraint.

Definition at line 79 of file sliderconstraint.h.

Constructor & Destructor Documentation

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

Two body 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 ProxyA's center of gravity to get to match an offset from ProxyB.
TransBThe offset and rotation from ProxyB's center of gravity.
CreatorA pointer to the manager that created this constraint.

Definition at line 58 of file sliderconstraint.cpp.

Mezzanine::Physics::SliderConstraint::SliderConstraint ( const UInt32  ID,
RigidProxy ProxyA,
const Transform TransA,
PhysicsManager Creator 
)

Standard one body constructor.

Parameters
IDThe unique identifier assigned to this constraint.
ProxyAThe First proxy to be bound.
TransAThe offset and rotation from ProxyA's center of gravity.
CreatorA pointer to the manager that created this constraint.

Definition at line 63 of file sliderconstraint.cpp.

Mezzanine::Physics::SliderConstraint::SliderConstraint ( 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 68 of file sliderconstraint.cpp.

Member Function Documentation

btTypedConstraint * Mezzanine::Physics::SliderConstraint::_GetConstraintBase ( ) const
virtual

Get the Bullet constraint that this class encapsulates.

Returns
A pointer to the btTypedConstraint that stores the underlying constraint.

Implements Mezzanine::Physics::Constraint.

Definition at line 497 of file sliderconstraint.cpp.

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

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 76 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::DestroyConstraint ( )
protectedvirtual

Destroys 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.

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 87 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingDirAng ( ) const
virtual

Gets the damping value to be used when within the angular limits of this constraint.

Returns
Returns a Real representing the current damping on the angular axis.

Definition at line 257 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingDirLin ( ) const
virtual

Gets the damping value to be used when within the linear limits of this constraint.

Returns
Returns a Real representing the current damping on the linear axis.

Definition at line 251 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingLimAng ( ) const
virtual

Gets the damping value to be used when hitting the angular limit of this constraint.

Returns
Returns a Real representing the current damping on the angular axis.

Definition at line 269 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingLimLin ( ) const
virtual

Gets the damping value to be used when hitting the linear limit of this constraint.

Returns
Returns a Real representing the current damping on the linear axis.

Definition at line 263 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingOrthoAng ( ) const
virtual

Gets the damping value to be used when force is applied against the configured angular axis of this constraint.

Returns
Returns a Real representing the current damping on the angular axis.

Definition at line 281 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetDampingOrthoLin ( ) const
virtual

Gets the damping value to be used when force is applied against the configured linear axis of this constraint.

Returns
Returns a Real representing the current damping on the linear axis.

Definition at line 275 of file sliderconstraint.cpp.

String Mezzanine::Physics::SliderConstraint::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".

Implements Mezzanine::Physics::Constraint.

Definition at line 488 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetLowerAngLimit ( ) const
virtual

Gets the lower angular limit of this slider.

Returns
Returns a Real representing the current lower limit for sliding on the angular axis.

Definition at line 170 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetLowerLinLimit ( ) const
virtual

Gets the lower linear limit of this slider.

Returns
Returns a Real representing the current lower limit for sliding on the linear axis.

Definition at line 164 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetMaxAngMotorForce ( ) const
virtual

Gets the maximum force allowed to be applied on the angular axis of this constraint.

Returns
Returns a Real representing the maximum allowed force on the angular axis of this constraint.

Definition at line 206 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetMaxLinMotorForce ( ) const
virtual

Gets the maximum force allowed to be applied on the linear axis of this constraint.

Returns
Returns a Real representing the maximum allowed force on the linear axis of this constraint.

Definition at line 200 of file sliderconstraint.cpp.

Vector3 Mezzanine::Physics::SliderConstraint::GetPivotALocation ( ) const
virtual

Gets the location of the pivot relative to ProxA's Center of gravity.

Returns
A Vector3 with the pivot location.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 122 of file sliderconstraint.cpp.

Quaternion Mezzanine::Physics::SliderConstraint::GetPivotARotation ( ) const
virtual

Gets the relative rotation for ProxA.

Returns
A Quaternion that has the rotation.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 134 of file sliderconstraint.cpp.

Transform Mezzanine::Physics::SliderConstraint::GetPivotATransform ( ) const
virtual

Gets the current Rotation and Location of ProxyA.

Returns
This returns a Mezzanine::Transform.

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 110 of file sliderconstraint.cpp.

Vector3 Mezzanine::Physics::SliderConstraint::GetPivotBLocation ( ) const
virtual

Gets the location of the pivot relative to ProxB's Center of gravity.

Returns
A Vector3 with the pivot location.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 125 of file sliderconstraint.cpp.

Quaternion Mezzanine::Physics::SliderConstraint::GetPivotBRotation ( ) const
virtual

Gets the relative rotation for ProxB.

Returns
A Quaternion that has the rotation.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 137 of file sliderconstraint.cpp.

Transform Mezzanine::Physics::SliderConstraint::GetPivotBTransform ( ) const
virtual

Gets the current Rotation and Location of ProxyB.

Returns
This returns a Mezzanine::Transform.

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 113 of file sliderconstraint.cpp.

Boole Mezzanine::Physics::SliderConstraint::GetPoweredAngMotor ( ) const
virtual

Gets whether or not the motor for the angular axis of this constraint is enabled.

Returns
Returns true if the motor is currently enabled, false otherwise.

Definition at line 182 of file sliderconstraint.cpp.

Boole Mezzanine::Physics::SliderConstraint::GetPoweredLinMotor ( ) const
virtual

Gets whether or not the motor for the linear axis of this constraint is enabled.

Returns
Returns true if the motor is currently enabled, false otherwise.

Definition at line 176 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionDirAng ( ) const
virtual

Gets the restitution value to be used when within the angular limits of this constraint.

Returns
Returns a Real representing the current restitution on the angular axis.

Definition at line 293 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionDirLin ( ) const
virtual

Gets the restitution value to be used when within the linear limits of this constraint.

Returns
Returns a Real representing the current restitution on the linear axis.

Definition at line 287 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionLimAng ( ) const
virtual

Gets the restitution value to be used when hitting the angular limit of this constraint.

Returns
Returns a Real representing the current restitution on the angular axis.

Definition at line 305 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionLimLin ( ) const
virtual

Gets the restitution value to be used when hitting the linear limit of this constraint.

Returns
Returns a Real representing the current restitution on the linear axis.

Definition at line 299 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionOrthoAng ( ) const
virtual

Gets the restitution value to be used when force is applied against the configured angular axis of this constraint.

Returns
Returns a Real representing the current restitution on the angular axis.

Definition at line 317 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetRestitutionOrthoLin ( ) const
virtual

Gets the restitution value to be used when force is applied against the configured linear axis of this constraint.

Returns
Returns a Real representing the current restitution on the linear axis.

Definition at line 311 of file sliderconstraint.cpp.

String Mezzanine::Physics::SliderConstraint::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 491 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessDirAng ( ) const
virtual

Gets the softness value to be used when within the angular limits of this constraint.

Returns
Returns a Real representing the current softness on the angular axis.

Definition at line 245 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessDirLin ( ) const
virtual

Gets the softness value to be used when within the linear limits of this constraint.

Returns
Returns a Real representing the current softness on the linear axis.

Definition at line 239 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessLimAng ( ) const
virtual

Gets the softness value to be used when hitting the angular limit of this constraint.

Returns
Returns a Real representing the current softness on the angular axis.

Definition at line 218 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessLimLin ( ) const
virtual

Gets the softness value to be used when hitting the linear limit of this constraint.

Returns
Returns a Real representing the current softness on the linear axis.

Definition at line 212 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessOrthoAng ( ) const
virtual

Gets the softness value to be used when force is applied against the configured angular axis of this constraint.

Returns
Returns a Real representing the current softness on the angular axis.

Definition at line 230 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetSoftnessOrthoLin ( ) const
virtual

Gets the softness value to be used when force is applied against the configured linear axis of this constraint.

Returns
Returns a Real representing the current softness on the linear axis.

Definition at line 224 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetTargetAngMotorVelocity ( ) const
virtual

Gets the target velocity of the motor on the angular axis of ths constraint.

Returns
Returns a Real representing how fast the motor should drive the constrained object on the angular axis of the constraint.

Definition at line 194 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetTargetLinMotorVelocity ( ) const
virtual

Gets the target velocity of the motor on the linear axis of ths constraint.

Returns
Returns a Real representing how fast the motor should drive the constrained object on the linear axis of the constraint.

Definition at line 188 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetUpperAngLimit ( ) const
virtual

Gets the upper angular limit of this slider.

Returns
Returns a Real representing the current upper limit for sliding on the angular axis.

Definition at line 158 of file sliderconstraint.cpp.

Real Mezzanine::Physics::SliderConstraint::GetUpperLinLimit ( ) const
virtual

Gets the upper linear limit of this slider.

Returns
Returns a Real representing the current upper limit for sliding on the linear axis.

Definition at line 152 of file sliderconstraint.cpp.

Boole Mezzanine::Physics::SliderConstraint::GetUseFrameOffset ( ) const
virtual

Gets whether or not an offset of the constraint frame should be used to calculate internal data.

Returns
Returns whether or not an offset in the constraint frame is being used by the internal constraint.

Definition at line 146 of file sliderconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::SliderConstraint::GetValidAngularAxes ( ) const
virtual

Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation)

Warning
Odd behaviors, maybe even undefined behavior can happen if This returns a matching Axis to a Linear Axis. Any given axis should only be one or the other
Returns
An Axislist with the Axis this constraint Angularly supports.

Implements Mezzanine::Physics::Constraint.

Definition at line 343 of file sliderconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::SliderConstraint::GetValidLinearAxes ( ) const
virtual

Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation)

Warning
Odd behaviors, maybe even undefined behavior can happen if This returns a matching Axis to a Linear Axis. Any given axis should only be one or the other
Returns
An Axislist with the Axis this constraint linearly supports.

Implements Mezzanine::Physics::Constraint.

Definition at line 334 of file sliderconstraint.cpp.

Constraint::ParamList Mezzanine::Physics::SliderConstraint::GetValidParamsOnAxis ( int  Axis) const
virtual

Get a sorted (low to high) list of Parameters that are valid on this Axis.

Parameters returned from this will work on the given axis even if they are not valid on any other axis. There is no guarantee that the Parameters will be uniquely stored per an axis. There is no guarantee that changing one parameter will not change another.

Parameters
Axisthe Axis to check.
Returns
A Paramlist with all the valid parameters for this axis.

Implements Mezzanine::Physics::Constraint.

Definition at line 323 of file sliderconstraint.cpp.

Boole Mezzanine::Physics::SliderConstraint::HasParamBeenSet ( ConstraintParam  Param,
int  Axis 
) const
virtual

Implements Mezzanine::Physics::Constraint.

Definition at line 352 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::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::Constraint.

Definition at line 412 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::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::Constraint.

Definition at line 383 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingDirAng ( const Real  DampingDirAng)
virtual

Sets the damping value to be used when within the angular limits of this constraint.

Parameters
DampingDirAngThe damping value to be set for the angular axis.

Definition at line 254 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingDirLin ( const Real  DampingDirLin)
virtual

Sets the damping value to be used when within the linear limits of this constraint.

Parameters
DampingDirLinThe damping value to be set for the linear axis.

Definition at line 248 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingLimAng ( const Real  DampingLimAng)
virtual

Sets the damping value to be used when hitting the angular limit of this constraint.

Parameters
DampingLimAngThe damping value to be set for the angular axis.

Definition at line 266 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingLimLin ( const Real  DampingLimLin)
virtual

Sets the damping value to be used when hitting the linear limit of this constraint.

Parameters
DampingLimLinThe damping value to be set for the linear axis.

Definition at line 260 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingOrthoAng ( const Real  DampingOrthoAng)
virtual

Sets the damping value to be used when force is applied against the configured angular axis of this constraint.

Parameters
DampingOrthoAngThe damping value to be set for the angular axis.

Definition at line 278 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetDampingOrthoLin ( const Real  DampingOrthoLin)
virtual

Sets the damping value to be used when force is applied against the configured linear axis of this constraint.

Parameters
DampingOrthoLinThe damping value to be set for the linear axis.

Definition at line 272 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetLowerAngLimit ( const Real  LowerLimit)
virtual

Sets the lower angular limit of this slider.

Parameters
LowerLimitThe lower limit for sliding on the angular axis.

Definition at line 167 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetLowerLinLimit ( const Real  LowerLimit)
virtual

Sets the lower linear limit of this slider.

Parameters
LowerLimitThe lower limit for sliding on the linear axis.

Definition at line 161 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetMaxAngMotorForce ( const Real  MaxAngMotorForce)
virtual

Sets the maximum force allowed to be applied on the angular axis of this constraint.

Parameters
MaxAngMotorForceThe cap for the force that can be appled to the child object on the angular axis of this constraint.

Definition at line 203 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetMaxLinMotorForce ( const Real  MaxLinMotorForce)
virtual

Sets the maximum force allowed to be applied on the linear axis of this constraint.

Parameters
MaxLinMotorForceThe cap for the force that can be appled to the child object on the linear axis of this constraint.

Definition at line 197 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotALocation ( const Vector3 Location)
virtual

Sets The relative location of the pivot from ProxA's Center of gravity.

Parameters
LocationThe New value for PivotA.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 116 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotARotation ( const Quaternion Rotation)
virtual

Sets The relative rotation of ProxA.

Parameters
RotationThe new rotation amount for ProxA.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 128 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotATransform ( const Transform TranA)
virtual

Sets the Position and Rotation for the first body using a Transform.

Parameters
TransAThe new position and rotation.

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 104 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotBLocation ( const Vector3 Location)
virtual

Sets The relative location of the pivot from ProxB's Center of gravity.

Parameters
LocationThe New value for PivotB.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 119 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotBRotation ( const Quaternion Rotation)
virtual

Sets The relative rotation of ProxB.

Parameters
otationThe new rotation amount for ProxB.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 131 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotBTransform ( const Transform TranB)
virtual

Sets the Position and Rotation for the second body using a Transform.

Parameters
TransBThe new position and rotation.

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 107 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPivotTransforms ( const Transform TransA,
const Transform TransB 
)
virtual

Sets the Position and Rotation for the first and second body using a Transform.

Parameters
TransAThe new position and rotation for ProxyA.
TransBThe new position and rotation for ProxyB.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 101 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPoweredAngMotor ( const Boole  OnOff)
virtual

Sets whether or not the motor for the angular axis of this constraint is enabled.

Parameters
OnOffTrueto enabled the motor, false to disable it.

Definition at line 179 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetPoweredLinMotor ( const Boole  OnOff)
virtual

Sets whether or not the motor for the linear axis of this constraint is enabled.

Parameters
OnOffTrue to enabled the motor, false to disable it.

Definition at line 173 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionDirAng ( const Real  RestitutionDirAng)
virtual

Sets the restitution value to be used when within the angular limits of this constraint.

Parameters
RestitutionDirAngThe restitution value to be set for the angular axis.

Definition at line 290 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionDirLin ( const Real  RestitutionDirLin)
virtual

Sets the restitution value to be used when within the linear limits of this constraint.

Parameters
RestitutionDirLinThe restitution value to be set for the linear axis.

Definition at line 284 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionLimAng ( const Real  RestitutionLimAng)
virtual

Sets the restitution value to be used when hitting the angular limit of this constraint.

Parameters
RestitutionLimAngThe restitution value to be set for the angular axis.

Definition at line 302 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionLimLin ( const Real  RestitutionLimLin)
virtual

Sets the restitution value to be used when hitting the linear limit of this constraint.

Parameters
RestitutionLimLinThe restitution value to be set for the linear axis.

Definition at line 296 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionOrthoAng ( const Real  RestitutionOrthoAng)
virtual

Sets the restitution value to be used when force is applied against the configured angular axis of this constraint.

Parameters
RestitutionOrthoAngThe restitution value to be set for the angular axis.

Definition at line 314 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetRestitutionOrthoLin ( const Real  RestitutionOrthoLin)
virtual

Sets the restitution value to be used when force is applied against the configured linear axis of this constraint.

Parameters
RestitutionOrthoLinThe restitution value to be set for the linear axis.

Definition at line 308 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessDirAng ( const Real  SoftnessDirAng)
virtual

Sets the softness value to be used when within the angular limits of this constraint.

Parameters
SoftnessDirAngThe softness value to be set for the angular axis.

Definition at line 242 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessDirLin ( const Real  SoftnessDirLin)
virtual

Sets the softness value to be used when within the linear limits of this constraint.

Parameters
SoftnessDirLinThe softness value to be set for the linear axis.

Definition at line 236 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessLimAng ( const Real  SoftnessLimAng)
virtual

Sets the softness value to be used when hitting the angular limit of this constraint.

Parameters
SoftnessLimAngThe softness value to be set for the angular axis.

Definition at line 215 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessLimLin ( const Real  SoftnessLimLin)
virtual

Sets the softness value to be used when hitting the linear limit of this constraint.

Parameters
SoftnessLimLinThe softness value to be set for the linear axis.

Definition at line 209 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessOrthoAng ( const Real  SoftnessOrthoAng)
virtual

Sets the softness value to be used when force is applied against the configured angular axis of this constraint.

Parameters
SoftnessOrthoAngThe softness value to be set for the angular axis.

Definition at line 227 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetSoftnessOrthoLin ( const Real  SoftnessOrthoLin)
virtual

Sets the softness value to be used when force is applied against the configured linear axis of this constraint.

Parameters
SoftnessOrthoLinThe softness value to be set for the linear axis.

Definition at line 221 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetTargetAngMotorVelocity ( const Real  TargetAngMotorVelocity)
virtual

Sets the target velocity of the motor on the angular axis of ths constraint.

Parameters
TargetAngMotorVelocityThe target velocity to acheive, which determines the amount of force to apply on the axis.

Definition at line 191 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetTargetLinMotorVelocity ( const Real  TargetLinMotorVelocity)
virtual

Sets the target velocity of the motor on the linear axis of ths constraint.

Parameters
TargetLinMotorVelocityThe target velocity to acheive, which determines the amount of force to apply on the axis.

Definition at line 185 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetUpperAngLimit ( const Real  UpperLimit)
virtual

Sets the upper angular limit of this slider.

Parameters
UpperLimitThe upper limit for sliding on the angular axis.

Definition at line 155 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetUpperLinLimit ( const Real  UpperLimit)
virtual

Sets the upper linear limit of this slider.

Parameters
UpperLimitThe upper limit for sliding on the linear axis.

Definition at line 149 of file sliderconstraint.cpp.

void Mezzanine::Physics::SliderConstraint::SetUseFrameOffset ( const Boole  FrameOffset)
virtual

Sets whether or not an offset of the constraint frame should be used to calculate internal data.

Parameters
FrameOffsetThe full effect of this being true or false is uknown, but internal documentation suggests "true" provides more stable results.

Definition at line 143 of file sliderconstraint.cpp.

Member Data Documentation

btSliderConstraint* Mezzanine::Physics::SliderConstraint::Slider
protected

Bullet constraint that this class encapsulates.

Definition at line 84 of file sliderconstraint.h.


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