20#define DEFAULT_DEBUGDRAW_SIZE btScalar(0.05f)
24 m_userConstraintType(-1),
25 m_userConstraintPtr((void*)-1),
28 m_needsFeedback(false),
29 m_overrideNumSolverIterations(-1),
31 m_rbB(getFixedBody()),
40 m_userConstraintType(-1),
41 m_userConstraintPtr((void*)-1),
44 m_needsFeedback(false),
45 m_overrideNumSolverIterations(-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)
129 tcd->m_disableCollisionsBetweenLinkedBodies =
false;
134 tcd->m_disableCollisionsBetweenLinkedBodies =
true;
137 tcd->m_disableCollisionsBetweenLinkedBodies =
true;
194 if (relativeAngle > 0.0f)
btScalar btNormalizeAngle(btScalar angleInRadians)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
bool btEqual(btScalar a, btScalar eps)
#define DEFAULT_DEBUGDRAW_SIZE
#define btTypedConstraintData2
#define btTypedConstraintDataName
btScalar m_relaxationFactor
btScalar getError() const
Returns correction value multiplied by sign value.
void test(const btScalar angle)
Checks conastaint angle against limit.
void set(btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f)
Sets all limit's parameters.
void fit(btScalar &angle) const
Checks given angle against limit.
The btRigidBody is the main class for rigid body objects.
int getNumConstraintRefs() const
void setMassProps(btScalar mass, const btVector3 &inertia)
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
btScalar m_appliedImpulse
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
internal method used by the constraint solver, don't use them directly
static btRigidBody & getFixedBody()
int m_overrideNumSolverIterations
btScalar m_breakingImpulseThreshold
btTypedConstraint(btTypedConstraintType type, btRigidBody &rbA)
btVector3 can be used to represent 3D points and vectors.
rudimentary class to provide type info