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.
This commit is contained in:
Robert Adams
2012-09-13 08:11:54 -07:00
parent 1ec84ac8b1
commit 2c5ff93990
9 changed files with 365 additions and 300 deletions

View File

@@ -74,6 +74,17 @@ public abstract class BSConstraint : IDisposable
return ret;
}
public virtual bool SetSolverIterations(float cnt)
{
bool ret = false;
if (m_enabled)
{
BulletSimAPI.SetConstraintNumSolverIterations2(m_constraint.Ptr, cnt);
ret = true;
}
return ret;
}
public virtual bool CalculateTransforms()
{
bool ret = false;
@@ -96,12 +107,9 @@ public abstract class BSConstraint : IDisposable
ret = CalculateTransforms();
if (ret)
{
// m_world.scene.PhysicsLogging.Write("{0},BSConstraint.RecomputeConstraintVariables,taint,enabling,A={1},B={2}",
// BSScene.DetailLogZero, Body1.ID, Body2.ID);
// Setting an object's mass to zero (making it static like when it's selected)
// automatically disables the constraints.
// If enabled, be sure to set the constraint itself to enabled.
// If the link is enabled, be sure to set the constraint itself to enabled.
BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true));
}
else