40 #ifndef _physicsgeneric6dofconstraint_h
41 #define _physicsgeneric6dofconstraint_h
43 #include "Physics/dualtransformconstraint.h"
45 class btGeneric6DofConstraint;
96 AngularXAsRotationAxis = 0,
97 AngularYAsRotationAxis = 1,
98 AngularZAsRotationAxis = 2
108 virtual void DestroyConstraint();
151 virtual void SetPivotATransform(
const Transform& TransA);
153 virtual void SetPivotBTransform(
const Transform& TransB);
155 virtual Transform GetPivotATransform()
const;
157 virtual Transform GetPivotBTransform()
const;
160 virtual void SetPivotALocation(
const Vector3& Location);
162 virtual void SetPivotBLocation(
const Vector3& Location);
164 virtual Vector3 GetPivotALocation()
const;
166 virtual Vector3 GetPivotBLocation()
const;
169 virtual void SetPivotARotation(
const Quaternion& Rotation);
171 virtual void SetPivotBRotation(
const Quaternion& Rotation);
182 virtual void SetUseFrameOffset(
const Boole FrameOffset);
185 virtual Boole GetUseFrameOffset()
const;
188 void SetUseLinearReferenceFrameA(
const Boole UseRefFrameA);
191 Boole GetUseLinearReferenceFrameA()
const;
202 virtual Whole ConvertFrom6AxisTo3Axis(
const Whole Axis)
const;
208 virtual Whole ConvertAngularTo6Axis(
const Whole Axis)
const;
221 virtual void SetLinearLimitLower(
const Vector3& Limit);
224 virtual Vector3 GetLinearLimitLower()
const;
227 virtual void SetLinearLimitUpper(
const Vector3& Limit);
230 virtual Vector3 GetLinearLimitUpper()
const;
235 void SetLinearLimitLowerOnAxis(
const Real Limit,
Whole TranslationAxis);
239 Real GetLinearLimitLowerOnAxis(
Whole TranslationAxis)
const;
243 void SetLinearLimitUpperOnAxis(
const Real Limit,
Whole TranslationAxis);
247 Real GetLinearLimitUpperOnAxis(
Whole TranslationAxis)
const;
251 virtual void SetAngularLimitUpper(
const Vector3& Limit);
254 virtual Vector3 GetAngularLimitUpper()
const;
257 virtual void SetAngularLimitLower(
const Vector3& Limit);
260 virtual Vector3 GetAngularLimitLower()
const;
265 void SetAngularLimitLowerOnAxis(
const Real Limit,
Whole RotationAxis);
269 Real GetAngularLimitLowerOnAxis(
Whole RotationAxis)
const;
273 void SetAngularLimitUpperOnAxis(
const Real Limit,
Whole RotationAxis);
277 Real GetAngularLimitUpperOnAxis(
Whole RotationAxis)
const;
284 virtual void SetAngularLimitMaxForce(
const Vector3& MaxLimitForces);
287 virtual Vector3 GetAngularLimitMaxForce()
const;
291 virtual void SetAngularLimitMaxForceOnAxis(
const Real MaxLimitForce,
Whole Axis);
295 virtual Real GetAngularLimitMaxForceOnAxis(
Whole Axis)
const;
299 virtual void SetAngularMotorTargetVelocity(
const Vector3& Velocities);
302 virtual Vector3 GetAngularMotorTargetVelocity()
const;
306 virtual void SetAngularMotorTargetVelocityOnAxis(
const Real Velocity,
Whole Axis);
310 virtual Real GetAngularMotorTargetVelocityOnAxis(
Whole Axis)
const;
314 virtual void SetAngularMotorMaxForce(
const Vector3& Forces);
317 virtual Vector3 GetAngularMotorMaxForce()
const;
321 virtual void SetAngularMotorMaxForceOnAxis(
const Real Force,
Whole Axis);
325 virtual Real GetAngularMotorMaxForceOnAxis(
Whole Axis)
const;
329 virtual void SetAngularMotorDamping(
const Vector3& Dampings);
332 virtual Vector3 GetAngularMotorDamping()
const;
336 virtual void SetAngularMotorDampingOnAxis(
const Real Damping,
Whole Axis);
340 virtual Real GetAngularMotorDampingOnAxis(
Whole Axis)
const;
344 virtual void SetAngularMotorRestitution(
const Vector3& Restitutions);
347 virtual Vector3 GetAngularMotorRestitution()
const;
351 virtual void SetAngularMotorRestitutionOnAxis(
const Real Restitution,
Whole Axis);
355 virtual Real GetAngularMotorRestitutionOnAxis(
Whole Axis)
const;
359 virtual void SetAngularMotorEnabled(
const Vector3& Enableds);
362 virtual Vector3 GetAngularMotorEnabled()
const;
366 virtual void SetAngularMotorEnabledOnAxis(
const Boole Enabled,
Whole Axis);
370 virtual Boole GetAngularMotorEnabledOnAxis(
Whole Axis)
const;
377 virtual void SetLinearLimitSoftness(
const Real Softness);
380 virtual Real GetLinearLimitSoftness()
const;
384 virtual void SetLinearLimitDamping(
const Real Damping);
387 virtual Real GetLinearLimitDamping()
const;
391 virtual void SetLinearLimitRestitution(
const Real Restitution);
394 virtual Real GetLinearLimitRestitution()
const;
398 virtual void SetLinearMotorMaxForce(
const Vector3& Forces);
402 virtual void SetLinearMotorMaxForceOnAxis(
const Real Force,
Whole Axis);
405 virtual Vector3 GetLinearMotorMaxForce()
const;
409 virtual Real GetLinearMotorMaxForceOnAxis(
Whole Axis)
const;
413 virtual void SetLinearMotorTargetVelocity(
const Vector3& Velocities);
417 virtual void SetLinearMotorTargetVelocityOnAxis(
const Real Velocity,
Whole Axis);
420 virtual Vector3 GetLinearMotorTargetVelocity()
const;
424 virtual Real GetLinearMotorTargetVelocityOnAxis(
Whole Axis)
const;
428 virtual void SetLinearMotorEnabled(
const Vector3& Enableds);
432 virtual void SetLinearMotorEnabledOnAxis(
const Boole Enabled,
Whole Axis);
435 virtual Vector3 GetLinearMotorEnabled()
const;
439 virtual Boole GetLinearMotorEnabledOnAxis(
Whole Axis)
const;
457 virtual void ProtoSerializeProperties(
XML::Node& SelfRoot)
const;
459 virtual void ProtoDeSerializeProperties(
const XML::Node& SelfRoot);
462 virtual String GetDerivedSerializableName()
const;
465 static String GetSerializableName();
471 virtual btTypedConstraint* _GetConstraintBase()
const;
std::vector< int > AxisList
Used to Store lists of Int Axis for return types.
bool Boole
Generally acts a single bit, true or false.
UsableAxis
Identify the Axis a bit easier when iterating over them is less convienent than typing an Identifier...
Create simple but specific limits on any axis of movement or rotation.
float Real
A Datatype used to represent a real floating point number.
A light-weight handle for manipulating nodes in DOM tree.
uint32_t UInt32
An 32-bit unsigned integer.
btGeneric6DofConstraint * Generic6dof
The internal constraint that this class encapsulates.
ConstraintParam
Used by constraints for setting some parameters.
This is a proxy from which rigid body proxys are handled.
std::vector< ConstraintParam > ParamList
Used to Store lists of param for return types.
This is simply a place for storing all the Physics Related functions.
This is used to represent a point in space, or a vector through space.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
This is used to store information about rotation in 3d space.
std::string String
A datatype used to a series of characters.