aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-02 20:45:46 -0800
committerRobert Adams2012-12-03 07:59:52 -0800
commit2586bab2dde141c4d01c81c54291394ba07b1ee7 (patch)
tree9bb4d949de41d2c634e861fdcce6b4c6a5390bc0 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentBulletSim: begin tracking a TODO list. There just are so many things to remem... (diff)
downloadopensim-SC_OLD-2586bab2dde141c4d01c81c54291394ba07b1ee7.zip
opensim-SC_OLD-2586bab2dde141c4d01c81c54291394ba07b1ee7.tar.gz
opensim-SC_OLD-2586bab2dde141c4d01c81c54291394ba07b1ee7.tar.bz2
opensim-SC_OLD-2586bab2dde141c4d01c81c54291394ba07b1ee7.tar.xz
BulletSim: add stubs for generalization of preStep actions. Will eventually replace the specialized vehicle processing with preStep event processing. Add TODO comments about this feature. Redo line endings in TODO file to be all Linux.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 5e70a23..17cc7b4 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -96,6 +96,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
96 public long SimulationStep { get { return m_simulationStep; } } 96 public long SimulationStep { get { return m_simulationStep; } }
97 private int m_taintsToProcessPerStep; 97 private int m_taintsToProcessPerStep;
98 98
99 public delegate void PreStepAction(float timeStep);
100 public event PreStepAction BeforeStep;
101
99 // A value of the time now so all the collision and update routines do not have to get their own 102 // A value of the time now so all the collision and update routines do not have to get their own
100 // Set to 'now' just before all the prims and actors are called for collisions and updates 103 // Set to 'now' just before all the prims and actors are called for collisions and updates
101 public int SimulationNowTime { get; private set; } 104 public int SimulationNowTime { get; private set; }
@@ -487,8 +490,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
487 ProcessTaints(); 490 ProcessTaints();
488 491
489 // Some of the prims operate with special vehicle properties 492 // Some of the prims operate with special vehicle properties
490 ProcessVehicles(timeStep); 493 DoPreStepActions(timeStep);
491 ProcessTaints(); // the vehicles might have added taints 494
495 // the prestep actions might have added taints
496 ProcessTaints();
492 497
493 // step the physical world one interval 498 // step the physical world one interval
494 m_simulationStep++; 499 m_simulationStep++;
@@ -907,6 +912,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
907 } 912 }
908 } 913 }
909 914
915 private void DoPreStepActions(float timeStep)
916 {
917 ProcessVehicles(timeStep);
918
919 PreStepAction actions = BeforeStep;
920 if (actions != null)
921 actions(timeStep);
922
923 }
924
910 // Some prims have extra vehicle actions 925 // Some prims have extra vehicle actions
911 // Called at taint time! 926 // Called at taint time!
912 private void ProcessVehicles(float timeStep) 927 private void ProcessVehicles(float timeStep)