32#ifndef BT_CONETWISTCONSTRAINT_H
33#define BT_CONETWISTCONSTRAINT_H
39#ifdef BT_USE_DOUBLE_PRECISION
40#define btConeTwistConstraintData2 btConeTwistConstraintDoubleData
41#define btConeTwistConstraintDataName "btConeTwistConstraintDoubleData"
43#define btConeTwistConstraintData2 btConeTwistConstraintData
44#define btConeTwistConstraintDataName "btConeTwistConstraintData"
60#ifdef IN_PARALLELL_SOLVER
128 void adjustSwingAxisToUseEllipseNormal(
btVector3 & vSwingAxis)
const;
137 virtual void buildJacobian();
162 m_angularOnly = angularOnly;
167 return m_angularOnly;
176 m_twistSpan = limitValue;
181 m_swingSpan2 = limitValue;
186 m_swingSpan1 = limitValue;
216 btAssert(0 &&
"Invalid limitIndex specified for btConeTwistConstraint");
235 m_swingSpan1 = _swingSpan1;
236 m_swingSpan2 = _swingSpan2;
237 m_twistSpan = _twistSpan;
239 m_limitSoftness = _softness;
240 m_biasFactor = _biasFactor;
241 m_relaxationFactor = _relaxationFactor;
249 return m_solveTwistLimit;
254 return m_solveSwingLimit;
259 return m_twistLimitSign;
262 void calcAngleInfo();
279 return m_limitSoftness;
287 return m_relaxationFactor;
304 m_maxMotorImpulse = maxMotorImpulse;
305 m_bNormalizedMotorStrength =
false;
309 m_maxMotorImpulse = maxMotorImpulse;
310 m_bNormalizedMotorStrength =
true;
324 void setMotorTargetInConstraintSpace(
const btQuaternion& q);
330 virtual void setParam(
int num,
btScalar value,
int axis = -1);
345 virtual btScalar getParam(
int num,
int axis = -1)
const;
375#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
@ BT_CONETWIST_FLAGS_LIN_CFM
@ BT_CONETWIST_FLAGS_LIN_ERP
@ BT_CONETWIST_FLAGS_ANG_CFM
#define btConeTwistConstraintData2
#define btConeTwistConstraintDataName
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define SIMD_FORCE_INLINE
btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc)
const btRigidBody & getRigidBodyB() const
bool isMaxMotorImpulseNormalized() const
const btQuaternion & getMotorTarget() const
btScalar m_accSwingLimitImpulse
bool getAngularOnly() const
btScalar m_accTwistLimitImpulse
const btTransform & getBFrame() const
btScalar getLimit(int limitIndex) const
btScalar getDamping() const
btScalar getSwingSpan1() const
BT_DECLARE_ALIGNED_ALLOCATOR()
btScalar getTwistLimitSign()
bool m_useSolveConstraintObsolete
btScalar getBiasFactor() const
void setLimit(btScalar _swingSpan1, btScalar _swingSpan2, btScalar _twistSpan, btScalar _softness=1.f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f)
btVector3 m_accMotorImpulse
void setAngularOnly(bool angularOnly)
btScalar m_twistCorrection
btScalar m_swingLimitRatio
btScalar m_twistLimitSign
virtual int calculateSerializeBufferSize() const
btScalar getTwistAngle() const
void setLimit(int limitIndex, btScalar limitValue)
void setMaxMotorImpulse(btScalar maxMotorImpulse)
btScalar m_swingCorrection
const btRigidBody & getRigidBodyA() const
btScalar m_twistLimitRatio
bool m_bNormalizedMotorStrength
void setFixThresh(btScalar fixThresh)
btScalar getLimitSoftness() const
const btTransform & getFrameOffsetB() const
void setMaxMotorImpulseNormalized(btScalar maxMotorImpulse)
btScalar getSwingSpan2() const
btScalar getTwistSpan() const
bool isMotorEnabled() const
const btTransform & getAFrame() const
void setDamping(btScalar damping)
btScalar getRelaxationFactor() const
const btTransform & getFrameOffsetA() const
btScalar m_maxMotorImpulse
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar m_relaxationFactor
btScalar getMaxMotorImpulse() const
Jacobian entry is an abstraction that allows to describe constraints it can be used in combination wi...
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
The btRigidBody is the main class for rigid body objects.
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual int calculateSerializeBufferSize() const
TypedConstraint is the baseclass for Bullet constraints and vehicles.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btVector3 can be used to represent 3D points and vectors.
this structure is not used, except for loading pre-2.82 .bullet files
btTypedConstraintData m_typeConstraintData
btTransformFloatData m_rbBFrame
btTransformFloatData m_rbAFrame
btTypedConstraintDoubleData m_typeConstraintData
btTransformDoubleData m_rbBFrame
double m_relaxationFactor
btTransformDoubleData m_rbAFrame
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
this structure is not used, except for loading pre-2.82 .bullet files