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.

0.7.5-pf-bulletsim
Robert Adams 2012-12-02 20:45:46 -08:00
parent dc0497c1b8
commit 2586bab2dd
2 changed files with 22 additions and 3 deletions

View File

@ -96,6 +96,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
public long SimulationStep { get { return m_simulationStep; } } public long SimulationStep { get { return m_simulationStep; } }
private int m_taintsToProcessPerStep; private int m_taintsToProcessPerStep;
public delegate void PreStepAction(float timeStep);
public event PreStepAction BeforeStep;
// A value of the time now so all the collision and update routines do not have to get their own // A value of the time now so all the collision and update routines do not have to get their own
// Set to 'now' just before all the prims and actors are called for collisions and updates // Set to 'now' just before all the prims and actors are called for collisions and updates
public int SimulationNowTime { get; private set; } public int SimulationNowTime { get; private set; }
@ -487,8 +490,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
ProcessTaints(); ProcessTaints();
// Some of the prims operate with special vehicle properties // Some of the prims operate with special vehicle properties
ProcessVehicles(timeStep); DoPreStepActions(timeStep);
ProcessTaints(); // the vehicles might have added taints
// the prestep actions might have added taints
ProcessTaints();
// step the physical world one interval // step the physical world one interval
m_simulationStep++; m_simulationStep++;
@ -907,6 +912,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
} }
} }
private void DoPreStepActions(float timeStep)
{
ProcessVehicles(timeStep);
PreStepAction actions = BeforeStep;
if (actions != null)
actions(timeStep);
}
// Some prims have extra vehicle actions // Some prims have extra vehicle actions
// Called at taint time! // Called at taint time!
private void ProcessVehicles(float timeStep) private void ProcessVehicles(float timeStep)

View File

@ -27,6 +27,7 @@ Small physical objects do not interact correctly
Chains above 2x2x.4 are move stable and get stablier as torui get larger. Chains above 2x2x.4 are move stable and get stablier as torui get larger.
Add material type linkage and input all the material property definitions. Add material type linkage and input all the material property definitions.
Skeleton classes and table are in the sources but are not filled or used. Skeleton classes and table are in the sources but are not filled or used.
Add PID motor for avatar movement (slow to stop, ...)
After getting off a vehicle, the root prim is phantom (can be walked through) After getting off a vehicle, the root prim is phantom (can be walked through)
Need to force a position update for the root prim after compound shape destruction 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
Generalize Dynamics and PID with standardized motors. Generalize Dynamics and PID with standardized motors.
Generalize Linkset and vehicles into PropertyManagers Generalize Linkset and vehicles into PropertyManagers
Methods for Refresh, RemoveBodyDependencies, RestoreBodyDependencies Methods for Refresh, RemoveBodyDependencies, RestoreBodyDependencies
Possibly generalized a 'per step action' registration. Possibly generalized a 'pre step action' registration.
Complete implemention of preStepActions
Replace vehicle step call with prestep event.
Is there a need for postStepActions? postStepTaints?
Implement linkset by setting position of children when root updated. (LinksetManual) Implement linkset by setting position of children when root updated. (LinksetManual)
LinkablePrim class? Would that simplify/centralize the linkset logic? LinkablePrim class? Would that simplify/centralize the linkset logic?
Linkset implementation using manual prim movement. Linkset implementation using manual prim movement.