diff options
author | Robert Adams | 2012-09-13 08:11:54 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-15 15:31:29 -0700 |
commit | 2c5ff9399063080276a23bcd06fb696d653bef2e (patch) | |
tree | 3428eaff2697b562880c75f5f83eafcbb855c93e /OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs | |
parent | Add basic asset connector tests to check behaviour for normal, local and temp... (diff) | |
download | opensim-SC_OLD-2c5ff9399063080276a23bcd06fb696d653bef2e.zip opensim-SC_OLD-2c5ff9399063080276a23bcd06fb696d653bef2e.tar.gz opensim-SC_OLD-2c5ff9399063080276a23bcd06fb696d653bef2e.tar.bz2 opensim-SC_OLD-2c5ff9399063080276a23bcd06fb696d653bef2e.tar.xz |
BulletSim: Way too many changes in one commit.
Many changes to BSDynamic for readability and commentary.
Linkset hacking for vehicles: don't over mass the root prim.
Add parameter for link constraint solver iterations.
Correct uses of timestep in timescale calculations for vehicles.
Reorganize code/logic for making objects static and dynamic for readability
and use of API2.
Changed most calls in BSPrim to use API2 calls (the new way).
Avatars do not generate default Bullet collision events but do call up
to the simulator for every avatar. Reduces overhead.
Objects added to collision list only if they are processing collisions.
Reduces overhead especially for large numbers of avatars.
Generalize call for water height to GetWaterHeightAtXYZ().
Catch and correct exception getting terrain height when out of bounds.
Correct race condition in Terrain Manager where creation wasn't at taint-time.
Add API calls for constructing compound shapes.
Move NeedsMeshing() logic into object class.
Reorganize logic for object meshing to reduce rebuilding of meshs/hulls.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs index 2e15ced..1376a29 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs | |||
@@ -74,6 +74,17 @@ public abstract class BSConstraint : IDisposable | |||
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | 76 | ||
77 | public virtual bool SetSolverIterations(float cnt) | ||
78 | { | ||
79 | bool ret = false; | ||
80 | if (m_enabled) | ||
81 | { | ||
82 | BulletSimAPI.SetConstraintNumSolverIterations2(m_constraint.Ptr, cnt); | ||
83 | ret = true; | ||
84 | } | ||
85 | return ret; | ||
86 | } | ||
87 | |||
77 | public virtual bool CalculateTransforms() | 88 | public virtual bool CalculateTransforms() |
78 | { | 89 | { |
79 | bool ret = false; | 90 | bool ret = false; |
@@ -96,12 +107,9 @@ public abstract class BSConstraint : IDisposable | |||
96 | ret = CalculateTransforms(); | 107 | ret = CalculateTransforms(); |
97 | if (ret) | 108 | if (ret) |
98 | { | 109 | { |
99 | // m_world.scene.PhysicsLogging.Write("{0},BSConstraint.RecomputeConstraintVariables,taint,enabling,A={1},B={2}", | ||
100 | // BSScene.DetailLogZero, Body1.ID, Body2.ID); | ||
101 | |||
102 | // Setting an object's mass to zero (making it static like when it's selected) | 110 | // Setting an object's mass to zero (making it static like when it's selected) |
103 | // automatically disables the constraints. | 111 | // automatically disables the constraints. |
104 | // If enabled, be sure to set the constraint itself to enabled. | 112 | // If the link is enabled, be sure to set the constraint itself to enabled. |
105 | BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true)); | 113 | BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true)); |
106 | } | 114 | } |
107 | else | 115 | else |