public PPhysWorld() { this.iterations = 10; this.gravity = new Vector2f(0.0F, 9.80665F); this.bodies = new PBody[1024]; this.joints = new PJoint[1024]; this.shapes = new PShape[1024]; this.solvers = new PSolver[1024]; this.sap = new PSweepAndPrune(); }
public PPhysWorld() { this.iterations = 10; this.gravity = new Vector2f(0.0F, 9.80665F); this.bodies = new PBody[1024]; this.joints = new PJoint[1024]; this.shapes = new PShape[1024]; this.solvers = new PSolver[1024]; this.sap = new PSweepAndPrune(); }
public void Set(PSweepAndPrune sap, PShape s, AABB aabb) { set = true; this.sap = sap; parent = s; this.aabb = aabb; beginX = new PSortableObject(s, this, aabb.minX, true); beginY = new PSortableObject(s, this, aabb.minY, true); endX = new PSortableObject(s, this, aabb.maxX, false); endY = new PSortableObject(s, this, aabb.maxY, false); sap.AddObject(beginX, beginY); sap.AddObject(endX, endY); }
public void Set(PSweepAndPrune sap, PShape s, AABB aabb) { set = true; this.sap = sap; parent = s; this.aabb = aabb; beginX = new PSortableObject(s, this, aabb.minX, true); beginY = new PSortableObject(s, this, aabb.minY, true); endX = new PSortableObject(s, this, aabb.maxX, false); endY = new PSortableObject(s, this, aabb.maxY, false); sap.AddObject(beginX, beginY); sap.AddObject(endX, endY); }