Tries to make a point relative to each of two actors match in 3d space, without regard to rotation. More...
#include <point2pointconstraint.h>
Public Member Functions | |
Point2PointConstraint (const UInt32 ID, RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &PivotA, const Vector3 &PivotB, PhysicsManager *Creator) | |
Double body constructor. Binds the two bodies. More... | |
Point2PointConstraint (const UInt32 ID, RigidProxy *ProxyA, const Vector3 &PivotA, PhysicsManager *Creator) | |
Single body constructor. Binds the body to world space. More... | |
Point2PointConstraint (const XML::Node &SelfRoot, PhysicsManager *Creator) | |
XML constructor. More... | |
virtual | ~Point2PointConstraint () |
Class destructor. | |
virtual btTypedConstraint * | _GetConstraintBase () const |
Get the Bullet constraint that this class encapsulates. More... | |
virtual Real | GetDamping () const |
Get the current Damping. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this Constraint. More... | |
virtual Real | GetImpulseClamping () const |
get the current impulse clamping value. More... | |
virtual Vector3 | GetPivotA () const |
Get offset of the first proxy. More... | |
virtual Vector3 | GetPivotB () const |
Get offset of the second proxy. More... | |
virtual Real | GetTAU () const |
Retrieve the Tau Setting. More... | |
virtual Constraint::AxisList | GetValidAngularAxes () const |
Get A list sorted (low to high) of all axis that operate Angularly (that lock sliding/translation) More... | |
virtual Constraint::AxisList | GetValidLinearAxes () const |
Get a sorted (low to high) list of all axis that operate linearly (that lock sliding/translation) More... | |
virtual Constraint::ParamList | GetValidParamsOnAxis (int Axis) const |
Get a sorted (low to high) list of Parameters that are valid on this Axis. More... | |
virtual Boole | HasParamBeenSet (ConstraintParam Param, int Axis) const |
virtual void | ProtoDeSerializeInitData (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and initializes a new internal object with it. More... | |
virtual void | ProtoDeSerializeProperties (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite the properties of this object with it. More... | |
virtual void | ProtoSerializeInitData (XML::Node &SelfRoot) const |
Convert the data needed to initialize this class to an XML::Node ready for serialization. More... | |
virtual void | ProtoSerializeProperties (XML::Node &SelfRoot) const |
Convert the properties of this class to an XML::Node ready for serialization. More... | |
virtual void | SetDamping (const Real Damping) |
Set a resistive force against the constraint, not too dissimilar to from hinge friction or Air resistance. More... | |
virtual void | SetImpulseClamping (const Real Clamping) |
Set the current impulse clamping on the constraint. More... | |
virtual void | SetPivotA (const Vector3 &PivotA) |
Set offset of the first proxy. More... | |
virtual void | SetPivotB (const Vector3 &PivotB) |
Set offset of the second proxy. More... | |
virtual void | SetTAU (const Real TAU) |
This may be a scalar for how strongly Angular momentum affects linear momemtum. More... | |
Public Member Functions inherited from Mezzanine::Physics::Constraint | |
virtual | ~Constraint () |
Class destructor. | |
virtual void | EnableConstraint (const Boole Enable) |
Enables or disables this constraint. More... | |
virtual Boole | GetAllowCollisions () const |
Gets whether or not collisions can/will occur between the two constrained bodies. More... | |
virtual UInt32 | GetConstraintID () const |
Gets the unique ID of this constraint. 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 AxisList | GetValidAxes () const |
Get a sorted (low to high) list of All Valid Axis. More... | |
virtual ParamList | GetValidParams () const |
Get A sorted (low to high) list of Parameters that are valid on all Axis. More... | |
virtual Boole | IsConstraintEnabled () const |
Gets whether or not this constraint is enabled. More... | |
virtual Boole | IsParamValidOnAxis (ConstraintParam Param, int Axis) const |
Is a certain Parameter valid on a certain axis. More... | |
virtual void | ProtoDeSerialize (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it. More... | |
virtual void | ProtoDeSerializeGlobalOverrides (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite the global overrides of this object with it. More... | |
virtual void | ProtoSerialize (XML::Node &ParentNode) const |
Convert this class to an XML::Node ready for serialization. More... | |
virtual void | ProtoSerializeGlobalOverrides (XML::Node &SelfRoot) const |
Convert the global overrides of this class to an XML::Node ready for serialization. More... | |
virtual void | SetAllowCollisions (const Boole Allow) |
Sets whether collisions between the two constrained bodies should occur. More... | |
virtual void | SetParam (ConstraintParam Param, Real Value, int Axis=-1) |
Provides override of constraint parameters. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag the class will leave behind as its instances are serialized. More... | |
Static Public Member Functions inherited from Mezzanine::Physics::Constraint | |
static String | GetSerializableName () |
Get the name of the the XML tag the class will leave behind as its instances are serialized. More... | |
Protected Member Functions | |
virtual void | CreateConstraint (RigidProxy *RigidA, RigidProxy *RigidB, const Vector3 &PivotA, const Vector3 &PivotB) |
Creates the internal constraint. More... | |
virtual void | DestroyConstraint () |
Destroys the internal constraint. More... | |
Protected Member Functions inherited from Mezzanine::Physics::Constraint | |
Constraint (const UInt32 ID, PhysicsManager *Creator) | |
Zero body constructor. More... | |
Constraint (const UInt32 ID, RigidProxy *Prox1, PhysicsManager *Creator) | |
Single body constructor. More... | |
Constraint (const UInt32 ID, RigidProxy *Prox1, RigidProxy *Prox2, PhysicsManager *Creator) | |
Dual body constructor. More... | |
Protected Attributes | |
btPoint2PointConstraint * | Point2Point |
The internal constraint that this class encapsulates. More... | |
Protected Attributes inherited from Mezzanine::Physics::Constraint | |
Boole | AllowCollisions |
Whether or not collisions will be allowed to occure between the constrained bodies. More... | |
UInt32 | ConstraintID |
The unique ID used to identify this constraint. More... | |
Boole | Enabled |
Whether or not the constraint is currently taking effect. More... | |
PhysicsManager * | Manager |
This is a pointer to the physics manager that created and owns this constraint. More... | |
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. | |
Tries to make a point relative to each of two actors match in 3d space, without regard to rotation.
This will translate (push around) the actors to attempt to get the offsets to match up in 3d space. The actors can freely rotate about their relative offsets.
Definition at line 57 of file point2pointconstraint.h.
Mezzanine::Physics::Point2PointConstraint::Point2PointConstraint | ( | const UInt32 | ID, |
RigidProxy * | ProxyA, | ||
RigidProxy * | ProxyB, | ||
const Vector3 & | PivotA, | ||
const Vector3 & | PivotB, | ||
PhysicsManager * | Creator | ||
) |
Double body constructor. Binds the two bodies.
ID | The unique identifier assigned to this constraint. |
ProxyA | The first proxy to apply this constraint to. |
ProxyB | The second proxy to apply this constraint to. |
PivotA | The location in ProxyA's local space to apply the constraint to. |
PivotB | The location in ProxyB's local space to apply the constraint to. |
Creator | A pointer to the manager that created this constraint. |
Definition at line 59 of file point2pointconstraint.cpp.
Mezzanine::Physics::Point2PointConstraint::Point2PointConstraint | ( | const UInt32 | ID, |
RigidProxy * | ProxyA, | ||
const Vector3 & | PivotA, | ||
PhysicsManager * | Creator | ||
) |
Single body constructor. Binds the body to world space.
ID | The unique identifier assigned to this constraint. |
ProxyA | The proxy to apply this constraint to. |
PivotA | The position relative to ProxyA's center of gravity to "Pin" to the world. |
Creator | A pointer to the manager that created this constraint. |
Definition at line 64 of file point2pointconstraint.cpp.
Mezzanine::Physics::Point2PointConstraint::Point2PointConstraint | ( | const XML::Node & | SelfRoot, |
PhysicsManager * | Creator | ||
) |
XML constructor.
SelfRoot | An XML::Node containing the data to populate this class with. |
Creator | A pointer to the manager that created this constraint. |
Definition at line 69 of file point2pointconstraint.cpp.
|
virtual |
Get the Bullet constraint that this class encapsulates.
Implements Mezzanine::Physics::Constraint.
Definition at line 294 of file point2pointconstraint.cpp.
|
protectedvirtual |
Creates the internal constraint.
RigidA | A pointer to the first Proxy to be constrained. |
RigidB | A pointer to the second Proxy to be constrained. |
PivotA | The location in ProxyA's local space to apply the constraint to. |
PivotB | The location in ProxyB's local space to apply the constraint to. |
Definition at line 77 of file point2pointconstraint.cpp.
|
protectedvirtual |
Destroys the internal constraint.
Definition at line 88 of file point2pointconstraint.cpp.
|
virtual |
Get the current Damping.
Definition at line 126 of file point2pointconstraint.cpp.
|
virtual |
Gets the most derived serializable name of this Constraint.
Implements Mezzanine::Physics::Constraint.
Definition at line 285 of file point2pointconstraint.cpp.
|
virtual |
get the current impulse clamping value.
Definition at line 120 of file point2pointconstraint.cpp.
|
virtual |
Get offset of the first proxy.
Definition at line 108 of file point2pointconstraint.cpp.
|
virtual |
Get offset of the second proxy.
Definition at line 111 of file point2pointconstraint.cpp.
|
static |
Get the name of the the XML tag the class will leave behind as its instances are serialized.
Definition at line 288 of file point2pointconstraint.cpp.
|
virtual |
Retrieve the Tau Setting.
Definition at line 132 of file point2pointconstraint.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 157 of file point2pointconstraint.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 150 of file point2pointconstraint.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 138 of file point2pointconstraint.cpp.
|
virtual |
Implements Mezzanine::Physics::Constraint.
Definition at line 163 of file point2pointconstraint.cpp.
|
virtual |
Take the data stored in an XML Node and initializes a new internal object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Implements Mezzanine::Physics::Constraint.
Definition at line 218 of file point2pointconstraint.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the properties of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Reimplemented from Mezzanine::Physics::Constraint.
Definition at line 257 of file point2pointconstraint.cpp.
|
virtual |
Convert the data needed to initialize this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Implements Mezzanine::Physics::Constraint.
Definition at line 178 of file point2pointconstraint.cpp.
|
virtual |
Convert the properties of this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Reimplemented from Mezzanine::Physics::Constraint.
Definition at line 201 of file point2pointconstraint.cpp.
|
virtual |
Set a resistive force against the constraint, not too dissimilar to from hinge friction or Air resistance.
Damping | A real with the desired values. |
Definition at line 123 of file point2pointconstraint.cpp.
|
virtual |
Set the current impulse clamping on the constraint.
Clamping | This is a value that the constraint solver can use to adjust accumlated values when solving the constraint. |
Definition at line 117 of file point2pointconstraint.cpp.
|
virtual |
Set offset of the first proxy.
PivotA | The offset as a Vector3 relative to the center of mass of ProxyA. |
Definition at line 102 of file point2pointconstraint.cpp.
|
virtual |
Set offset of the second proxy.
PivotB | The offset as a Vector3 relative to the center of mass of ProxyB. |
Definition at line 105 of file point2pointconstraint.cpp.
|
virtual |
This may be a scalar for how strongly Angular momentum affects linear momemtum.
This function is a tightly wrapped bullet 3d function. No real documentation for it exists, from its responsibility/location in Bullet3d and a basic understanding of torque ( see http://en.wikipedia.org/wiki/Torque ) It is highly likely that it is a value to adjust how torque affects momentum.
Definition at line 129 of file point2pointconstraint.cpp.
|
protected |
The internal constraint that this class encapsulates.
Definition at line 62 of file point2pointconstraint.h.