MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::Physics::Generic6DofConstraint Class Reference

Create simple but specific limits on any axis of movement or rotation. More...

#include <generic6dofconstraint.h>

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

Public Types

enum  UsableAxis {
  LinearX = 0, LinearY = 1, LinearZ = 2, AngularX = 3,
  AngularY = 4, AngularZ = 5, AngularXAsRotationalAxis = 0, AngularYAsRotationalAxis = 1,
  AngularZAsRotationalAxis = 2
}
 Identify the Axis a bit easier when iterating over them is less convienent than typing an Identifier. More...
 

Public Member Functions

 Generic6DofConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &VectorA, const Vector3 &VectorB, const Quaternion &QuaternionA, const Quaternion &QuaternionB, bool UseLinearReferenceA=false)
 Two proxy Verbose constructor. More...
 
 Generic6DofConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Transform &TransformA, const Transform &TransformB, bool UseLinearReferenceA=false)
 Two proxy Terse constructor. More...
 
 Generic6DofConstraint (RigidProxy *ProxyB, const Vector3 &VectorB, const Quaternion &QuaternionB, bool UseLinearReferenceB=true)
 Body and World Verbose constructor. More...
 
 Generic6DofConstraint (RigidProxy *ProxyB, const Transform &TransformB, bool UseLinearReferenceB=true)
 Body and World Terse constructor. More...
 
virtual ~Generic6DofConstraint ()
 Class destructor.
 
virtual int AxisToAngularAxis (int Axis) const
 Convert to internal Axis IDs from external or internal axis IDs. More...
 
virtual Vector3 GetAngularLimitLower () const
 Get the Upper limits on rotation. More...
 
Real GetAngularLimitLowerOnAxis (int RotationalAxis) const
 Get a specific lower rotational limit. More...
 
virtual Vector3 GetAngularLimitMaxForce () const
 Get the Maximimum amount of force applied to ensure limits are not surpassed. More...
 
virtual Real GetAngularLimitMaxForceOnAxis (int 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 (int RotationalAxis) const
 Get a specific upper rotational limit. More...
 
virtual Vector3 GetAngularMotorDamping () const
 Get the Damping for all Angular Axis. More...
 
virtual Real GetAngularMotorDampingOnAxis (int 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 bool GetAngularMotorEnabledOnAxis (int 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 (int Axis) const
 Get the Max motor Force on a certain Axis. More...
 
virtual Vector3 GetAngularMotorRestitution () const
 Get the Restistution values for all three axis. More...
 
virtual Real GetAngularMotorRestitutionOnAxis (int Axis) const
 Get the Restistution/Bounciness for a single Axis. More...
 
virtual Vector3 GetAngularMotorTargetVelocity () const
 Get the target velocity for all angular Axis. More...
 
virtual Real GetAngularMotorTargetVelocityOnAxis (int Axis) const
 Get the Target Velocity for one axis. More...
 
virtual btTypedConstraint * GetConstraintBase () const
 Get the Bullet constraint that this class encapsulates. More...
 
virtual Real GetLinearLimitDamping () const
 Get the Damping of the linear Limits. More...
 
virtual Vector3 GetLinearLimitLower () const
 Get the Upper limits on translation. 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...
 
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 bool GetLinearMotorEnabledOnAxis (int 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 (int 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 (int Axis) const
 Get the Target Velocity for one axis. More...
 
virtual Vector3 GetPivotALocation () const
 Get the location of the pivot relative to ActorA's Center of gravity. More...
 
virtual Quaternion GetPivotARotation () const
 Get the relative rotation for ActorA. More...
 
virtual Transform GetPivotATransform () const
 Get the current Rotation and Location of Actor A. More...
 
virtual Vector3 GetPivotBLocation () const
 Get the location of the pivot relative to ActorB's Center of gravity. More...
 
virtual Quaternion GetPivotBRotation () const
 Get the relative rotation for ActorB. More...
 
virtual Transform GetPivotBTransform () const
 Get the current Rotation and Location of Actor B. More...
 
virtual bool GetUseFrameOffset () const
 Retrieve the stored value from the physics subsystem(bullet) More...
 
virtual bool HasParamBeenSet (ConstraintParam Param, int Axis) const
 
virtual void ProtoDeSerialize (const XML::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &CurrentRoot) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void SetAngularLimitLower (const Vector3 &Limit)
 Set the Lower limits on rotation. More...
 
virtual void SetAngularLimitMaxForce (const Vector3 &MaxLimitForces)
 Set the Maximimum amount of force applied to ensure limits are not surpassed. More...
 
virtual void SetAngularLimitMaxForceOnAxis (Real MaxLimitForce, int 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...
 
virtual void SetAngularMotorDamping (const Vector3 &Dampings)
 Set the Angular Motor Damping for each Angular Axis. More...
 
virtual void SetAngularMotorDampingOnAxis (Real Damping, int 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 (bool Enabled, int 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 (Real Force, int Axis)
 For one Axis, set the Maximimum Motor Force. More...
 
virtual void SetAngularMotorRestitution (const Vector3 &Restistutions)
 Set the Bounciness/Restition for rotation on all three Axis. More...
 
virtual void SetAngularMotorRestitutionOnAxis (Real Restistution, int Axis)
 For one Axis, set the Restistution/Bounciness/. More...
 
virtual void SetAngularMotorTargetVelocity (const Vector3 &Velocities)
 Set the Target velocity of the motor on each anuglar axis. More...
 
virtual void SetAngularMotorTargetVelocityOnAxis (Real Velocity, int Axis)
 For one Axis, set the target velocity of the angular motor. More...
 
virtual void SetLimit (int Axis, Real Lower, Real Upper)
 Change the upper and lower limit for one axis of translation or rotation limit. More...
 
virtual void SetLinearLimitDamping (Real Damping)
 Set the Damping of the linear Limits. More...
 
virtual void SetLinearLimitLower (const Vector3 &Limit)
 Set the Upper limits on translation. More...
 
virtual void SetLinearLimitRestitution (Real Restitution)
 Set the Restitution of the linear Limits. More...
 
virtual void SetLinearLimitSoftness (Real Softness)
 Set the Softness of the linear Limits. More...
 
virtual void SetLinearLimitUpper (const Vector3 &Limit)
 Set the lower limits on translation. More...
 
virtual void SetLinearMotorEnabled (const Vector3 &Enableds)
 Set whether or not the motor is enabled for all Linear Axis Simultaneously. More...
 
virtual void SetLinearMotorEnabledOnAxis (bool Enabled, int 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 (Real Force, int 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 (Real Velocity, int Axis)
 For one Axis, set the target velocity of the Linear motor. More...
 
virtual void SetPivotALocation (const Vector3 &Location)
 Set The relative location of the pivot from ActorA's Center of gravity. More...
 
virtual void SetPivotARotation (const Quaternion &Rotation)
 Set The relative rotation of ActorA. More...
 
virtual void SetPivotATransform (const Transform &TranA)
 Set the Position and Rotation using a Transform. More...
 
virtual void SetPivotBLocation (const Vector3 &Location)
 Set The relative location of the pivot from ActorB's Center of gravity. More...
 
virtual void SetPivotBRotation (const Quaternion &Rotation)
 Set The relative rotation of ActorB. More...
 
virtual void SetPivotBTransform (const Transform &TranB)
 Set the Position and Rotation using a Transform. More...
 
virtual void SetUseFrameOffset (bool FrameOffset)
 Set the stored value for UseFrameOffset on this hinge in the physics subsystem(bullet) More...
 
virtual Constraint::AxisList ValidAngularAxis () const
 Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation) More...
 
virtual Constraint::AxisList ValidLinearAxis () const
 Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation) More...
 
virtual Constraint::ParamList ValidParamOnAxis (int Axis) const
 Get a sorted (low to high) list of Parameters that are valid on this Axis. More...
 

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. More...
 
- Static Public Member Functions inherited from Mezzanine::Physics::DualTransformConstraint
static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Physics::Constraint
static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized. More...
 

Protected Member Functions

 Generic6DofConstraint ()
 Inheritance Constructor. More...
 

Protected Attributes

btGeneric6DofConstraint * Generic6dof
 Bullet constraint that this class encapsulates.
 

Detailed Description

Create simple but specific limits on any axis of movement or rotation.

Provides optional limits on the x, y, and z for rotation and translation. You can get the ID of the axis with ValidLinearAxis() or ValidAngularAxis() for this particular constraint at the time of this writing the constraint axis looked liked this:

This has to perform a larger amount of calculations and should be used only when other simpler constraints have been ruled out.

As with all limits when the upper and lower limits match the two actors will be locked on that axis and relative translation or rotation will not be permitted (within the bounds or error correction). If the Lower limit is lower than the Upper limit a range of translation or rotation will be allowed. If the Lower limit is higher than the Upper limit this will cause the system to realized that no position can satisfy the constraint and no restriction will be enforced.

Each of the Axis also has a motor that can be enabled to cause a specified amount of translation or rotation. To aid in selection of specific Axis, you should use the UsableAxis enum

Definition at line 79 of file generic6dofconstraint.h.

Member Enumeration Documentation

Identify the Axis a bit easier when iterating over them is less convienent than typing an Identifier.

Enumerator
LinearX 

Translation on the X axis.

LinearY 

Translation on the Y axis.

LinearZ 

Translation on the Z axis.

AngularX 

Rotation on the X axis.

AngularY 

Rotation on the Y axis.

AngularZ 

Rotation on the Z axis.

AngularXAsRotationalAxis 

Rotation on the X axis, when working with only rotational Axis.

AngularYAsRotationalAxis 

Rotation on the Y axis, when working with only rotational Axis.

AngularZAsRotationalAxis 

Rotation on the Z axis, when working with only rotational Axis.

Definition at line 89 of file generic6dofconstraint.h.

Constructor & Destructor Documentation

Mezzanine::Physics::Generic6DofConstraint::Generic6DofConstraint ( )
protected

Inheritance Constructor.

This is only called by derived classes, and shouldn't be called manually.

Definition at line 58 of file generic6dofconstraint.cpp.

Mezzanine::Physics::Generic6DofConstraint::Generic6DofConstraint ( RigidProxy ProxyA,
RigidProxy ProxyB,
const Vector3 VectorA,
const Vector3 VectorB,
const Quaternion QuaternionA,
const Quaternion QuaternionB,
bool  UseLinearReferenceA = false 
)

Two proxy Verbose constructor.

Parameters
ProxyAThe First proxy to be bound.
ProxyBThe Second proxy to be bound.
VectorAThe offset from ProxyAs center of gravity to get to match an offset from ProxyB.
VectorBThe offset from ProxyBs center of gravity.
QuaternionARelative rotation from ProxyA.
QuaternionBRelative rotation from ProxyB.
UseLinearReferenceAPerform Linear math from ProxyA's perspective, default to false.

Definition at line 67 of file generic6dofconstraint.cpp.

Mezzanine::Physics::Generic6DofConstraint::Generic6DofConstraint ( RigidProxy ProxyA,
RigidProxy ProxyB,
const Transform TransformA,
const Transform TransformB,
bool  UseLinearReferenceA = false 
)

Two proxy Terse constructor.

Parameters
ProxyAThe First proxy to be bound.
ProxyBThe Second proxy to be bound.
TransformAThe offset and rotation from ProxyAs center of gravity to get to match an offset from ProxyB.
TransformBThe offset and rotation from ProxyBs center of gravity.
UseLinearReferenceAPerform Linear math from ProxyA's perspective, default to false.

Definition at line 76 of file generic6dofconstraint.cpp.

Mezzanine::Physics::Generic6DofConstraint::Generic6DofConstraint ( RigidProxy ProxyB,
const Vector3 VectorB,
const Quaternion QuaternionB,
bool  UseLinearReferenceB = true 
)

Body and World Verbose constructor.

Parameters
ProxyBThe proxy to be bound to the world.
VectorBThe offset for the ProxyB pivot/hinge/joint.
QuaternionBThe rotation.
UseLinearReferenceBPerform Linear math from ProxyBs perspective, default to true.

This Joins an object to the world.

Definition at line 82 of file generic6dofconstraint.cpp.

Mezzanine::Physics::Generic6DofConstraint::Generic6DofConstraint ( RigidProxy ProxyB,
const Transform TransformB,
bool  UseLinearReferenceB = true 
)

Body and World Terse constructor.

Parameters
ProxyBThe proxy to be bound to the world.
TransformBThe offset and rotation for the ProxyB pivot/hinge/joint.
UseLinearReferenceBPerform Linear math from ProxyB's perspective, default to true.

This Joins an object to the world.

Definition at line 90 of file generic6dofconstraint.cpp.

Member Function Documentation

virtual int Mezzanine::Physics::Generic6DofConstraint::AxisToAngularAxis ( int  Axis) const
inlinevirtual

Convert to internal Axis IDs from external or internal axis IDs.

Parameters
Axisthe Axis ID to be converted
Returns
A number that correlates toe corresponding internal Axis. For example Axis 4 is the Rotation Y. This would return the corresponding ID for the internal Rotation Y axis

Due to the way this is stored internally, All the axis are listed from from 0 to 2. So rather than throw an exception(or have undefined behavior) if the Axis selected one of those, this select the axis like this:

  • 0, 3: Rotation X
  • 1, 4: Rotation Y
  • 2, 5: Rotation Z
    Returns
    A real containing the specified lower limit

Definition at line 224 of file generic6dofconstraint.h.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitLower ( ) const
virtual

Get the Upper limits on rotation.

Returns
Limit A Vector3 that stores the upper limit x, y and z rotation in radians

Definition at line 171 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitLowerOnAxis ( int  RotationalAxis) const

Get a specific lower rotational limit.

Parameters
RotationalAxisThe Axis to work with.

Definition at line 174 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitMaxForce ( ) const
virtual

Get the Maximimum amount of force applied to ensure limits are not surpassed.

Returns
A Vector3 with the forces on the X, Y and Z angular Axis.

Definition at line 189 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitMaxForceOnAxis ( int  Axis) const
virtual

Get the Maximimum amount of force applied to ensure a limit one axis is not surpassed.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A Real with the force for the Given Axis.

Definition at line 192 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitUpper ( ) const
virtual

Get the Power limits on rotation.

Returns
Limit A Vector3 that stores the lower limit x, y and z rotation in radians

Definition at line 168 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularLimitUpperOnAxis ( int  RotationalAxis) const

Get a specific upper rotational limit.

Parameters
RotationalAxisThe Axis to work with.

This selects axis with

Returns
A real containing the specified upper limit

Definition at line 177 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorDamping ( ) const
virtual

Get the Damping for all Angular Axis.

Returns
A Vector3 with the forces on the X, Y and Z angular Axis.

Definition at line 228 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorDampingOnAxis ( int  Axis) const
virtual

Get the Damping for one given Axis.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A Real with the XXX for the Given Axis.

Definition at line 231 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorEnabled ( ) const
virtual

Get a Vector3 with 3 zero or nonzero values that store whether or not a given rotational motor is enable.

Returns
A Vector3 with the forces on the X, Y and Z angular Axis.

Definition at line 254 of file generic6dofconstraint.cpp.

bool Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorEnabledOnAxis ( int  Axis) const
virtual

Is a specific rotational motor enabled.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A bool that is true if the given Axis is enabled.

Definition at line 257 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorMaxForce ( ) const
virtual

Get the Max Motor Force for each Axis.

Returns
A Vector3 with the max force on the X, Y and Z angular Axis.

Definition at line 215 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorMaxForceOnAxis ( int  Axis) const
virtual

Get the Max motor Force on a certain Axis.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A Real with the Max Motor Force for the Given Axis.

Definition at line 218 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorRestitution ( ) const
virtual

Get the Restistution values for all three axis.

Returns
A Vector3 with the forces on the X, Y and Z angular Axis.

Definition at line 241 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorRestitutionOnAxis ( int  Axis) const
virtual

Get the Restistution/Bounciness for a single Axis.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A Real with the Restistution for the Given Axis.

Definition at line 244 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorTargetVelocity ( ) const
virtual

Get the target velocity for all angular Axis.

Returns
A Vector3 with the TAger Velocities on the X, Y and Z angular Axis.

Definition at line 202 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetAngularMotorTargetVelocityOnAxis ( int  Axis) const
virtual

Get the Target Velocity for one axis.

Parameters
AxisThe Angular Axis to get, as per AxisToAngularAxis(int).
Returns
A Real with the force for the Given Axis.

Definition at line 205 of file generic6dofconstraint.cpp.

btTypedConstraint * Mezzanine::Physics::Generic6DofConstraint::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 61 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetLinearLimitDamping ( ) const
virtual

Get the Damping of the linear Limits.

Returns
The Damping as a real.

Definition at line 272 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetLinearLimitLower ( ) const
virtual

Get the Upper limits on translation.

Returns
A Vector3 that stores the upper limit x, y and z that cannot be exceeded

Definition at line 159 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetLinearLimitRestitution ( ) const
virtual

Get the Restitution of the linear Limits.

Returns
The Restitution as a real.

Definition at line 278 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetLinearLimitSoftness ( ) const
virtual

Get the Softness of the linear Limits.

Returns
The Softness as a real.

Definition at line 266 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetLinearLimitUpper ( ) const
virtual

Get the lower limits on translation.

Parameters
LimitA Vector3 that stores the lower limit x, y and z that cannot be exceeded

Definition at line 156 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorEnabled ( ) const
virtual

Get a Vector3 with 3 zero or nonzero values that store whether or not a given rotational motor is enable.

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

Definition at line 313 of file generic6dofconstraint.cpp.

bool Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorEnabledOnAxis ( int  Axis) const
virtual

Is a specific Linear motor enabled.

Parameters
AxisThe Linear Axis to get.
Returns
A bool that is true if the given Axis is enabled.

Definition at line 316 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorMaxForce ( ) const
virtual

Get the Max Motor Force for each Axis.

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

Definition at line 288 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorMaxForceOnAxis ( int  Axis) const
virtual

Get the Max motor Force on a certain Axis.

Parameters
AxisThe Linear Axis to get.
Returns
A Real with the Max Motor Force for the Given Axis.

Definition at line 291 of file generic6dofconstraint.cpp.

Vector3 Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorTargetVelocity ( ) const
virtual

Get the target velocity for all Linear Axis.

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

Definition at line 300 of file generic6dofconstraint.cpp.

Real Mezzanine::Physics::Generic6DofConstraint::GetLinearMotorTargetVelocityOnAxis ( int  Axis) const
virtual

Get the Target Velocity for one axis.

Parameters
AxisThe Linear Axis to get.
Returns
A Real with the force for the Given Axis.

Definition at line 303 of file generic6dofconstraint.cpp.

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

Get the location of the pivot relative to ActorA's Center of gravity.

Returns
A Vector3 with the pivot location.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 125 of file generic6dofconstraint.cpp.

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

Get the relative rotation for ActorA.

Returns
A Quaternion that has the rotation

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 138 of file generic6dofconstraint.cpp.

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

Get the current Rotation and Location of Actor A.

Returns
This returns a Mezzanine::Transform

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 112 of file generic6dofconstraint.cpp.

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

Get the location of the pivot relative to ActorB's Center of gravity.

Returns
A Vector3 with the pivot location.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 128 of file generic6dofconstraint.cpp.

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

Get the relative rotation for ActorB.

Returns
A Quaternion that has the rotation

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 141 of file generic6dofconstraint.cpp.

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

Get the current Rotation and Location of Actor B.

Returns
This returns a Mezzanine::Transform

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 115 of file generic6dofconstraint.cpp.

bool Mezzanine::Physics::Generic6DofConstraint::GetUseFrameOffset ( ) const
virtual

Retrieve the stored value from the physics subsystem(bullet)

Returns
a True or false.

Definition at line 364 of file generic6dofconstraint.cpp.

bool Mezzanine::Physics::Generic6DofConstraint::HasParamBeenSet ( ConstraintParam  Param,
int  Axis 
) const
virtual

Implements Mezzanine::Physics::Constraint.

Definition at line 354 of file generic6dofconstraint.cpp.

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

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

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

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Reimplemented in Mezzanine::Physics::Generic6DofSpringConstraint.

Definition at line 471 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::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 vectorw should be appended to.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Reimplemented in Mezzanine::Physics::Generic6DofSpringConstraint.

Definition at line 373 of file generic6dofconstraint.cpp.

String Mezzanine::Physics::Generic6DofConstraint::SerializableName ( )
static

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

Returns
A string containing "Generic6DofConstraint"

Definition at line 573 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularLimitLower ( const Vector3 Limit)
virtual

Set the Lower limits on rotation.

Parameters
LimitA Vector3 that store the upper limit x, y and z rotation in radians

Definition at line 165 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularLimitMaxForce ( const Vector3 MaxLimitForces)
virtual

Set the Maximimum amount of force applied to ensure limits are not surpassed.

Parameters
MaxLimitForcesA Vector3 containing the X, Y and Z Maximium forces.

Definition at line 183 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularLimitMaxForceOnAxis ( Real  MaxLimitForce,
int  Axis 
)
virtual

Set the Maximimum amount of force applied to ensure a limit on one axis is not surpassed.

Parameters
MaxLimitForceThe new maximum force.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 186 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularLimitUpper ( const Vector3 Limit)
virtual

Set the Upper limits on rotation.

Parameters
LimitA Vector3 that store the lower limit x, y and z rotation in radians

Definition at line 162 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorDamping ( const Vector3 Dampings)
virtual

Set the Angular Motor Damping for each Angular Axis.

Parameters
DampingsA Vector3 with Damping value for the X, Y and Z axis.

Definition at line 222 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorDampingOnAxis ( Real  Damping,
int  Axis 
)
virtual

For one Axis, set the Damping.

Parameters
DampingThe new amount to Damp rotation on the given Axis.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 225 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorEnabled ( const Vector3 Enableds)
virtual

Set whether or not the motor is enabled for all Axis Simultaneously.

Parameters
EnabledsA Vector3 that will be interpretted as 3 true/false values where 0 is false and any other value it true.

Definition at line 248 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorEnabledOnAxis ( bool  Enabled,
int  Axis 
)
virtual

For one Axis, set whether or not the motor is enabled.

Parameters
EnabledIs the motor enabled? TRue for yes, false for no.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 251 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorMaxForce ( const Vector3 Forces)
virtual

Set the Angular Motor Maximum force on all 3 rotational axis.

Parameters
ForcesA Vector3 with the Max Motor Force for each axis.

Definition at line 209 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorMaxForceOnAxis ( Real  Force,
int  Axis 
)
virtual

For one Axis, set the Maximimum Motor Force.

Parameters
ForceThe new Max motor force.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 212 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorRestitution ( const Vector3 Restistutions)
virtual

Set the Bounciness/Restition for rotation on all three Axis.

Parameters
RestistutionsA Vector3 containing all the New Bounciness values

Definition at line 235 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorRestitutionOnAxis ( Real  Restistution,
int  Axis 
)
virtual

For one Axis, set the Restistution/Bounciness/.

Parameters
RestistutionThe new value for the given Axis.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 238 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorTargetVelocity ( const Vector3 Velocities)
virtual

Set the Target velocity of the motor on each anuglar axis.

Parameters
VelocitiesA Vector3 containing the X, Y and Z Target Velocites.

Definition at line 196 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetAngularMotorTargetVelocityOnAxis ( Real  Velocity,
int  Axis 
)
virtual

For one Axis, set the target velocity of the angular motor.

Parameters
VelocityThe new Target Velovity.
AxisThe Angular Axis to be set, as per AxisToAngularAxis(int).

Definition at line 199 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLimit ( int  Axis,
Real  Lower,
Real  Upper 
)
virtual

Change the upper and lower limit for one axis of translation or rotation limit.

Parameters
AxisThe axis to change
LowerThe new lower limit
UpperThenew Higher limit

Definition at line 147 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearLimitDamping ( Real  Damping)
virtual

Set the Damping of the linear Limits.

Parameters
DampingThe new damping value placed on forces the limits impose

Definition at line 269 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearLimitLower ( const Vector3 Limit)
virtual

Set the Upper limits on translation.

Returns
A Vector3 that stores the upper limit x, y and z that cannot be exceeded

Definition at line 153 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearLimitRestitution ( Real  Restitution)
virtual

Set the Restitution of the linear Limits.

Parameters
RestitutionHow bouncy are the limits.

Definition at line 275 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearLimitSoftness ( Real  Softness)
virtual

Set the Softness of the linear Limits.

Parameters
SoftnessHow spongy, how much give does the constraint have.

Definition at line 263 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearLimitUpper ( const Vector3 Limit)
virtual

Set the lower limits on translation.

Parameters
LimitA Vector3 that stores the lower limit x, y and z that cannot be exceeded

Definition at line 150 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorEnabled ( const Vector3 Enableds)
virtual

Set whether or not the motor is enabled for all Linear Axis Simultaneously.

Parameters
EnabledsA Vector3 that will be interpretted as 3 true/false values where 0 is false and any other value it true.

Definition at line 307 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorEnabledOnAxis ( bool  Enabled,
int  Axis 
)
virtual

For one Axis, set whether or not the motor is enabled.

Parameters
EnabledIs the motor enabled? True for yes, false for no.
AxisThe Linear Axis to be set.

Definition at line 310 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorMaxForce ( const Vector3 Forces)
virtual

Set the Linear Motor Maximum force on all 3 translation axis.

Parameters
ForcesA Vector3 with the Max Motor Force for each axis.

Definition at line 282 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorMaxForceOnAxis ( Real  Force,
int  Axis 
)
virtual

For one Axis, set the Maximimum Motor Force.

Parameters
ForceThe new Max motor force.
AxisThe Linear Axis to be set.

Definition at line 285 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorTargetVelocity ( const Vector3 Velocities)
virtual

Set the Target velocity of the motor on each anuglar axis.

Parameters
VelocitiesA Vector3 containing the X, Y and Z Target Velocites.

Definition at line 294 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetLinearMotorTargetVelocityOnAxis ( Real  Velocity,
int  Axis 
)
virtual

For one Axis, set the target velocity of the Linear motor.

Parameters
VelocityThe new Target Velovity.
AxisThe Linear Axis to be set.

Definition at line 297 of file generic6dofconstraint.cpp.

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

Set The relative location of the pivot from ActorA's Center of gravity.

Parameters
LocationThe New value for PivotA

Ultimately this information winds up being stored in the TransformA.

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 119 of file generic6dofconstraint.cpp.

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

Set The relative rotation of ActorA.

Parameters
RotationThe new rotation amount for A

Ultimately this information winds up being stored in the TransformA

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 132 of file generic6dofconstraint.cpp.

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

Set the Position and Rotation using a Transform.

Parameters
TranAThe new Position and rotation

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 106 of file generic6dofconstraint.cpp.

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

Set The relative location of the pivot from ActorB's Center of gravity.

Parameters
LocationThe New value for PivotB

Ultimately this information winds up being stored in the TransformB

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 122 of file generic6dofconstraint.cpp.

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

Set The relative rotation of ActorB.

Parameters
otationThe new rotation amount for B

Ultimately this information winds up being stored in the TransformB

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 135 of file generic6dofconstraint.cpp.

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

Set the Position and Rotation using a Transform.

Parameters
TranBThe new Position and rotation

Implements Mezzanine::Physics::DualTransformConstraint.

Definition at line 109 of file generic6dofconstraint.cpp.

void Mezzanine::Physics::Generic6DofConstraint::SetUseFrameOffset ( bool  FrameOffset)
virtual

Set the stored value for UseFrameOffset on this hinge in the physics subsystem(bullet)

Parameters
FrameOffsetThe new desired value.

Definition at line 367 of file generic6dofconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::Generic6DofConstraint::ValidAngularAxis ( ) 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 345 of file generic6dofconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::Generic6DofConstraint::ValidLinearAxis ( ) 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 336 of file generic6dofconstraint.cpp.

Constraint::ParamList Mezzanine::Physics::Generic6DofConstraint::ValidParamOnAxis ( 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 324 of file generic6dofconstraint.cpp.


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