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:
Diffstat (limited to 'extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp')
-rw-r--r--extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp b/extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp
index 9471c1faf7c..81b75e6e1b8 100644
--- a/extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp
+++ b/extern/bullet/BulletDynamics/ConstraintSolver/Point2PointConstraint.cpp
@@ -14,17 +14,20 @@
static RigidBody s_fixed(MassProps(0,SimdVector3(0.f,0.f,0.f)),0.f,0.f,1.f,1.f);
+static int gConstraintId = 1;
Point2PointConstraint::Point2PointConstraint():
m_rbA(s_fixed),m_rbB(s_fixed)
{
+ m_constraintId = gConstraintId++;//just create some unique ID for now
+
s_fixed.setMassProps(0.f,SimdVector3(0.f,0.f,0.f));
}
Point2PointConstraint::Point2PointConstraint(RigidBody& rbA,RigidBody& rbB, const SimdVector3& pivotInA,const SimdVector3& pivotInB)
:m_rbA(rbA),m_rbB(rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB)
{
-
+ m_constraintId = gConstraintId++;//just create some unique ID for now
}
@@ -32,6 +35,7 @@ Point2PointConstraint::Point2PointConstraint(RigidBody& rbA,const SimdVector3& p
:m_rbA(rbA),m_rbB(s_fixed),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA))
{
s_fixed.setMassProps(0.f,SimdVector3(1e10f,1e10f,1e10f));
+ m_constraintId = gConstraintId++;//just create some unique ID for now
}
void Point2PointConstraint::BuildJacobian()