|
Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
28 #define USE_OFFSET_FOR_CONSTANT_FRAME true
85 m_useSolveConstraintObsolete(false),
88 m_useLinearReferenceFrameA(useLinearReferenceFrameA)
97 m_useSolveConstraintObsolete(false),
99 m_useLinearReferenceFrameA(useLinearReferenceFrameA)
186 for(i = 0; i < 3; i++)
302 ax1 = ax1A * factA + ax1B * factB;
378 btVector3 tmpA(0,0,0), tmpB(0,0,0), relA(0,0,0), relB(0,0,0), c(0,0,0);
394 btVector3 totalDist = projA + ax1 * sliderOffs - projB;
396 relA = orthoA + totalDist * factA;
397 relB = orthoB - totalDist * factB;
399 p = orthoB * factA + orthoA * factB;
412 tmpA = relA.
cross(p);
413 tmpB = relB.
cross(p);
416 tmpA = relA.cross(q);
417 tmpB = relB.cross(q);
451 k = info->
fps * currERP;
455 rhs = k * q.
dot(ofs);
470 limit = (limit_err >
btScalar(0.0)) ? 2 : 1;
474 if (limit || powered)
496 tmpA = relA.
cross(ax1);
497 tmpB = relB.
cross(ax1);
520 if(limit && (lostop == histop))
542 k = info->
fps * currERP;
568 vel -= linVelB.
dot(ax1);
588 if(newc < info->m_constraintError[srow])
604 limit = (limit_err >
btScalar(0.0)) ? 1 : 2;
622 if(limit && (lostop == histop))
640 k = info->
fps * currERP;
686 if(newc < info->m_constraintError[srow])
TypedConstraint is the baseclass for Bullet constraints and vehicles.
@ BT_SLIDER_FLAGS_CFM_LIMLIN
btScalar getLowerLinLimit()
The btRigidBody is the main class for rigid body objects.
#define btAssertConstrParams(_par)
btScalar m_targetLinMotorVelocity
void btPlaneSpace1(const T &n, T &p, T &q)
btScalar m_softnessOrthoLin
void getInfo1NonVirtual(btConstraintInfo1 *info)
@ BT_SLIDER_FLAGS_CFM_ORTLIN
btScalar getTargetAngMotorVelocity()
const btVector3 & getAngularVelocity() const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
@ BT_SLIDER_FLAGS_CFM_LIMANG
btScalar getSoftnessLimAng()
virtual void getInfo1(btConstraintInfo1 *info)
internal method used by the constraint solver, don't use them directly
@ BT_SLIDER_FLAGS_ERP_ORTANG
#define SLIDER_CONSTRAINT_DEF_DAMPING
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
#define USE_OFFSET_FOR_CONSTANT_FRAME
btScalar getSoftnessLimLin()
btScalar * m_J2angularAxis
btScalar dot(const btVector3 &v) const
Return the dot product.
bool m_useLinearReferenceFrameA
btScalar * m_J2linearAxis
btScalar getUpperAngLimit()
btScalar m_softnessDirAng
btScalar m_softnessDirLin
const btTransform & getCenterOfMassTransform() const
btScalar m_targetAngMotorVelocity
btScalar m_maxLinMotorForce
btScalar m_accumulatedAngMotorImpulse
btScalar m_restitutionOrthoLin
btScalar btFabs(btScalar x)
btScalar m_softnessLimAng
btScalar getDampingLimLin()
btScalar m_maxAngMotorForce
btScalar m_dampingOrthoAng
bool getPoweredLinMotor()
@ BT_SLIDER_FLAGS_ERP_ORTLIN
virtual void setParam(int num, btScalar value, int axis=-1)
override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0...
btScalar * m_constraintError
btScalar getInvMass() const
void calculateTransforms(const btTransform &transA, const btTransform &transB)
btScalar m_dampingOrthoLin
btVector3 getColumn(int i) const
Get a column of the matrix as a vector.
btTransform m_calculatedTransformA
btVector3 can be used to represent 3D points and vectors.
virtual btScalar getParam(int num, int axis=-1) const
return the local value of parameter
bool m_useSolveConstraintObsolete
for backwards compatibility during the transition to 'getInfo/getInfo2'
btSliderConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
@ BT_SLIDER_FLAGS_CFM_DIRLIN
btVector3 m_realPivotAInW
const btVector3 & getLinearVelocity() const
const btTransform & getCalculatedTransformB() const
btScalar getMaxAngMotorForce()
btScalar m_accumulatedLinMotorImpulse
#define SLIDER_CONSTRAINT_DEF_SOFTNESS
#define SLIDER_CONSTRAINT_DEF_CFM
const btTransform & getCalculatedTransformA() const
btScalar m_restitutionLimAng
btScalar m_restitutionDirAng
btVector3 m_realPivotBInW
btScalar m_softnessOrthoAng
btScalar m_restitutionDirLin
btScalar m_restitutionOrthoAng
@ BT_SLIDER_FLAGS_CFM_ORTANG
btScalar getUpperLinLimit()
btScalar getTargetLinMotorVelocity()
btTransform m_calculatedTransformB
btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
bool m_useOffsetForConstraintFrame
@ BT_SLIDER_FLAGS_ERP_LIMLIN
bool getPoweredAngMotor()
@ BT_SLIDER_FLAGS_ERP_LIMANG
btScalar btAtan2(btScalar x, btScalar y)
btScalar m_softnessLimLin
btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
internal method used by the constraint solver, don't use them directly
btScalar * m_J1angularAxis
btScalar btSqrt(btScalar y)
@ BT_SLIDER_FLAGS_CFM_DIRANG
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btScalar getDampingLimAng()
void getInfo2NonVirtual(btConstraintInfo2 *info, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, btScalar rbAinvMass, btScalar rbBinvMass)
virtual void getInfo2(btConstraintInfo2 *info)
internal method used by the constraint solver, don't use them directly
btScalar * m_J1linearAxis
btScalar getMaxLinMotorForce()
#define SLIDER_CONSTRAINT_DEF_RESTITUTION
btScalar length2() const
Return the length of the vector squared.
btScalar getLowerAngLimit()
btScalar m_restitutionLimLin