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

Tries to make a point relative to each of two actors match in 3d space, without regard to rotation. More...

#include <point2pointconstraint.h>

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

Public Member Functions

 Point2PointConstraint (RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &PivotA, const Vector3 &PivotB)
 Double body constructor. Binds the two bodies. More...
 
 Point2PointConstraint (RigidProxy *ProxyA, const Vector3 &PivotA)
 Single body constructor. Binds the body to world space. 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 Real GetImpulseClamping () const
 get the current impulse clamping value More...
 
virtual Vector3 GetPivotALocation () const
 Get offset of the first proxy. More...
 
virtual Vector3 GetPivotBLocation () const
 Get offset of the second proxy. More...
 
virtual Real GetTAU () const
 Retrieve the Tau Setting. 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 SetDamping (Real Damping)
 Set a resistive force against the constraint, not too dissimilar to from hinge friction or Air resistance. More...
 
virtual void SetImpulseClamping (Real Clamping)
 Set the current impulse clamping on the constraint. More...
 
virtual void SetPivotALocation (const Vector3 &PivotA)
 Set offset of the first proxy. More...
 
virtual void SetPivotBLocation (const Vector3 &PivotB)
 Set offset of the second proxy. More...
 
virtual void SetTAU (Real TAU)
 This may be a scalar for how strongly Angular momentum affects linear momemtum. 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 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...
 

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

btPoint2PointConstraint * Point2Point
 Bullet constraint that this class encapsulates.
 
- 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...
 

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Mezzanine::Physics::Point2PointConstraint::Point2PointConstraint ( RigidProxy ProxyA,
RigidProxy ProxyB,
const Vector3 PivotA,
const Vector3 PivotB 
)

Double body constructor. Binds the two bodies.

Parameters
ProxyAThe first proxy to apply this constraint to.
ProxyBThe second proxy to apply this constraint to.
PivotAThe location in ProxyA's local space to apply the constraint to.
PivotBThe location in ProxyB's local space to apply the constraint to.

Definition at line 58 of file point2pointconstraint.cpp.

Mezzanine::Physics::Point2PointConstraint::Point2PointConstraint ( RigidProxy ProxyA,
const Vector3 PivotA 
)

Single body constructor. Binds the body to world space.

Parameters
ProxyAThe proxy to apply this constraint to.
PivotAThe position relative to ProxyA's center of gravity to "Pin" to the world.

Definition at line 65 of file point2pointconstraint.cpp.

Member Function Documentation

btTypedConstraint * Mezzanine::Physics::Point2PointConstraint::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 75 of file point2pointconstraint.cpp.

Real Mezzanine::Physics::Point2PointConstraint::GetDamping ( ) const
virtual

Get the current Damping.

Returns
A Real with the Damping value.

Definition at line 105 of file point2pointconstraint.cpp.

Real Mezzanine::Physics::Point2PointConstraint::GetImpulseClamping ( ) const
virtual

get the current impulse clamping value

Returns
A real with the Clamping

Definition at line 99 of file point2pointconstraint.cpp.

Vector3 Mezzanine::Physics::Point2PointConstraint::GetPivotALocation ( ) const
virtual

Get offset of the first proxy.

Returns
The offset as a Vector3 relative to the center of mass of ProxyA.

Definition at line 87 of file point2pointconstraint.cpp.

Vector3 Mezzanine::Physics::Point2PointConstraint::GetPivotBLocation ( ) const
virtual

Get offset of the second proxy.

Returns
The offset as a Vector3 relative to the center of mass of ProxyB.

Definition at line 90 of file point2pointconstraint.cpp.

Real Mezzanine::Physics::Point2PointConstraint::GetTAU ( ) const
virtual

Retrieve the Tau Setting.

Returns
The Tau value as a Real

Definition at line 111 of file point2pointconstraint.cpp.

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

Implements Mezzanine::Physics::Constraint.

Definition at line 140 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::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.
Warning
A precondition of using this is that all of the actors intended for use must already be Deserialized.

Reimplemented from Mezzanine::Physics::Constraint.

Definition at line 184 of file point2pointconstraint.cpp.

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

Reimplemented from Mezzanine::Physics::Constraint.

Definition at line 150 of file point2pointconstraint.cpp.

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

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

Returns
A string containing "Point2PointConstraint"

Definition at line 218 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::SetDamping ( Real  Damping)
virtual

Set a resistive force against the constraint, not too dissimilar to from hinge friction or Air resistance.

Parameters
DampingA real with the desired values

Definition at line 102 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::SetImpulseClamping ( Real  Clamping)
virtual

Set the current impulse clamping on the constraint.

Parameters
ClampingThis is a value that the constraint solver can use to adjust accumlated values when solving the constraint.

Definition at line 96 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::SetPivotALocation ( const Vector3 PivotA)
virtual

Set offset of the first proxy.

Parameters
PivotAThe offset as a Vector3 relative to the center of mass of ProxyA.

Definition at line 81 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::SetPivotBLocation ( const Vector3 PivotB)
virtual

Set offset of the second proxy.

Parameters
PivotBThe offset as a Vector3 relative to the center of mass of ProxyB.

Definition at line 84 of file point2pointconstraint.cpp.

void Mezzanine::Physics::Point2PointConstraint::SetTAU ( Real  TAU)
virtual

This may be a scalar for how strongly Angular momentum affects linear momemtum.

Todo:
Research this more carefully

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 108 of file point2pointconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::Point2PointConstraint::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 134 of file point2pointconstraint.cpp.

Constraint::AxisList Mezzanine::Physics::Point2PointConstraint::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 127 of file point2pointconstraint.cpp.

Constraint::ParamList Mezzanine::Physics::Point2PointConstraint::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 114 of file point2pointconstraint.cpp.


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