Search in sources :

Example 1 with CircleShape

use of spacegraph.space2d.phys.collision.shapes.CircleShape in project narchy by automenta.

the class Fracture method smash.

/**
 * Rozbije objekt. Upravi objekt world tak, ze vymaze triesteny objekt
 * a nahradi ho fragmentami na zaklade nastaveneho materialu a clenskych
 * premennych.
 *
 * @param dt casova dlzka framu
 */
public void smash(Smasher smasher, float dt) {
    Shape s = f1.shape;
    if (s == null)
        return;
    if (contact == null) {
        // riesi sa staticky prvok, ktory ma priliz maly obsah
        b1.setType(BodyType.DYNAMIC);
        return;
    }
    Dynamics2D w = b1.W;
    Polygon p = f1.polygon;
    if (p == null) {
        switch(s.m_type) {
            case POLYGON:
                PolygonShape ps = (PolygonShape) s;
                Tuple2f[] vertices = ps.vertex;
                int n = ps.vertices;
                p = new Polygon(n);
                for (int i = 0; i < n; ++i) {
                    p.add(vertices[n - i - 1]);
                }
                break;
            case CIRCLE:
                CircleShape cs = (CircleShape) s;
                p = new Polygon(CIRCLEVERTICES);
                float radius = cs.radius;
                double u = Math.PI * 2 / CIRCLEVERTICES;
                // upravim radius tak, aby bola zachovana velkost obsahu
                radius = (float) Math.sqrt(u / Math.sin(u)) * radius;
                Tuple2f center = cs.center;
                for (int i = 0; i < CIRCLEVERTICES; ++i) {
                    // uhol
                    double j = u * i;
                    float sin = (float) Math.sin(j);
                    float cos = (float) Math.cos(j);
                    Tuple2f v = new v2(sin, cos).scaled(radius).added(center);
                    p.add(v);
                }
                break;
            default:
                throw new RuntimeException("Dany typ tvaru nepodporuje stiepenie");
        }
    }
    // sila v zavislosti na pevnosti telesa
    float mConst = f1.material.m_rigidity / normalImpulse;
    // true, ak f2 je v objekte contact ako m_fixtureA
    boolean fixA = f1 == contact.aFixture;
    float oldAngularVelocity = fixA ? contact.m_angularVelocity_bodyA : contact.m_angularVelocity_bodyB;
    Tuple2f oldLinearVelocity = fixA ? contact.m_linearVelocity_bodyA : contact.m_linearVelocity_bodyB;
    b1.setAngularVelocity((b1.velAngular - oldAngularVelocity) * mConst + oldAngularVelocity);
    b1.setLinearVelocity(b1.vel.sub(oldLinearVelocity).scaled(mConst).added(oldLinearVelocity));
    if (!w.isFractured(f2) && b2.type == BodyType.DYNAMIC && !b2.m_fractureTransformUpdate) {
        // ak sa druhy objekt nerozbija, tak sa jej nahodia povodne hodnoty (TREBA MODIFIKOVAT POHYB OBJEKTU, KTORY SPOSOBUJE ROZPAD)
        oldAngularVelocity = !fixA ? contact.m_angularVelocity_bodyA : contact.m_angularVelocity_bodyB;
        oldLinearVelocity = !fixA ? contact.m_linearVelocity_bodyA : contact.m_linearVelocity_bodyB;
        b2.setAngularVelocity((b2.velAngular - oldAngularVelocity) * mConst + oldAngularVelocity);
        b2.setLinearVelocity(b2.vel.sub(oldLinearVelocity).scaled(mConst).added(oldLinearVelocity));
        b2.setTransform(b2.transformPrev.pos.add(b2.vel.scale(dt)), b2.transformPrev.angle());
        // osetruje jbox2d od posuvania telesa pri rieseni kolizie
        b2.m_fractureTransformUpdate = true;
    }
    Tuple2f localPoint = Transform.mulTrans(b1, point);
    Tuple2f b1Vec = b1.getLinearVelocityFromWorldPoint(point);
    Tuple2f b2Vec = b2.getLinearVelocityFromWorldPoint(point);
    Tuple2f localVelocity = b2Vec.subbed(b1Vec);
    localVelocity.scaled(dt);
    // rodeli to
    Polygon[] fragment = m.split(smasher, p, localPoint, localVelocity, normalImpulse);
    if (fragment.length <= 1) {
        // nerozbilo to na ziadne fragmenty
        return;
    }
    // definuje tela fragmentov - tie maju vsetky rovnaku definiciu (preberaju parametre z povodneho objektu)
    BodyDef bodyDef = new BodyDef();
    // pozicia
    bodyDef.position.set(b1.pos);
    // otocenie
    bodyDef.angle = b1.angle();
    bodyDef.fixedRotation = b1.isFixedRotation();
    bodyDef.angularDamping = b1.m_angularDamping;
    bodyDef.allowSleep = b1.isSleepingAllowed();
    FixtureDef fd = new FixtureDef();
    // trenie
    fd.friction = f1.friction;
    // odrazivost
    fd.restitution = f1.restitution;
    fd.isSensor = f1.isSensor;
    fd.density = f1.density;
    // odstrani fragmentacne predmety/cele teleso
    List<Fixture> fixtures = new FasterList<>();
    if (f1.polygon != null) {
        for (Fixture f = b1.fixtures; f != null; f = f.next) {
            if (f.polygon == f1.polygon) {
                fixtures.add(f);
            }
        }
    } else {
        fixtures.add(f1);
    }
    for (Fixture f : fixtures) {
        b1.removeFixture(f);
    }
    if (b1.fixtureCount == 0) {
        w.removeBody(b1);
    }
    // prida fragmenty do simulacie
    MyList<Body2D> newbodies = new MyList<>();
    for (Polygon pg : fragment) {
        // vytvori tela, prida fixtury, poriesi konvexnu dekompoziciu
        if (pg.isCorrect()) {
            if (pg instanceof Fragment) {
                Polygon[] convex = pg.convexDecomposition();
                bodyDef.type = BodyType.DYNAMIC;
                for (Polygon pgx : convex) {
                    Body2D f_body = w.addBody(bodyDef);
                    pgx.flip();
                    PolygonShape ps = new PolygonShape();
                    ps.set(pgx.getArray(), pgx.size());
                    fd.shape = ps;
                    fd.polygon = null;
                    fd.material = f1.material;
                    // .m_fragments; //rekurzivne stiepenie
                    f_body.addFixture(fd);
                    f_body.setAngularVelocity(b1.velAngular);
                    f_body.setLinearVelocity(b1.getLinearVelocityFromLocalPoint(f_body.getLocalCenter()));
                    newbodies.add(f_body);
                }
            } else {
                fd.material = // .m_fragments; //rekurzivne stiepenie
                f1.material;
                bodyDef.type = b1.getType();
                Body2D f_body = w.addBody(bodyDef);
                PolygonFixture pf = new PolygonFixture(pg);
                f_body.addFixture(pf, fd);
                f_body.setLinearVelocity(b1.getLinearVelocityFromLocalPoint(f_body.getLocalCenter()));
                f_body.setAngularVelocity(b1.velAngular);
                newbodies.add(f_body);
            }
        }
    }
    // zavola sa funkcia z fraction listeneru (pokial je nadefinovany)
    FractureListener fl = w.getContactManager().m_fractureListener;
    if (fl != null) {
        fl.action(m, normalImpulse, newbodies);
    }
}
Also used : PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) Shape(spacegraph.space2d.phys.collision.shapes.Shape) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) Tuple2f(spacegraph.util.math.Tuple2f) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) FasterList(jcog.list.FasterList) MyList(spacegraph.space2d.phys.fracture.util.MyList) spacegraph.util.math.v2(spacegraph.util.math.v2)

Example 2 with CircleShape

use of spacegraph.space2d.phys.collision.shapes.CircleShape in project narchy by automenta.

the class PhyWall method drawBody.

private void drawBody(Body2D body, GL2 gl) {
    if (body.data() instanceof PhyWindow.WallBody) {
        // its rendered already via its Surface
        return;
    }
    if (body instanceof Consumer) {
        // HACK make better custom enderer interface
        ((Consumer) body).accept(gl);
        return;
    }
    // boolean active = body.isActive();
    boolean awake = body.isAwake();
    gl.glColor4f(0.5f, 0.5f, 0.5f, awake ? 0.75f : 0.65f);
    // List<PolygonFixture> generalPolygons = new FasterList<>();
    for (Fixture f = body.fixtures; f != null; f = f.next) {
        PolygonFixture pg = f.polygon;
        if (pg != null) {
        // generalPolygons.add(pg);
        } else {
            Shape shape = f.shape();
            switch(shape.m_type) {
                case POLYGON:
                    Draw.poly(body, gl, (PolygonShape) shape);
                    break;
                case CIRCLE:
                    CircleShape circle = (CircleShape) shape;
                    float r = circle.radius;
                    v2 v = new v2();
                    body.getWorldPointToOut(circle.center, v);
                    // Point p = getPoint(v);
                    // int wr = (int) (r * zoom);
                    // g.fillOval(p.x - wr, p.y - wr, wr * 2, wr * 2);
                    Draw.circle(gl, v, true, r, 9);
                    break;
                case EDGE:
                    EdgeShape edge = (EdgeShape) shape;
                    Tuple2f p1 = edge.m_vertex1;
                    Tuple2f p2 = edge.m_vertex2;
                    gl.glLineWidth(4f);
                    Draw.line(gl, p1.x, p1.y, p2.x, p2.y);
                    break;
            }
        }
    }
// if (generalPolygons.size() != 0) {
// PolygonFixture[] polygonArray = generalPolygons.toArray(new PolygonFixture[generalPolygons.size()]);
// for (PolygonFixture poly : polygonArray) {
// int n = poly.size();
// int x[] = new int[n];
// int y[] = new int[n];
// for (int i = 0; i < n; ++i) {
// body.getWorldPointToOut(poly.get(i), v);
// Point p = getPoint(v);
// x[i] = p.x;
// y[i] = p.y;
// }
// g.fillPolygon(x, y, n);
// }
}
Also used : EdgeShape(spacegraph.space2d.phys.collision.shapes.EdgeShape) PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) Shape(spacegraph.space2d.phys.collision.shapes.Shape) EdgeShape(spacegraph.space2d.phys.collision.shapes.EdgeShape) Tuple2f(spacegraph.util.math.Tuple2f) Consumer(java.util.function.Consumer) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) PolygonFixture(spacegraph.space2d.phys.fracture.PolygonFixture) PolygonFixture(spacegraph.space2d.phys.fracture.PolygonFixture) spacegraph.util.math.v2(spacegraph.util.math.v2)

Example 3 with CircleShape

use of spacegraph.space2d.phys.collision.shapes.CircleShape in project narchy by automenta.

the class BlobTest4 method init.

@Override
public void init(Dynamics2D w) {
    Body2D ground = null;
    {
        PolygonShape sd = new PolygonShape();
        sd.setAsBox(50.0f, 0.4f);
        BodyDef bd = new BodyDef();
        bd.position.set(0.0f, 0.0f);
        ground = w.addBody(bd);
        ground.addFixture(sd, 0f);
        sd.setAsBox(0.4f, 50.0f, new v2(-10.0f, 0.0f), 0.0f);
        ground.addFixture(sd, 0f);
        sd.setAsBox(0.4f, 50.0f, new v2(10.0f, 0.0f), 0.0f);
        ground.addFixture(sd, 0f);
    }
    ConstantVolumeJointDef cvjd = new ConstantVolumeJointDef();
    float cx = 0.0f;
    float cy = 10.0f;
    float rx = 5.0f;
    float ry = 5.0f;
    int nBodies = 40;
    float bodyRadius = 0.25f;
    for (int i = 0; i < nBodies; ++i) {
        float angle = MathUtils.map(i, 0, nBodies, 0, 2 * 3.1415f);
        BodyDef bd = new BodyDef();
        // bd.isBullet = true;
        bd.fixedRotation = true;
        float x = cx + rx * (float) Math.sin(angle);
        float y = cy + ry * (float) Math.cos(angle);
        bd.position.set(new v2(x, y));
        bd.type = BodyType.DYNAMIC;
        Body2D body = w.addBody(bd);
        FixtureDef fd = new FixtureDef();
        CircleShape cd = new CircleShape();
        cd.radius = bodyRadius;
        fd.shape = cd;
        fd.density = 1.0f;
        body.addFixture(fd);
        cvjd.addBody(body);
    }
    cvjd.frequencyHz = 10.0f;
    cvjd.dampingRatio = 0.9f;
    cvjd.collideConnected = false;
    w.addJoint(cvjd);
    BodyDef bd2 = new BodyDef();
    bd2.type = BodyType.DYNAMIC;
    PolygonShape psd = new PolygonShape();
    psd.setAsBox(3.0f, 1.5f, new v2(cx, cy + 15.0f), 0.0f);
    bd2.position = new v2(cx, cy + 15.0f);
    Body2D fallingBox = w.addBody(bd2);
    fallingBox.addFixture(psd, 1.0f);
}
Also used : PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) ConstantVolumeJointDef(spacegraph.space2d.phys.dynamics.joints.ConstantVolumeJointDef) spacegraph.util.math.v2(spacegraph.util.math.v2)

Example 4 with CircleShape

use of spacegraph.space2d.phys.collision.shapes.CircleShape in project narchy by automenta.

the class TensorGlow method main.

public static void main(String[] args) {
    PhyWall p = SpaceGraph.wall(1200, 1000);
    p.W.setGravity(new v2(0, -2.8f));
    staticBox(p.W, -5, -8, +5, 2f, false, true, true, true);
    for (int j = 0; j < 3; j++) {
        BodyDef bodyDef2 = new BodyDef();
        bodyDef2.type = BodyType.DYNAMIC;
        // otocenie
        bodyDef2.angle = -0.6f;
        // smer pohybu
        bodyDef2.linearVelocity = new v2(0.0f, 0.0f);
        // rotacia (rychlost rotacie)
        bodyDef2.angularVelocity = 0.0f;
        Body2D newBody = p.W.addBody(bodyDef2);
        PolygonShape shape2 = new PolygonShape();
        shape2.setAsBox(0.25f, 0.25f);
        Fixture f = newBody.addFixture(shape2, 1.0f);
        // trenie
        f.friction = 0.5f;
        // odrazivost
        f.restitution = 0.0f;
        f.material = new Uniform();
        f.material.m_rigidity = 1.0f;
    }
    // //ceiling rack
    // addBox(p.W, -1, +0.4f, 0, +0.65f, false, true, true, true);
    // new Pacman(p.W);
    {
        p.W.setContactListener(new Explosives.ExplosionContacts());
        TheoJansen t = new TheoJansen(p.W, 0.35f);
        PhyWall.PhyWindow pw = p.put(new Gridding(0.5f, new Port((float[] v) -> {
            // System.out.println(v);
            t.motorJoint.setMotorSpeed(v[0] * 2 - v[1] * 2);
            t.motorJoint.setMaxMotorTorque(v[2]);
            t.motorJoint.enableLimit(true);
            t.motorJoint.setLimits((float) (-v[3] * Math.PI), (float) (+v[4] * Math.PI));
            if (v[5] > 0.5f) {
                t.gun.fire();
            }
            t.turretJoint.setLimits((float) (+Math.PI / 2 + v[6] * Math.PI - 0.1f), (float) (+Math.PI / 2 + v[6] * Math.PI + 0.1f));
        })), 0.8f, 0.4f);
        p.W.addJoint(new RevoluteJoint(p.W, new RevoluteJointDef(pw.body, t.chassis)));
    }
    {
        p.W.setParticleRadius(0.05f);
        p.W.setParticleDamping(0.1f);
        CircleShape shape = new CircleShape();
        shape.center.set(0, 10);
        shape.radius = 2f;
        ParticleGroupDef pd = new ParticleGroupDef();
        pd.flags = ParticleType.b2_waterParticle;
        // b2_viscousParticle;
        // b2_elasticParticle;
        // b2_springParticle;
        // b2_powderParticle;
        pd.color = new ParticleColor(0.7f, 0.1f, 0.1f, 0.8f);
        pd.shape = shape;
        p.W.addParticles(pd);
    }
    HaiQae q = new HaiQae(8, 2);
    float[] in = new float[q.ae.inputs()];
    final Tensor randomVector = Tensor.randomVectorGauss(in.length, 0, 1, rng);
    final FloatRange lerpRate = new FloatRange(0.01f, 0, 1f);
    final TensorLERP lerpVector = new TensorLERP(randomVector, lerpRate);
    PhyWall.PhyWindow w = p.put(new Gridding(0.25f, new AutoUpdateMatrixView(lerpVector.data), new LabeledPane("lerp", new XYSlider().on((x, y) -> {
        lerpRate.set(x);
    })), new LabeledPane("out", new Port((x) -> {
    }) {

        @Override
        public void prePaint(int dtMS) {
            super.prePaint(dtMS);
            out(lerpVector.data);
        }
    })), 0.5f, 0.5f);
    p.put(new TogglePort(), 0.25f, 0.25f);
    PhyWall.PhyWindow qw = p.put(new Gridding(new Label("HaiQ"), new AutoSurface<>(q), new LabeledPane("input", new Port((float[] i) -> {
        System.arraycopy(i, 0, in, 0, i.length);
    })), new Gridding(VERTICAL, new AutoUpdateMatrixView(in), new AutoUpdateMatrixView(q.ae.x), new AutoUpdateMatrixView(q.ae.W), new AutoUpdateMatrixView(q.ae.y)), new Gridding(VERTICAL, new AutoUpdateMatrixView(q.q), new AutoUpdateMatrixView(q.et))), 1, 1);
    Loop.of(() -> {
        lerpVector.update();
        q.act((((float) Math.random()) - 0.5f) * 2, in);
    }).runFPS(25);
}
Also used : Fixture(spacegraph.space2d.phys.dynamics.Fixture) ParticleGroupDef(spacegraph.space2d.phys.particle.ParticleGroupDef) Explosives(spacegraph.space2d.phys.explosive.Explosives) Tensor(jcog.math.tensor.Tensor) HaiQae(jcog.learn.ql.HaiQae) Random(java.util.Random) RevoluteJoint(spacegraph.space2d.phys.dynamics.joints.RevoluteJoint) Port(spacegraph.space2d.widget.windo.Port) ParticleColor(spacegraph.space2d.phys.particle.ParticleColor) AutoSurface(spacegraph.space2d.widget.meta.AutoSurface) AutoUpdateMatrixView(spacegraph.space2d.widget.meter.AutoUpdateMatrixView) BodyDef(spacegraph.space2d.phys.dynamics.BodyDef) PhyWall(spacegraph.space2d.widget.windo.PhyWall) Gridding(spacegraph.space2d.container.Gridding) BodyType(spacegraph.space2d.phys.dynamics.BodyType) ParticleType(spacegraph.space2d.phys.particle.ParticleType) RevoluteJointDef(spacegraph.space2d.phys.dynamics.joints.RevoluteJointDef) XoRoShiRo128PlusRandom(jcog.math.random.XoRoShiRo128PlusRandom) PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) LabeledPane(spacegraph.space2d.widget.text.LabeledPane) Loop(jcog.exe.Loop) TogglePort(spacegraph.space2d.widget.windo.TogglePort) XYSlider(spacegraph.space2d.widget.slider.XYSlider) Dynamics2D.staticBox(spacegraph.space2d.phys.dynamics.Dynamics2D.staticBox) Uniform(spacegraph.space2d.phys.fracture.materials.Uniform) FloatRange(jcog.math.FloatRange) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) spacegraph.util.math.v2(spacegraph.util.math.v2) TensorLERP(jcog.math.tensor.TensorLERP) VERTICAL(spacegraph.space2d.container.Gridding.VERTICAL) SpaceGraph(spacegraph.SpaceGraph) Label(spacegraph.space2d.widget.text.Label) Body2D(spacegraph.space2d.phys.dynamics.Body2D) PolygonShape(spacegraph.space2d.phys.collision.shapes.PolygonShape) Port(spacegraph.space2d.widget.windo.Port) TogglePort(spacegraph.space2d.widget.windo.TogglePort) Label(spacegraph.space2d.widget.text.Label) Uniform(spacegraph.space2d.phys.fracture.materials.Uniform) CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) TogglePort(spacegraph.space2d.widget.windo.TogglePort) FloatRange(jcog.math.FloatRange) AutoSurface(spacegraph.space2d.widget.meta.AutoSurface) LabeledPane(spacegraph.space2d.widget.text.LabeledPane) Fixture(spacegraph.space2d.phys.dynamics.Fixture) BodyDef(spacegraph.space2d.phys.dynamics.BodyDef) ParticleGroupDef(spacegraph.space2d.phys.particle.ParticleGroupDef) HaiQae(jcog.learn.ql.HaiQae) Tensor(jcog.math.tensor.Tensor) RevoluteJoint(spacegraph.space2d.phys.dynamics.joints.RevoluteJoint) TensorLERP(jcog.math.tensor.TensorLERP) RevoluteJoint(spacegraph.space2d.phys.dynamics.joints.RevoluteJoint) RevoluteJointDef(spacegraph.space2d.phys.dynamics.joints.RevoluteJointDef) Gridding(spacegraph.space2d.container.Gridding) AutoUpdateMatrixView(spacegraph.space2d.widget.meter.AutoUpdateMatrixView) XYSlider(spacegraph.space2d.widget.slider.XYSlider) PhyWall(spacegraph.space2d.widget.windo.PhyWall) ParticleColor(spacegraph.space2d.phys.particle.ParticleColor) spacegraph.util.math.v2(spacegraph.util.math.v2) Body2D(spacegraph.space2d.phys.dynamics.Body2D)

Example 5 with CircleShape

use of spacegraph.space2d.phys.collision.shapes.CircleShape in project narchy by automenta.

the class VerletTest method init.

@Override
public void init(Dynamics2D w) {
    // physics.addBehavior(new GravityBehavior2D(new Vec2D(0,0.1)));
    // physics.setWorldBounds(new Rect(0,0,width,height));
    List<Body2D> particles = new FasterList();
    for (int y = 0, idx = 0; y < DIM; y++) {
        for (int x = 0; x < DIM; x++) {
            Body2D p = w.addBody(new BodyDef(BodyType.DYNAMIC), new FixtureDef(new CircleShape(REST_LENGTH / 4f), 0.1f, 0f));
            p.setTransform(new v2(x * REST_LENGTH, y * REST_LENGTH), 0);
            particles.add(p);
            if (x > 0) {
                spring(w, p, particles.get(idx - 1), STRENGTH, REST_LENGTH);
            }
            if (y > 0) {
                spring(w, p, particles.get(idx - DIM), STRENGTH, REST_LENGTH);
            }
            idx++;
        }
    }
    spring(w, particles.get(0), particles.get(particles.size() - 1), INNER_STRENGTH, (float) sqrt(sqr(REST_LENGTH * (DIM - 1)) * 2));
    spring(w, particles.get(DIM - 1), particles.get(particles.size() - DIM), INNER_STRENGTH, (float) sqrt(sqr(REST_LENGTH * (DIM - 1)) * 2));
// head=physics.particles.get((DIM-1)/2);
// head.lock();
}
Also used : CircleShape(spacegraph.space2d.phys.collision.shapes.CircleShape) FasterList(jcog.list.FasterList) spacegraph.util.math.v2(spacegraph.util.math.v2) RopeJoint(spacegraph.space2d.phys.dynamics.joints.RopeJoint)

Aggregations

CircleShape (spacegraph.space2d.phys.collision.shapes.CircleShape)11 PolygonShape (spacegraph.space2d.phys.collision.shapes.PolygonShape)7 spacegraph.util.math.v2 (spacegraph.util.math.v2)7 EdgeShape (spacegraph.space2d.phys.collision.shapes.EdgeShape)3 Shape (spacegraph.space2d.phys.collision.shapes.Shape)3 Tuple2f (spacegraph.util.math.Tuple2f)3 FasterList (jcog.list.FasterList)2 Vec2 (spacegraph.space2d.phys.common.Vec2)2 Body2D (spacegraph.space2d.phys.dynamics.Body2D)2 BodyDef (spacegraph.space2d.phys.dynamics.BodyDef)2 RevoluteJoint (spacegraph.space2d.phys.dynamics.joints.RevoluteJoint)2 RevoluteJointDef (spacegraph.space2d.phys.dynamics.joints.RevoluteJointDef)2 PolygonFixture (spacegraph.space2d.phys.fracture.PolygonFixture)2 MyList (spacegraph.space2d.phys.fracture.util.MyList)2 ParticleGroupDef (spacegraph.space2d.phys.particle.ParticleGroupDef)2 Random (java.util.Random)1 Consumer (java.util.function.Consumer)1 Loop (jcog.exe.Loop)1 HaiQae (jcog.learn.ql.HaiQae)1 FloatRange (jcog.math.FloatRange)1