This is a constraint that duplicate the angular motion of one object to another, adjusted by the provided ratio. More...
#include <gearconstraint.h>
Public Member Functions | |
GearConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &AxisA, const Vector3 &AxisB, const Real Ratio) | |
Double body constructor. Binds the two bodies. More... | |
virtual | ~GearConstraint () |
Class destructor. | |
virtual Vector3 | GetAxisA () const |
Gets the axis in ActorA's local space which will translate to ActorB. More... | |
virtual Vector3 | GetAxisB () const |
Gets the axis in ActorB's local space which will be manipulated. More... | |
virtual btTypedConstraint * | GetConstraintBase () const |
Get the Bullet constraint that this class encapsulates. More... | |
virtual Real | GetRotationRatio () const |
Gets the ratio at which ActorA's rotation will be applied to ActorB. 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 | SetAxisA (const Vector3 &Axis) |
Sets the axis in ActorA's local space which will translate to ActorB. More... | |
virtual void | SetAxisB (const Vector3 &Axis) |
Sets the axis in ActorB's local space which will be manipulated. More... | |
virtual void | SetRotationRatio (const Real Ratio) |
Sets the ratio at which ActorA's rotation will be applied to ActorB. 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... | |
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 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 | 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... | |
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... | |
Protected Attributes | |
btGearConstraint * | Gear |
Bullet constraint that this class encapsulates. | |
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... | |
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... | |
This is a constraint that duplicate the angular motion of one object to another, adjusted by the provided ratio.
Definition at line 57 of file gearconstraint.h.
Mezzanine::Physics::GearConstraint::GearConstraint | ( | RigidProxy * | ProxyA, |
RigidProxy * | ProxyB, | ||
const Vector3 & | AxisA, | ||
const Vector3 & | AxisB, | ||
const Real | Ratio | ||
) |
Double body constructor. Binds the two bodies.
ProxyA | The first proxy to apply this constraint to. |
ProxyB | The second proxy to apply this constraint to. |
PivotA | The axis in ProxyA's local space to apply the constraint to. |
PivotB | The axis in ProxyB's local space to apply the constraint to. |
Ratio | The amount the rotation from ProxyA that shall be used to be applied to ProxyB. |
Definition at line 55 of file gearconstraint.cpp.
|
virtual |
Gets the axis in ActorA's local space which will translate to ActorB.
Definition at line 74 of file gearconstraint.cpp.
|
virtual |
Gets the axis in ActorB's local space which will be manipulated.
Definition at line 77 of file gearconstraint.cpp.
|
virtual |
Get the Bullet constraint that this class encapsulates.
Implements Mezzanine::Physics::Constraint.
Definition at line 185 of file gearconstraint.cpp.
|
virtual |
Gets the ratio at which ActorA's rotation will be applied to ActorB.
Definition at line 86 of file gearconstraint.cpp.
|
virtual |
Implements Mezzanine::Physics::Constraint.
Definition at line 110 of file gearconstraint.cpp.
|
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.
Definition at line 148 of file gearconstraint.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. |
Reimplemented from Mezzanine::Physics::Constraint.
Definition at line 118 of file gearconstraint.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 179 of file gearconstraint.cpp.
|
virtual |
Sets the axis in ActorA's local space which will translate to ActorB.
Axis | A vector3 expressing the axis on ActorA this constraint will be applied to. |
Definition at line 68 of file gearconstraint.cpp.
|
virtual |
Sets the axis in ActorB's local space which will be manipulated.
Axis | A vector3 expressing the axis on ActorB this constraint will be applied to. |
Definition at line 71 of file gearconstraint.cpp.
|
virtual |
Sets the ratio at which ActorA's rotation will be applied to ActorB.
Ratio | The ratio at which rotations on ActorA's specified axis will be transfered to ActorB's specified axis. |
Definition at line 83 of file gearconstraint.cpp.
|
virtual |
Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation)
Implements Mezzanine::Physics::Constraint.
Definition at line 104 of file gearconstraint.cpp.
|
virtual |
Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation)
Implements Mezzanine::Physics::Constraint.
Definition at line 98 of file gearconstraint.cpp.
|
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.
Axis | the Axis to check. |
Implements Mezzanine::Physics::Constraint.
Definition at line 92 of file gearconstraint.cpp.