40 #ifndef _physicsuniversalconstraint_cpp
41 #define _physicsuniversalconstraint_cpp
43 #include "Physics/universalconstraint.h"
44 #include "Physics/rigidproxy.h"
46 #include "stringtool.h"
49 #include <btBulletDynamicsCommon.h>
74 {
return static_cast<btUniversalConstraint*
>( this->
Generic6dof ); }
79 btVector3 TempOrigin(0,0,0);
80 btVector3 TempAxis1(0,1,0);
81 btVector3 TempAxis2(1,0,0);
101 { this->
Universal()->setUpperLimit(Ang1Max,Ang2Max); }
104 { this->
Universal()->setLowerLimit(Ang1Min,Ang2Min); }
113 {
return "UniversalConstraint"; }
static String GetSerializableName()
Get the name of the the XML tag the class will leave behind as its instances are serialized.
virtual void CreateConstraint(RigidProxy *RigidA, RigidProxy *RigidB, const Transform &TransA, const Transform &TransB)
Creates the internal constraint.
virtual void SetLowerLimit(const Real Ang1Min, const Real Ang2Min)
Sets the minimum angular limits of this constraint.
Create simple but specific limits on any axis of movement or rotation.
virtual void SetUpperLimit(const Real Ang1Max, const Real Ang2Max)
Sets the maximum angular limits of this constraint.
virtual btUniversalConstraint * Universal() const
UniversalConstraint(const UInt32 ID, RigidProxy *ProxyA, RigidProxy *ProxyB, const Vector3 &Anchor, const Vector3 &Axis1, const Vector3 &Axis2, PhysicsManager *Creator)
Convenience axis constructor.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
btVector3 GetBulletVector3() const
Gets a Bullet vector3.
A light-weight handle for manipulating nodes in DOM tree.
virtual ~UniversalConstraint()
Class destructor.
uint32_t UInt32
An 32-bit unsigned integer.
btGeneric6DofConstraint * Generic6dof
The internal constraint that this class encapsulates.
virtual btRigidBody * _GetPhysicsObject() const
Accessor for the internal rigid body physics proxy.
This is a proxy from which rigid body proxys are handled.
This is simply a place for storing all the Physics Related functions.
RigidProxy * ProxA
The first Collidable this constraint applies to.
This is used to represent a point in space, or a vector through space.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
RigidProxy * ProxB
The second Collidable this constraint applies to.
The bulk of the engine components go in this namspace.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this Constraint.
std::string String
A datatype used to a series of characters.