public interface IPhysicsEngine
| Modifier and Type | Method and Description |
|---|---|
void |
applyCollisions(ILevel universe,
boolean dynamicsOn)
Marks Collision IComponents of applicable IEntities in universe with appropriate collidingIDs
|
boolean |
applyImpulse(IEntity body,
Vector J)
Useful for debugging but will be deprecated!
Applies impulse J to IEntity body
|
void |
update(ILevel universe,
double dt)
Update Positions of IEntities in universe based on dt and their Velocities
|
void update(ILevel universe, double dt)
universe - IEntitySystem containing IEntities with both Positions and Velocitiesdt - duration of update in secondsvoid applyCollisions(ILevel universe, boolean dynamicsOn)
universe - IEntitySystem containing IEntities with both Positions and CollisionsdynamicsOn - if true, then impulses are subsequently applied to applicable IEntities
(with Mass, Position, Velocity, and of course, Collision)boolean applyImpulse(IEntity body, Vector J)
body - IEntity with Mass, Position, and VelocityJ - Impulse vector used to calculate the updated Velocity