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

#include <constraint.h>

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

Public Member Functions

 SliderConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &VectorA, const Vector3 &VectorB, const Quaternion &QuaternionA, const Quaternion &QuaternionB, bool UseLinearReferenceA)
 
 SliderConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Transform &TransformA, const Transform &TransformB, bool UseLinearReferenceA=false)
 Two body Terse constructor. More...
 
 SliderConstraint (RigidProxy *ProxyB, const Vector3 &VectorB, const Quaternion &QuaternionB, bool UseLinearReferenceA)
 
virtual ~SliderConstraint ()
 Class destructor.
 
virtual btTypedConstraint * GetConstraintBase () const
 Get the Bullet constraint that this class encapsulates. 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 HasParamBeenSet (ConstraintParam Param, int Axis) const
 
virtual void SetDampingDirAng (const Real &DampingDirAng)
 
virtual void SetDampingDirLin (const Real &DampingDirLin)
 
virtual void SetDampingLimAng (const Real &DampingLimAng)
 
virtual void SetDampingLimLin (const Real &DampingLimLin)
 
virtual void SetDampingOrthoAng (const Real &DampingOrthoAng)
 
virtual void SetDampingOrthoLin (const Real &DampingOrthoLin)
 
virtual void SetLowerAngLimit (const Real &LowerLimit)
 
virtual void SetLowerLinLimit (const Real &LowerLimit)
 
virtual void SetMaxAngMotorForce (const Real &MaxAngMotorForce)
 
virtual void SetMaxLinMotorForce (const Real &MaxLinMotorForce)
 
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 SetPoweredAngMotor (bool OnOff)
 
virtual void SetPoweredLinMotor (bool OnOff)
 
virtual void SetRestitutionDirAng (const Real &RestitutionDirAng)
 
virtual void SetRestitutionDirLin (const Real &RestitutionDirLin)
 
virtual void SetRestitutionLimAng (const Real &RestitutionLimAng)
 
virtual void SetRestitutionLimLin (const Real &RestitutionLimLin)
 
virtual void SetRestitutionOrthoAng (const Real &RestitutionOrthoAng)
 
virtual void SetRestitutionOrthoLin (const Real &RestitutionOrthoLin)
 
virtual void SetSoftnessDirAng (const Real &SoftnessDirAng)
 
virtual void SetSoftnessDirLin (const Real &SoftnessDirLin)
 
virtual void SetSoftnessLimAng (const Real &SoftnessLimAng)
 
virtual void SetSoftnessLimLin (const Real &SoftnessLimLin)
 
virtual void SetSoftnessOrthoAng (const Real &SoftnessOrthoAng)
 
virtual void SetSoftnessOrthoLin (const Real &SoftnessOrthoLin)
 
virtual void SetTargetAngMotorVelocity (const Real &TargetAngMotorVelocity)
 
virtual void SetTargetLinMotorVelocity (const Real &TargetLinMotorVelocity)
 
virtual void SetUpperAngLimit (const Real &UpperLimit)
 
virtual void SetUpperLinLimit (const Real &UpperLimit)
 
virtual void SetUseFrameOffset (bool FrameOffset)
 
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...
 
- Public Member Functions inherited from Mezzanine::Physics::DualTransformConstraint
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...
 
- Public Member Functions inherited from Mezzanine::Physics::Constraint
virtual ~Constraint ()
 Class destructor. 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 bool IsParamValidOnAxis (ConstraintParam Param, int Axis) const
 Is a certain Parameter valid on a certain axis. More...
 
virtual void SetParam (ConstraintParam Param, Real Value, int Axis=-1)
 Provides override of constraint parameters. More...
 
virtual AxisList ValidAxis () const
 Get a sorted (low to high) list of All Valid Axis. More...
 
virtual ParamList ValidParams () const
 Get A sorted (low to high) list of Parameters that are valid on all Axis. More...
 

Protected Attributes

btSliderConstraint * Slider
 Bullet constraint that this class encapsulates.
 

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
< ConstraintParam
ParamList
 Used to Store lists of param for return types.
 
- 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...
 
- Protected Member Functions inherited from Mezzanine::Physics::Constraint
 Constraint ()
 No initialization constructor. More...
 
void SetBodies (RigidProxy *Prox1, RigidProxy *Prox2)
 Sets the Internal Proxy pointers. More...
 
void SetBodies (RigidProxy *Prox1)
 Sets the Internal Proxy pointers. More...
 

Detailed Description

This class is incomplete

Definition at line 57 of file sliderconstraint.h.

Constructor & Destructor Documentation

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

Two body Terse constructor.

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

Definition at line 67 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 333 of file sliderconstraint.cpp.

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

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

Get the relative rotation for ActorA.

Returns
A Quaternion that has the rotation

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 121 of file sliderconstraint.cpp.

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

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

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

Get the relative rotation for ActorB.

Returns
A Quaternion that has the rotation

Reimplemented from Mezzanine::Physics::DualTransformConstraint.

Definition at line 124 of file sliderconstraint.cpp.

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

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

Implements Mezzanine::Physics::Constraint.

Definition at line 305 of file sliderconstraint.cpp.

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

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

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

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

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

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

Constraint::AxisList Mezzanine::Physics::SliderConstraint::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 296 of file sliderconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::SliderConstraint::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 287 of file sliderconstraint.cpp.

Constraint::ParamList Mezzanine::Physics::SliderConstraint::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 275 of file sliderconstraint.cpp.


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