From eafc3d6c47b736ca6e4d777c8bcaf059d116ed4c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 16 Mar 2012 08:59:41 -0700 Subject: BulletSim: Update list of TODO tasks --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index e9a849c..b1e551c 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -52,6 +52,19 @@ using OpenSim.Region.Framework; // Implement LockAngularMotion // Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) // Does NeedsMeshing() really need to exclude all the different shapes? +// Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet. +// Add PID movement operations +// Debug linkset +// Ccd threshold to defaults (0.0) +// Command line get and set is broken +// Check terrain size. 128 or 127? +// Test with multiple regions in one simulator +// Multiple contact points on collision? +// See code in ode::near... calls to collision_accounting_events() +// Use collision masks for collision with terrain and phantom objects +// Check out llVolumeDetect. Must do something for that. +// Physical phantom objects and related typing (collision options ) +// Raycast // namespace OpenSim.Region.Physics.BulletSPlugin { -- cgit v1.1 From 898a16802bceab9cc43ad15be6f4354335b471fb Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 16 Mar 2012 16:37:21 -0700 Subject: BulletSim: add some new runtime setable parameters to match the dll. --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 13 ++++++++++--- OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 10 ++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index b1e551c..977dcbe 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -177,6 +177,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters if (m_log.IsDebugEnabled) { m_log.DebugFormat("{0}: Initialize: Setting debug callback for unmanaged code", LogHeader); + // the handle is saved to it doesn't get freed after this call m_DebugLogCallbackHandle = new BulletSimAPI.DebugLogCallback(BulletLogger); BulletSimAPI.SetDebugLogCallback(m_DebugLogCallbackHandle); } @@ -185,7 +186,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters mesher = meshmerizer; // The bounding box for the simulated world - Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, 4096f); + Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, 8192f); // m_log.DebugFormat("{0}: Initialize: Calling BulletSimAPI.Initialize.", LogHeader); m_worldID = BulletSimAPI.Initialize(worldExtent, m_paramsHandle.AddrOfPinnedObject(), @@ -233,7 +234,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters parms.terrainFriction = 0.5f; parms.terrainHitFraction = 0.8f; parms.terrainRestitution = 0f; - parms.avatarFriction = 0.0f; + parms.avatarFriction = 0.5f; parms.avatarDensity = 60f; parms.avatarCapsuleRadius = 0.37f; parms.avatarCapsuleHeight = 1.5f; // 2.140599f @@ -716,6 +717,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters // new PhysParameterEntry("CcdSweptSphereRadius", "" ), new PhysParameterEntry("ContactProcessingThreshold", "Distance between contacts before doing collision check" ), + new PhysParameterEntry("Friction", "Set friction parameter for a specific object" ), + new PhysParameterEntry("Restitution", "Set restitution parameter for a specific object" ), + new PhysParameterEntry("TerrainFriction", "Factor to reduce movement against terrain surface" ), new PhysParameterEntry("TerrainHitFraction", "Distance to measure hit collisions" ), new PhysParameterEntry("TerrainRestitution", "Bouncyness" ), @@ -756,7 +760,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters case "defaultdensity": m_params[0].defaultDensity = val; break; case "defaultrestitution": m_params[0].defaultRestitution = val; break; case "collisionmargin": m_params[0].collisionMargin = val; break; - case "gravity": m_params[0].gravity = val; TaintedUpdateParameter(lparm, PhysParameterEntry.APPLY_TO_NONE, val); break; + case "gravity": m_params[0].gravity = val; TaintedUpdateParameter(lparm, localID, val); break; case "lineardamping": UpdateParameterPrims(ref m_params[0].linearDamping, lparm, localID, val); break; case "angulardamping": UpdateParameterPrims(ref m_params[0].angularDamping, lparm, localID, val); break; @@ -767,6 +771,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters case "ccdsweptsphereradius": UpdateParameterPrims(ref m_params[0].ccdSweptSphereRadius, lparm, localID, val); break; case "contactprocessingthreshold": UpdateParameterPrims(ref m_params[0].contactProcessingThreshold, lparm, localID, val); break; + case "friction": TaintedUpdateParameter(lparm, localID, val); break; + case "restitution": TaintedUpdateParameter(lparm, localID, val); break; + // set a terrain physical feature and cause terrain to be recalculated case "terrainfriction": m_params[0].terrainFriction = val; TaintedUpdateParameter("terrain", 0, val); break; case "terrainhitfraction": m_params[0].terrainHitFraction = val; TaintedUpdateParameter("terrain", 0, val); break; diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index d12bd7d..aab0994 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs @@ -149,16 +149,16 @@ public static extern uint Initialize(Vector3 maxPosition, IntPtr parms, int maxUpdates, IntPtr updateArray); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern bool UpdateParameter(uint worldID, uint localID, - [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value); - -[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void Shutdown(uint worldID); +[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] +public static extern bool UpdateParameter(uint worldID, uint localID, + [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern int PhysicsStep(uint worldID, float timeStep, int maxSubSteps, float fixedTimeStep, out int updatedEntityCount, @@ -240,6 +240,7 @@ public static extern bool HasObject(uint worldID, uint id); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern bool DestroyObject(uint worldID, uint id); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern SweepHit ConvexSweepTest(uint worldID, uint id, Vector3 to, float extraMargin); @@ -249,6 +250,7 @@ public static extern RaycastHit RayTest(uint worldID, uint id, Vector3 from, Vec [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern Vector3 RecoverFromPenetration(uint worldID, uint id); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void DumpBulletStatistics(); -- cgit v1.1 From 6c55fd93a300cd077bd04c1b8c3bedc7a03074e7 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 16 Mar 2012 17:13:06 -0700 Subject: BulletSim: set buoyancy in only one place --- OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 0cab5d1..e816b61 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -260,11 +260,8 @@ public class BSCharacter : PhysicsActor get { return _flying; } set { _flying = value; - _scene.TaintedObject(delegate() - { - // simulate flying by changing the effect of gravity - BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _flying ? 1f : 0f); - }); + // simulate flying by changing the effect of gravity + this.Buoyancy(_flying ? 1f : 0f); } } public override bool @@ -299,6 +296,7 @@ public class BSCharacter : PhysicsActor get { return _kinematic; } set { _kinematic = value; } } + // neg=fall quickly, 0=1g, 1=0g, pos=float up public override float Buoyancy { get { return _buoyancy; } set { _buoyancy = value; -- cgit v1.1 From cb2727cf6e7b40473d10cfbea61155f5bcf6646f Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 18 Mar 2012 11:53:53 -0700 Subject: BulletSim: Add AvatarRestitution parameter. Centralize computation of buoyancy for flying. Tweek avatar default friction and resititution --- OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 9 ++++++--- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index e816b61..1a61431 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -94,7 +94,7 @@ public class BSCharacter : PhysicsActor _flying = isFlying; _orientation = Quaternion.Identity; _velocity = Vector3.Zero; - _buoyancy = isFlying ? 1f : 0f; + _buoyancy = ComputeBuoyancyFromFlying(isFlying); _scale = new Vector3(1f, 1f, 1f); _density = _scene.Params.avatarDensity; ComputeAvatarVolumeAndMass(); // set _avatarVolume and _mass based on capsule size, _density and _scale @@ -110,7 +110,7 @@ public class BSCharacter : PhysicsActor shapeData.Buoyancy = _buoyancy; shapeData.Static = ShapeData.numericFalse; shapeData.Friction = _scene.Params.avatarFriction; - shapeData.Restitution = _scene.Params.defaultRestitution; + shapeData.Restitution = _scene.Params.avatarRestitution; // do actual create at taint time _scene.TaintedObject(delegate() @@ -261,9 +261,12 @@ public class BSCharacter : PhysicsActor set { _flying = value; // simulate flying by changing the effect of gravity - this.Buoyancy(_flying ? 1f : 0f); + this.Buoyancy(ComputeBuoyancyFromFlying(_flying)); } } + private float ComputeBuoyancyFromFlying(bool ifFlying) { + return ifFlying ? 1f : 0f; + } public override bool SetAlwaysRun { get { return _setAlwaysRun; } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 977dcbe..9b12b4f 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -235,6 +235,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters parms.terrainHitFraction = 0.8f; parms.terrainRestitution = 0f; parms.avatarFriction = 0.5f; + parms.avatarRestitution = 0.0f; parms.avatarDensity = 60f; parms.avatarCapsuleRadius = 0.37f; parms.avatarCapsuleHeight = 1.5f; // 2.140599f @@ -279,7 +280,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters parms.terrainHitFraction = pConfig.GetFloat("TerrainHitFraction", parms.terrainHitFraction); parms.terrainRestitution = pConfig.GetFloat("TerrainRestitution", parms.terrainRestitution); parms.avatarFriction = pConfig.GetFloat("AvatarFriction", parms.avatarFriction); + parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity); + parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius); parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight); } -- cgit v1.1 From 7783c93802f61d4ed9994c3f9e924066be0469be Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 21 Mar 2012 07:07:44 -0700 Subject: BulletSim: update TODO list. Rearrange code for readability. Add per object friction and restitution runtime settable parameters. --- .../Region/Physics/BulletSPlugin/BSCharacter.cs | 4 +-- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 30 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 1a61431..20708d9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -261,7 +261,7 @@ public class BSCharacter : PhysicsActor set { _flying = value; // simulate flying by changing the effect of gravity - this.Buoyancy(ComputeBuoyancyFromFlying(_flying)); + this.Buoyancy = ComputeBuoyancyFromFlying(_flying); } } private float ComputeBuoyancyFromFlying(bool ifFlying) { @@ -356,7 +356,7 @@ public class BSCharacter : PhysicsActor } else { - m_log.WarnFormat("{0}: Got a NaN force applied to a Character", LogHeader); + m_log.ErrorFormat("{0}: Got a NaN force applied to a Character", LogHeader); } //m_lastUpdateSent = false; } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 9b12b4f..142103b 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -37,14 +37,18 @@ using OpenMetaverse; using OpenSim.Region.Framework; // TODOs for BulletSim (for BSScene, BSPrim, BSCharacter and BulletSim) +// Debug linkset +// Test with multiple regions in one simulator // Adjust character capsule size when height is adjusted (ScenePresence.SetHeight) // Test sculpties // Compute physics FPS reasonably // Based on material, set density and friction -// More efficient memory usage in passing hull information from BSPrim to BulletSim +// More efficient memory usage when passing hull information from BSPrim to BulletSim // Four states of prim: Physical, regular, phantom and selected. Are we modeling these correctly? // In SL one can set both physical and phantom (gravity, does not effect others, makes collisions with ground) // At the moment, physical and phantom causes object to drop through the terrain +// Physical phantom objects and related typing (collision options ) +// Check out llVolumeDetect. Must do something for that. // Should prim.link() and prim.delink() membership checking happen at taint time? // Mesh sharing. Use meshHash to tell if we already have a hull of that shape and only create once // Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect @@ -53,17 +57,14 @@ using OpenSim.Region.Framework; // Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) // Does NeedsMeshing() really need to exclude all the different shapes? // Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet. -// Add PID movement operations -// Debug linkset -// Ccd threshold to defaults (0.0) -// Command line get and set is broken +// Add PID movement operations. What does ScenePresence.MoveToTarget do? // Check terrain size. 128 or 127? -// Test with multiple regions in one simulator // Multiple contact points on collision? // See code in ode::near... calls to collision_accounting_events() +// (This might not be a problem. ODE collects all the collisions with one object in one tick.) // Use collision masks for collision with terrain and phantom objects -// Check out llVolumeDetect. Must do something for that. -// Physical phantom objects and related typing (collision options ) +// Figure out how to not allocate a new Dictionary and List for every collision +// in BSPrim.Collide() and BSCharacter.Collide(). Can the same ones be reused? // Raycast // namespace OpenSim.Region.Physics.BulletSPlugin @@ -282,7 +283,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters parms.avatarFriction = pConfig.GetFloat("AvatarFriction", parms.avatarFriction); parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity); - parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius); parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight); } @@ -408,16 +408,16 @@ public class BSScene : PhysicsScene, IPhysicsParameters { EntityProperties entprop = m_updateArray[ii]; // m_log.DebugFormat("{0}: entprop[{1}]: id={2}, pos={3}", LogHeader, ii, entprop.ID, entprop.Position); - BSCharacter actor; - if (m_avatars.TryGetValue(entprop.ID, out actor)) - { - actor.UpdateProperties(entprop); - continue; - } BSPrim prim; if (m_prims.TryGetValue(entprop.ID, out prim)) { prim.UpdateProperties(entprop); + continue; + } + BSCharacter actor; + if (m_avatars.TryGetValue(entprop.ID, out actor)) + { + actor.UpdateProperties(entprop); } } } -- cgit v1.1 From efe61b2481ce10f16b156542c122971d35c227e1 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 22 Mar 2012 17:04:06 -0700 Subject: BulletSim: remove confusion between angularVelocity and rotationalVelocity (there is still confusion in the rest of OpenSim). Enhance some debug statements to include the object ID. --- OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 4 ++-- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 17 ++++++----------- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 5 +++-- 3 files changed, 11 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 046726d..eb20eb3 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs @@ -821,7 +821,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin */ // Get what the body is doing, this includes 'external' influences - Vector3 angularVelocity = m_prim.AngularVelocity; + Vector3 angularVelocity = m_prim.RotationalVelocity; // Vector3 angularVelocity = Vector3.Zero; if (m_angularMotorApply > 0) @@ -910,7 +910,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin m_lastAngularVelocity -= m_lastAngularVelocity * decayamount; // Apply to the body - m_prim.AngularVelocity = m_lastAngularVelocity; + m_prim.RotationalVelocity = m_lastAngularVelocity; } //end MoveAngular internal void LimitRotation(float timestep) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 898436b..f122df9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -85,7 +85,6 @@ public sealed class BSPrim : PhysicsActor private OMV.Vector3 _rotationalVelocity; private bool _kinematic; private float _buoyancy; - private OMV.Vector3 _angularVelocity; private List _childrenPrims; private BSPrim _parentPrim; @@ -119,7 +118,6 @@ public sealed class BSPrim : PhysicsActor _buoyancy = 1f; _velocity = OMV.Vector3.Zero; _rotationalVelocity = OMV.Vector3.Zero; - _angularVelocity = OMV.Vector3.Zero; _hullKey = 0; _meshKey = 0; _pbs = pbs; @@ -146,7 +144,7 @@ public sealed class BSPrim : PhysicsActor // called when this prim is being destroyed and we should free all the resources public void Destroy() { - // m_log.DebugFormat("{0}: Destroy", LogHeader); + // m_log.DebugFormat("{0}: Destroy, id={1}", LogHeader, LocalID); // Undo any vehicle properties _vehicle.ProcessTypeChange(Vehicle.TYPE_NONE); _scene.RemoveVehiclePrim(this); // just to make sure @@ -203,7 +201,7 @@ public sealed class BSPrim : PhysicsActor // link me to the specified parent public override void link(PhysicsActor obj) { - BSPrim parent = (BSPrim)obj; + BSPrim parent = obj as BSPrim; // m_log.DebugFormat("{0}: link {1}/{2} to {3}", LogHeader, _avName, _localID, obj.LocalID); // TODO: decide if this parent checking needs to happen at taint time if (_parentPrim == null) @@ -527,10 +525,6 @@ public sealed class BSPrim : PhysicsActor }); } } - public OMV.Vector3 AngularVelocity { - get { return _angularVelocity; } - set { _angularVelocity = value; } - } public override bool Kinematic { get { return _kinematic; } set { _kinematic = value; @@ -993,7 +987,7 @@ public sealed class BSPrim : PhysicsActor } // m_log.DebugFormat("{0}: CreateGeomMesh: calling CreateMesh. lid={1}, key={2}, indices={3}, vertices={4}", - // LogHeader, _localID, _meshKey, indices.Length, vertices.Count); + // LogHeader, _localID, _meshKey, indices.Length, vertices.Count); BulletSimAPI.CreateMesh(_scene.WorldID, _meshKey, indices.GetLength(0), indices, vertices.Count, verticesAsFloats); @@ -1127,7 +1121,7 @@ public sealed class BSPrim : PhysicsActor return; } - // Create an object in Bullet + // Create an object in Bullet if it has not already been created // No locking here because this is done when the physics engine is not simulating private void CreateObject() { @@ -1324,7 +1318,8 @@ public sealed class BSPrim : PhysicsActor _velocity = entprop.Velocity; _acceleration = entprop.Acceleration; _rotationalVelocity = entprop.RotationalVelocity; - // m_log.DebugFormat("{0}: RequestTerseUpdate. id={1}, ch={2}, pos={3}, rot={4}", LogHeader, LocalID, changed, _position, _orientation); + // m_log.DebugFormat("{0}: RequestTerseUpdate. id={1}, ch={2}, pos={3}, rot={4}, vel={5}, acc={6}, rvel={7}", + // LogHeader, LocalID, changed, _position, _orientation, _velocity, _acceleration, _rotationalVelocity); base.RequestPhysicsterseUpdate(); } } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 142103b..13d5e03 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -487,12 +487,12 @@ public class BSScene : PhysicsScene, IPhysicsParameters public override void DeleteTerrain() { - m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); + // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); } public override void Dispose() { - m_log.DebugFormat("{0}: Dispose()", LogHeader); + // m_log.DebugFormat("{0}: Dispose()", LogHeader); } public override Dictionary GetTopColliders() @@ -753,6 +753,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters switch (lparm) { case "detailedstats": m_detailedStatsStep = (int)val; break; + case "meshlod": m_meshLOD = (int)val; break; case "sculptlod": m_sculptLOD = (int)val; break; case "maxsubstep": m_maxSubSteps = (int)val; break; -- cgit v1.1