Shipgame Physics
Also see Polylib Physics
Shipgame physics
The following quadtrees will be used
- Physical quadtree - contains ships, thingamabobs,
- Whatnot quadtree - Never changes between frames
- Ship-Dohickey quadtree - This will not have ship/ship collision testing only ship/dohickey. Dohickeys will damage the structures in this.
- Dohicky quadtree -
Collision Loops
Loop 1
- Physical-Physical: Physical response
- Physical-Whatnot: Whatnot event callback, Physical response
Loop 2:
Will only loop a second time when the widget scripts return a certain value(Usually when something was deflected)
- Dohicky-Whatnot: Event callback only
- Dohicky-ShipDohickey: Event callback only
Old Notes
Shipgame usage
CSim Sim;
Sim.SetStepSize(0.03);
CBodySet SolidSet;
CBodySet DohickeySet;
SolidSet.Add(Ship);
DohickeySet.Add(Dohickey);
Sim.Add(SolidSet);
Sim.Add(DohickeySet);
Sim.SetResponse(DohickeyHandler)
Sim.Collide(SolidSet,SolidSet);
Sim.Collide(BodySet,BodySet, );
How do I handle the responses?
ResponseMatrix?
similar to the material matrix
quickly look up the response function
Sim.SetOnCollide(SolidSet,SolidSet);
Sim.SetResponse(SolidSet,SolidSet);
Sim.SetResponseFunction(SolidSet,SolidSet);
Sim.Step();
All responses
Copyright 2004 © Polyart. All rights reserved.
Designed by Kenneth Manta