All constraints that track rotation and location of the Pivot relative to each Actor inherit from this. More...
#include <dualtransformconstraint.h>
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 RigidProxy * | GetProxyA () const |
Gets the first Proxy this constraint applies to. More... | |
virtual RigidProxy * | GetProxyB () 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 | |
RigidProxy * | ProxA |
The first Collidable this constraint applies to. More... | |
RigidProxy * | ProxB |
The second Collidable this constraint applies to. More... | |
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.
|
inlinevirtual |
Get the location of the pivot relative to ActorA's Center of gravity.
Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.
Definition at line 89 of file dualtransformconstraint.h.
|
inlinevirtual |
Get the relative rotation for ActorA.
Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.
Definition at line 108 of file dualtransformconstraint.h.
|
pure virtual |
Get the current Rotation and Location of Actor A.
Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.
|
inlinevirtual |
Get the location of the pivot relative to ActorB's Center of gravity.
Reimplemented in Mezzanine::Physics::Generic6DofConstraint, Mezzanine::Physics::HingeConstraint, and Mezzanine::Physics::SliderConstraint.
Definition at line 93 of file dualtransformconstraint.h.
|
inlinevirtual |
Get the relative rotation for ActorB.
Reimplemented in Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.
Definition at line 112 of file dualtransformconstraint.h.
|
pure virtual |
Get the current Rotation and Location of Actor B.
Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.
|
virtual |
Take the data stored in an XML and overwrite this instance of this object with it.
OneNode | and 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.
|
virtual |
Convert this class to an XML::Node ready for serialization.
CurrentRoot | The 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.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 114 of file dualtransformconstraint.cpp.
|
inlinevirtual |
Set The relative location of the pivot from ActorA's Center of gravity.
Location | The 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.
|
inlinevirtual |
Set The relative rotation of ActorA.
Rotation | The 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.
|
pure virtual |
Set the Position and Rotation using a Transform.
TranA | The new Position and rotation |
Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.
|
inlinevirtual |
Set The relative location of the pivot from ActorB's Center of gravity.
Location | The 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.
|
inlinevirtual |
Set The relative rotation of ActorB.
otation | The 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.
|
pure virtual |
Set the Position and Rotation using a Transform.
TranB | The new Position and rotation |
Implemented in Mezzanine::Physics::HingeConstraint, Mezzanine::Physics::Generic6DofConstraint, and Mezzanine::Physics::SliderConstraint.