MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
Mezzanine::Physics::DualTransformConstraint Class Referenceabstract

All constraints that track rotation and location of the Pivot relative to each Actor inherit from this. More...

#include <dualtransformconstraint.h>

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

Public Member Functions

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 =0
 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 =0
 Get the current Rotation and Location of Actor B. More...
 
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 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)=0
 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)=0
 Set the Position and Rotation using a Transform. More...
 
- Public Member Functions inherited from Mezzanine::Physics::Constraint
virtual ~Constraint ()
 Class destructor. More...
 
virtual btTypedConstraint * GetConstraintBase () const =0
 Get the Bullet constraint that this class encapsulates. 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 HasParamBeenSet (ConstraintParam Param, int Axis) const =0
 Has the given Param on the Given Axis been set yet. 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 ValidAngularAxis () const =0
 Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation) More...
 
virtual AxisList ValidAxis () const
 Get a sorted (low to high) list of All Valid Axis. More...
 
virtual AxisList ValidLinearAxis () const =0
 Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation) More...
 
virtual ParamList ValidParamOnAxis (int Axis) const =0
 Get a sorted (low to high) list of Parameters that are valid on this Axis. More...
 
virtual ParamList ValidParams () const
 Get A sorted (low to high) list of Parameters that are valid on all 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::Constraint
static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized. 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
< ConstraintParam
ParamList
 Used to Store lists of param for return types.
 
- 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...
 
- Protected Attributes inherited from Mezzanine::Physics::Constraint
RigidProxyProxA
 The first Collidable this constraint applies to. More...
 
RigidProxyProxB
 The second Collidable this constraint applies to. More...
 

Detailed Description

All constraints that track rotation and location of the Pivot relative to each Actor inherit from this.

Since not all contraints provide tracking for the Actor Transform (location/rotation of the pivot) we subdivided the constraints to unify the interface of those that could be unified. This stores nothing, but provides uniform access to the transform and rotation functions.

Any deriving class must implement every thing from TypedConstraint and the four set/get Transform function. It is expected that more derived classes will implement the Set/Get Pivot/Rotation Functino in a more efficient Manner if a more efficient way exists. The non-transform get/set function are implmented in terms of the get/set transform function extra copies of values and extra reading/writing may occur if the compiler weakly optimizes. Of course, implementing more functions could slow down the software if it no longer fits in CPU caches. As always benchmark if this is something that may be critically slowing you down.

Definition at line 61 of file dualtransformconstraint.h.

Member Function Documentation

virtual Vector3 Mezzanine::Physics::DualTransformConstraint::GetPivotALocation ( ) const
inlinevirtual

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

Returns
A Vector3 with the pivot location.

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 89 of file dualtransformconstraint.h.

virtual Quaternion Mezzanine::Physics::DualTransformConstraint::GetPivotARotation ( ) const
inlinevirtual

Get the relative rotation for ActorA.

Returns
A Quaternion that has the rotation

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 108 of file dualtransformconstraint.h.

virtual Transform Mezzanine::Physics::DualTransformConstraint::GetPivotATransform ( ) const
pure virtual

Get the current Rotation and Location of Actor A.

Returns
This returns a Mezzanine::Transform

Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

virtual Vector3 Mezzanine::Physics::DualTransformConstraint::GetPivotBLocation ( ) const
inlinevirtual

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

Returns
A Vector3 with the pivot location.

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 93 of file dualtransformconstraint.h.

virtual Quaternion Mezzanine::Physics::DualTransformConstraint::GetPivotBRotation ( ) const
inlinevirtual

Get the relative rotation for ActorB.

Returns
A Quaternion that has the rotation

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 112 of file dualtransformconstraint.h.

virtual Transform Mezzanine::Physics::DualTransformConstraint::GetPivotBTransform ( ) const
pure virtual

Get the current Rotation and Location of Actor B.

Returns
This returns a Mezzanine::Transform

Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

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

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

Parameters
OneNodeand XML::Node containing the data.

Reimplemented from Mezzanine::Physics::Constraint.

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::Generic6DofSpringConstraint.

Definition at line 83 of file dualtransformconstraint.cpp.

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

This stores each Actor's Transform

Reimplemented from Mezzanine::Physics::Constraint.

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::Generic6DofSpringConstraint.

Definition at line 55 of file dualtransformconstraint.cpp.

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

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

Returns
A string containing "DualTransformConstraint"

Definition at line 114 of file dualtransformconstraint.cpp.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotALocation ( const Vector3 Location)
inlinevirtual

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 in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 80 of file dualtransformconstraint.h.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotARotation ( const Quaternion Rotation)
inlinevirtual

Set The relative rotation of ActorA.

Parameters
RotationThe new rotation amount for A

Ultimately this information winds up being stored in the TransformA

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 99 of file dualtransformconstraint.h.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotATransform ( const Transform TranA)
pure virtual

Set the Position and Rotation using a Transform.

Parameters
TranAThe new Position and rotation

Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotBLocation ( const Vector3 Location)
inlinevirtual

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 in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 85 of file dualtransformconstraint.h.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotBRotation ( const Quaternion Rotation)
inlinevirtual

Set The relative rotation of ActorB.

Parameters
otationThe new rotation amount for B

Ultimately this information winds up being stored in the TransformB

Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.

Definition at line 104 of file dualtransformconstraint.h.

virtual void Mezzanine::Physics::DualTransformConstraint::SetPivotBTransform ( const Transform TranB)
pure virtual

Set the Position and Rotation using a Transform.

Parameters
TranBThe new Position and rotation

Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.


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