36#ifndef BT_CONETWISTCONSTRAINT_H
37#define BT_CONETWISTCONSTRAINT_H
43#ifdef BT_USE_DOUBLE_PRECISION
44#define btConeTwistConstraintData2 btConeTwistConstraintDoubleData
45#define btConeTwistConstraintDataName "btConeTwistConstraintDoubleData"
47#define btConeTwistConstraintData2 btConeTwistConstraintData
48#define btConeTwistConstraintDataName "btConeTwistConstraintData"
64#ifdef IN_PARALLELL_SOLVER
133 void adjustSwingAxisToUseEllipseNormal(
btVector3& vSwingAxis)
const;
144 virtual void buildJacobian();
171 m_angularOnly = angularOnly;
176 return m_angularOnly;
185 m_twistSpan = limitValue;
190 m_swingSpan2 = limitValue;
195 m_swingSpan1 = limitValue;
225 btAssert(0 &&
"Invalid limitIndex specified for btConeTwistConstraint");
244 m_swingSpan1 = _swingSpan1;
245 m_swingSpan2 = _swingSpan2;
246 m_twistSpan = _twistSpan;
248 m_limitSoftness = _softness;
249 m_biasFactor = _biasFactor;
250 m_relaxationFactor = _relaxationFactor;
258 return m_solveTwistLimit;
263 return m_solveSwingLimit;
268 return m_twistLimitSign;
271 void calcAngleInfo();
288 return m_limitSoftness;
296 return m_relaxationFactor;
325 void setMotorTargetInConstraintSpace(
const btQuaternion &q);
331 virtual void setParam(
int num,
btScalar value,
int axis = -1);
347 virtual btScalar getParam(
int num,
int axis = -1)
const;
383#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