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; } }
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
// Set to 'now' just before all the prims and actors are called for collisions and updates
public int SimulationNowTime { get; private set; }
@ -487,8 +490,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
ProcessTaints();
// Some of the prims operate with special vehicle properties
ProcessVehicles(timeStep);
ProcessTaints(); // the vehicles might have added taints
DoPreStepActions(timeStep);
// the prestep actions might have added taints
ProcessTaints();
// step the physical world one interval
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
// Called at taint time!
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.
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.
Add PID motor for avatar movement (slow to stop, ...)
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
@ -78,7 +79,10 @@ Breakout code for mesh/hull/compound/native into separate BSShape* classes
Generalize Dynamics and PID with standardized motors.
Generalize Linkset and vehicles into PropertyManagers
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)
LinkablePrim class? Would that simplify/centralize the linkset logic?
Linkset implementation using manual prim movement.