aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
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 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs19
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt6
2 files changed, 22 insertions, 3 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)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
index cf112fb..ca71313 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
@@ -27,6 +27,7 @@ Small physical objects do not interact correctly
27 Chains above 2x2x.4 are move stable and get stablier as torui get larger. 27 Chains above 2x2x.4 are move stable and get stablier as torui get larger.
28Add material type linkage and input all the material property definitions. 28Add material type linkage and input all the material property definitions.
29 Skeleton classes and table are in the sources but are not filled or used. 29 Skeleton classes and table are in the sources but are not filled or used.
30Add PID motor for avatar movement (slow to stop, ...)
30 31
31After getting off a vehicle, the root prim is phantom (can be walked through) 32After getting off a vehicle, the root prim is phantom (can be walked through)
32 Need to force a position update for the root prim after compound shape destruction 33 Need to force a position update for the root prim after compound shape destruction
@@ -78,7 +79,10 @@ Breakout code for mesh/hull/compound/native into separate BSShape* classes
78Generalize Dynamics and PID with standardized motors. 79Generalize Dynamics and PID with standardized motors.
79Generalize Linkset and vehicles into PropertyManagers 80Generalize Linkset and vehicles into PropertyManagers
80 Methods for Refresh, RemoveBodyDependencies, RestoreBodyDependencies 81 Methods for Refresh, RemoveBodyDependencies, RestoreBodyDependencies
81 Possibly generalized a 'per step action' registration. 82 Possibly generalized a 'pre step action' registration.
83Complete implemention of preStepActions
84 Replace vehicle step call with prestep event.
85 Is there a need for postStepActions? postStepTaints?
82Implement linkset by setting position of children when root updated. (LinksetManual) 86Implement linkset by setting position of children when root updated. (LinksetManual)
83LinkablePrim class? Would that simplify/centralize the linkset logic? 87LinkablePrim class? Would that simplify/centralize the linkset logic?
84Linkset implementation using manual prim movement. 88Linkset implementation using manual prim movement.