package de.kleppmann.maniation;

import de.kleppmann.maniation.dynamics.Simulation;

public class TestDynamics {

    public TestDynamics() {
        super();
        Simulation sim = new Simulation();
        //MultiPendulum.setup(sim, 2);
        new NewtonsCradle(sim);
        sim.run(1.0);
    }

    public static void main(String[] args) {
        new TestDynamics();
    }
}

package de.kleppmann.maniation;

import de.kleppmann.maniation.dynamics.DynamicScene;
import de.kleppmann.maniation.dynamics.Simulation;
import de.kleppmann.maniation.scene.Scene;
import de.kleppmann.maniation.scene.XMLParser;

public class TestDynamics {

    public TestDynamics() {
        XMLParser sceneParser = new XMLParser(new org.apache.xerces.jaxp.SAXParserFactoryImpl());
        Scene scene;
        try {
            scene = sceneParser.parse("../boxes.xml");
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
        Simulation sim = new Simulation();
        //MultiPendulum.setup(sim, 2);
        //new NewtonsCradle(sim);
        new DynamicScene(scene, sim);
        sim.run(5.0);
    }

    public static void main(String[] args) {
        new TestDynamics();
    }
}

Use DynamicScene, and load `boxes' example from XML file.
Use DynamicScene, and load `boxes' example from XML file.


git-svn-id: a58cbee154157db216ea9cabc74ae3f0d9b0b68c@1311 3ab4d77f-209f-454f-af32-ffe4b78d429c
