Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2009-06-06 04:12:49 +0400
committerErwin Coumans <blender@erwincoumans.com>2009-06-06 04:12:49 +0400
commit884a6a6573c08d2d0fe7f44994b8a874f45d68f2 (patch)
treec10be5dc6361472c265ce19556cb1349fd80a472 /extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
parent04ccb0caf847b29542618a903f0e4243270f8c82 (diff)
#18872 bugfix for torque on dynamic objects
#18893, fix to getParam for generic 6dof constraints
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h')
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
index d01c9cf63ab..8082eb1f132 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
@@ -382,14 +382,21 @@ public:
//! Get the relative Euler angle
/*!
- \pre btGeneric6DofConstraint.buildJacobian must be called previously.
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
*/
btScalar getAngle(int axis_index) const;
+ //! Get the relative position of the constraint pivot
+ /*!
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
+ */
+ btScalar getRelativePivotPosition(int axis_index) const;
+
+
//! Test angular limit.
/*!
Calculates angular correction and returns true if limit needs to be corrected.
- \pre btGeneric6DofConstraint.buildJacobian must be called previously.
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
*/
bool testAngularLimitMotor(int axis_index);
@@ -496,11 +503,13 @@ protected:
bool m_springEnabled[6];
btScalar m_equilibriumPoint[6];
btScalar m_springStiffness[6];
+ btScalar m_springDamping[6]; // between 0 and 1 (1 == no damping)
void internalUpdateSprings(btConstraintInfo2* info);
public:
btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
void enableSpring(int index, bool onOff);
void setStiffness(int index, btScalar stiffness);
+ void setDamping(int index, btScalar damping);
void setEquilibriumPoint(); // set the current constraint position/orientation as an equilibrium point for all DOF
void setEquilibriumPoint(int index); // set the current constraint position/orientation as an equilibrium point for given DOF
virtual void getInfo2 (btConstraintInfo2* info);