20#define DEFAULT_DEBUGDRAW_SIZE btScalar(0.05f)
24 m_userConstraintType(-1),
40 m_userConstraintType(-1),
60 else if (lowLim == uppLim)
68 if ((
pos >= lowLim) && (
pos < (lowLim - delta_max)))
70 lim_fact = (lowLim -
pos) / delta_max;
72 else if (
pos < lowLim)
83 if ((
pos <= uppLim) && (
pos > (uppLim - delta_max)))
85 lim_fact = (uppLim -
pos) / delta_max;
87 else if (
pos > uppLim)
104const char* btTypedConstraint::serialize(
void* dataBuffer,
btSerializer* serializer)
const
117 tcd->m_objectType = m_objectType;
124 tcd->m_userConstraintType = m_userConstraintType;
129 tcd->m_disableCollisionsBetweenLinkedBodies =
false;
134 tcd->m_disableCollisionsBetweenLinkedBodies =
true;
137 tcd->m_disableCollisionsBetweenLinkedBodies =
true;
151 m_halfRange = (high - low) / 2.0f;
153 m_softness = _softness;
154 m_biasFactor = _biasFactor;
155 m_relaxationFactor = _relaxationFactor;
162 m_solveLimit =
false;
164 if (m_halfRange >= 0.0f)
167 if (deviation < -m_halfRange)
170 m_correction = -(deviation + m_halfRange);
173 else if (deviation > m_halfRange)
176 m_correction = m_halfRange - deviation;
184 return m_correction * m_sign;
189 if (m_halfRange > 0.0f)
192 if (!
btEqual(relativeAngle, m_halfRange))
194 if (relativeAngle > 0.0f)
btFixedConstraint btRigidBody & rbB
SIMD_FORCE_INLINE bool btEqual(btScalar a, btScalar eps)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btNormalizeAngle(btScalar angleInRadians)
btSimdScalar m_appliedImpulse
int m_overrideNumSolverIterations
#define DEFAULT_DEBUGDRAW_SIZE
btScalar m_breakingImpulseThreshold
#define btTypedConstraintData2
void * m_userConstraintPtr
#define btTypedConstraintDataName
btJointFeedback * m_jointFeedback
static btRigidBody & getFixedBody()
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
btScalar getError() const
Returns correction value multiplied by sign value.
void test(const btScalar angle)
void set(btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f)
void fit(btScalar &angle) const
int getNumConstraintRefs() const
btTypedConstraint * getConstraintRef(int index)
virtual void * getUniquePointer(void *oldPtr)=0
virtual void serializeName(const char *ptr)=0
virtual const char * findNameForPointer(const void *ptr) const =0
rudimentary class to provide type info