aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 87c7b1b..e8c628c 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -39,20 +39,20 @@ using log4net;
39using OpenMetaverse; 39using OpenMetaverse;
40 40
41// TODOs for BulletSim (for BSScene, BSPrim, BSCharacter and BulletSim) 41// TODOs for BulletSim (for BSScene, BSPrim, BSCharacter and BulletSim)
42// Adjust character capsule size when height is adjusted (ScenePresence.SetHeight) 42// Move all logic out of the C++ code and into the C# code for easier future modifications.
43// Test sculpties 43// Test sculpties (verified that they don't work)
44// Compute physics FPS reasonably 44// Compute physics FPS reasonably
45// Based on material, set density and friction 45// Based on material, set density and friction
46// More efficient memory usage when passing hull information from BSPrim to BulletSim 46// Don't use constraints in linksets of non-physical objects. Means having to move children manually.
47// Move all logic out of the C++ code and into the C# code for easier future modifications.
48// Four states of prim: Physical, regular, phantom and selected. Are we modeling these correctly? 47// Four states of prim: Physical, regular, phantom and selected. Are we modeling these correctly?
49// In SL one can set both physical and phantom (gravity, does not effect others, makes collisions with ground) 48// In SL one can set both physical and phantom (gravity, does not effect others, makes collisions with ground)
50// At the moment, physical and phantom causes object to drop through the terrain 49// At the moment, physical and phantom causes object to drop through the terrain
51// Physical phantom objects and related typing (collision options ) 50// Physical phantom objects and related typing (collision options )
52// Use collision masks for collision with terrain and phantom objects
53// Check out llVolumeDetect. Must do something for that. 51// Check out llVolumeDetect. Must do something for that.
52// Use collision masks for collision with terrain and phantom objects
53// More efficient memory usage when passing hull information from BSPrim to BulletSim
54// Should prim.link() and prim.delink() membership checking happen at taint time? 54// Should prim.link() and prim.delink() membership checking happen at taint time?
55// Mesh sharing. Use meshHash to tell if we already have a hull of that shape and only create once 55// Mesh sharing. Use meshHash to tell if we already have a hull of that shape and only create once.
56// Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect 56// Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect
57// Implement LockAngularMotion 57// Implement LockAngularMotion
58// Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) 58// Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation)
@@ -356,6 +356,12 @@ public class BSScene : PhysicsScene, IPhysicsParameters
356 Constraints = null; 356 Constraints = null;
357 } 357 }
358 358
359 if (Shapes != null)
360 {
361 Shapes.Dispose();
362 Shapes = null;
363 }
364
359 // Anything left in the unmanaged code should be cleaned out 365 // Anything left in the unmanaged code should be cleaned out
360 BulletSimAPI.Shutdown(WorldID); 366 BulletSimAPI.Shutdown(WorldID);
361 367
@@ -589,7 +595,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters
589 { 595 {
590 if (localID <= TerrainManager.HighestTerrainID) 596 if (localID <= TerrainManager.HighestTerrainID)
591 { 597 {
592 DetailLog("{0},BSScene.SendCollision,collideWithTerrain,id={1},with={2}", DetailLogZero, localID, collidingWith);
593 return; // don't send collisions to the terrain 598 return; // don't send collisions to the terrain
594 } 599 }
595 600
@@ -601,8 +606,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
601 return; 606 return;
602 } 607 }
603 608
604 // The terrain is not in the physical object list so 'collidee' 609 // The terrain is not in the physical object list so 'collidee' can be null when Collide() is called.
605 // can be null when Collide() is called.
606 BSPhysObject collidee = null; 610 BSPhysObject collidee = null;
607 PhysObjects.TryGetValue(collidingWith, out collidee); 611 PhysObjects.TryGetValue(collidingWith, out collidee);
608 612
@@ -1026,7 +1030,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
1026 (s) => { return s.m_params[0].shouldRandomizeSolverOrder; }, 1030 (s) => { return s.m_params[0].shouldRandomizeSolverOrder; },
1027 (s,p,l,v) => { s.m_params[0].shouldRandomizeSolverOrder = v; } ), 1031 (s,p,l,v) => { s.m_params[0].shouldRandomizeSolverOrder = v; } ),
1028 new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", 1032 new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands",
1029 ConfigurationParameters.numericFalse, 1033 ConfigurationParameters.numericTrue,
1030 (s,cf,p,v) => { s.m_params[0].shouldSplitSimulationIslands = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); }, 1034 (s,cf,p,v) => { s.m_params[0].shouldSplitSimulationIslands = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); },
1031 (s) => { return s.m_params[0].shouldSplitSimulationIslands; }, 1035 (s) => { return s.m_params[0].shouldSplitSimulationIslands; },
1032 (s,p,l,v) => { s.m_params[0].shouldSplitSimulationIslands = v; } ), 1036 (s,p,l,v) => { s.m_params[0].shouldSplitSimulationIslands = v; } ),