16 #ifndef BT_TYPED_CONSTRAINT_H
17 #define BT_TYPED_CONSTRAINT_H
23 #ifdef BT_USE_DOUBLE_PRECISION
24 #define btTypedConstraintData2 btTypedConstraintDoubleData
25 #define btTypedConstraintDataName "btTypedConstraintDoubleData"
27 #define btTypedConstraintData2 btTypedConstraintFloatData
28 #define btTypedConstraintDataName "btTypedConstraintFloatData"
58 #define btAssertConstrParams(_par) btAssert(_par)
60 #define btAssertConstrParams(_par)
77 int m_userConstraintType;
234 return m_userConstraintType;
239 m_userConstraintType = userConstraintType;
333 if (angleLowerLimitInRadians >= angleUpperLimitInRadians)
335 return angleInRadians;
337 else if (angleInRadians < angleLowerLimitInRadians)
341 return (diffLo < diffHi) ? angleInRadians : (angleInRadians +
SIMD_2_PI);
343 else if (angleInRadians > angleUpperLimitInRadians)
347 return (diffLo < diffHi) ? (angleInRadians -
SIMD_2_PI) : angleInRadians;
351 return angleInRadians;
384 #define BT_BACKWARDS_COMPATIBLE_SERIALIZATION
385 #ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
__forceinline ssef low(const avxf &a)
__forceinline ssef high(const avxf &a)
btScalar m_relaxationFactor
btFixedConstraint btRigidBody & rbB
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
SIMD_FORCE_INLINE btScalar btNormalizeAngle(btScalar angleInRadians)
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
#define SIMD_FORCE_INLINE
btSolverBody
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
btVector3 m_appliedTorqueBodyA
btScalar m_breakingImpulseThreshold
BT_DECLARE_ALIGNED_ALLOCATOR()
bool needsFeedback() const
void setBreakingImpulseThreshold(btScalar threshold)
int getOverrideNumSolverIterations() const
btVector3 m_appliedForceBodyA
virtual int calculateSerializeBufferSize() const
void setEnabled(bool enabled)
#define btTypedConstraintData2
btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
internal method used by the constraint solver, don't use them directly
void enableFeedback(bool needsFeedback)
virtual void setupSolverConstraint(btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
internal method used by the constraint solver, don't use them directly
void setJointFeedback(btJointFeedback *jointFeedback)
void * m_userConstraintPtr
const btRigidBody & getRigidBodyA() const
void setUserConstraintType(int userConstraintType)
const btJointFeedback * getJointFeedback() const
const btRigidBody & getRigidBodyB() const
void setUserConstraintPtr(void *ptr)
int m_overrideNumSolverIterations
btScalar getDbgDrawSize()
btScalar m_appliedImpulse
virtual void setParam(int num, btScalar value, int axis=-1)=0
btScalar getAppliedImpulse() const
virtual btScalar getParam(int num, int axis=-1) const =0
return the local value of parameter
SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
void internalSetAppliedImpulse(btScalar appliedImpulse)
internal method used by the constraint solver, don't use them directly
btTypedConstraint & operator=(btTypedConstraint &other)
btScalar getBreakingImpulseThreshold() const
btVector3 m_appliedTorqueBodyB
virtual void buildJacobian()
internal method used by the constraint solver, don't use them directly
int getUserConstraintType() const
virtual void getInfo1(btConstraintInfo1 *info)=0
internal method used by the constraint solver, don't use them directly
void * getUserConstraintPtr()
btVector3 m_appliedForceBodyB
btTypedConstraintType getConstraintType() const
btTypedConstraint(btTypedConstraintType type, btRigidBody &rbA)
int getUserConstraintId() const
void setUserConstraintId(int uid)
void setDbgDrawSize(btScalar dbgDrawSize)
virtual void getInfo2(btConstraintInfo2 *info)=0
internal method used by the constraint solver, don't use them directly
static btRigidBody & getFixedBody()
virtual ~btTypedConstraint()
btJointFeedback * m_jointFeedback
void setOverrideNumSolverIterations(int overideNumIterations)
virtual void solveConstraintObsolete(btSolverBody &, btSolverBody &, btScalar)
internal method used by the constraint solver, don't use them directly
@ CONETWIST_CONSTRAINT_TYPE
@ POINT2POINT_CONSTRAINT_TYPE
@ D6_SPRING_2_CONSTRAINT_TYPE
@ CONTACT_CONSTRAINT_TYPE
@ D6_SPRING_CONSTRAINT_TYPE
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar internalGetAppliedImpulse()
internal method used by the constraint solver, don't use them directly
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
bool isLimit() const
Returns true when the last test() invocation recognized limit violation.
btScalar getBiasFactor() const
Returns limit's bias factor.
btScalar getSoftness() const
Returns limit's softness.
btScalar getCorrection() const
Returns correction value evaluated when test() was invoked.
btScalar getError() const
Returns correction value multiplied by sign value.
btScalar getSign() const
Returns sign value evaluated when test() was invoked.
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
btAngularLimit()
Default constructor initializes limit as inactive, allowing free constraint movement.
btScalar getHalfRange() const
Gives half of the distance between min and max limit angle.
btScalar getRelaxationFactor() const
Returns limit's relaxation factor.
SyclQueue void void size_t num_bytes void
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
btScalar * m_J2linearAxis
btScalar * m_J2angularAxis
btScalar * m_J1angularAxis
btScalar * m_constraintError
btScalar * m_J1linearAxis
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
this structure is not used, except for loading pre-2.82 .bullet files
int m_disableCollisionsBetweenLinkedBodies
float m_breakingImpulseThreshold
int m_overrideNumSolverIterations
btRigidBodyDoubleData * m_rbB
int m_disableCollisionsBetweenLinkedBodies
double m_breakingImpulseThreshold
int m_overrideNumSolverIterations
btRigidBodyDoubleData * m_rbA
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
int m_disableCollisionsBetweenLinkedBodies
btRigidBodyFloatData * m_rbB
float m_breakingImpulseThreshold
btRigidBodyFloatData * m_rbA
int m_overrideNumSolverIterations
rudimentary class to provide type info