Package toxi.physics3d

Examples of toxi.physics3d.VerletPhysics3D


    }

    public void setup() {
        size(1024, 768, P3D);
        smooth();
        physics = new VerletPhysics3D();
        // physics.addBehavior(new GravityBehavior(new Vec3D(0, 0.2f, 0),
        // 0.6f));
        Vec3D stepDir = new Vec3D(1, 0, 0).normalizeTo(REST_LENGTH);
        ParticleString3D s = new ParticleString3D(physics, new Vec3D(), stepDir,
                NUM_PARTICLES, 1, 0.1f);
View Full Code Here


    }

    public void setup() {
        size(1024, 576, OPENGL);
        gfx = new ToxiclibsSupport(this);
        physics = new VerletPhysics3D();
        physics.setDrag(0.15f);
        physics.setWorldBounds(new AABB(new Vec3D(), 250));
        physics.addBehavior(new GravityBehavior3D(new Vec3D(0, 0.2f, 0)));
        physics.addBehavior(new AttractionBehavior3D(new Vec3D(), 500, 0.1f));
        for (int i = 0; i < NUM_PARTICLES; i++) {
View Full Code Here

TOP

Related Classes of toxi.physics3d.VerletPhysics3D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.