Package barsuift.simLife.j3d

Examples of barsuift.simLife.j3d.SimLifeCanvas3DState


    }

    public static UniverseContextState createRandomUniverseContextState() {
        UniverseState universeState = createRandomUniverseState();
        MainSynchronizerState synchroState = createRandomMainSynchronizerState();
        SimLifeCanvas3DState canvasState = DisplayDataCreatorForTests.createSpecificCanvasState();
        boolean axisShowing = UtilDataCreatorForTests.createRandomBoolean();
        boolean fpsShowing = UtilDataCreatorForTests.createRandomBoolean();
        double[] viewerTransform = DisplayDataCreatorForTests.createSpecificTransform3D();

        return new UniverseContextState(universeState, synchroState, canvasState, axisShowing, fpsShowing,
View Full Code Here


     *
     */
    public static UniverseContextState createSpecificUniverseContextState() {
        UniverseState universeState = createSpecificUniverseState();
        MainSynchronizerState synchroState = createSpecificMainSynchronizerState();
        SimLifeCanvas3DState canvasState = DisplayDataCreatorForTests.createSpecificCanvasState();
        boolean axisShowing = true;
        boolean fpsShowing = false;
        double[] viewerTransform = DisplayDataCreatorForTests.createSpecificTransform3D();
        return new UniverseContextState(universeState, synchroState, canvasState, axisShowing, fpsShowing,
                viewerTransform);
View Full Code Here

        UniverseContextStateFactory factory = new UniverseContextStateFactory();
        UniverseContextState universeContextState = factory.createRandomUniverseContextState();
        assertTrue(universeContextState.isAxisShowing());
        assertFalse(universeContextState.isFpsShowing());

        SimLifeCanvas3DState canvasState = universeContextState.getCanvasState();
        assertNotNull(canvasState);
        assertFalse(canvasState.isFpsShowing());

        UniverseState universeState = universeContextState.getUniverseState();
        assertNotNull(universeState);
        int nbTrees = universeState.getTrees().size();
        assertTrue(nbTrees >= 1);
View Full Code Here

    private double[] viewerTransform3D;

    public UniverseContextState() {
        super();
        this.universeState = new UniverseState();
        this.canvasState = new SimLifeCanvas3DState();
        this.axisShowing = true;
        // identity matrix
        this.viewerTransform3D = new double[] { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 };
    }
View Full Code Here

     */
    public UniverseContextState createRandomUniverseContextState() {
        UniverseStateFactory universeStateFactory = new UniverseStateFactory();
        UniverseState universeState = universeStateFactory.createRandomUniverseState();
        SimLifeCanvas3DStateFactory canvasStateFactory = new SimLifeCanvas3DStateFactory();
        SimLifeCanvas3DState canvasState = canvasStateFactory.createRandomCanvasState();
        return new UniverseContextState(universeState, canvasState, true, NOMINAL_VIEWER_TRANSFORM);
    }
View Full Code Here

     */
    public UniverseContextState createEmptyUniverseContextState() {
        UniverseStateFactory universeStateFactory = new UniverseStateFactory();
        UniverseState universeState = universeStateFactory.createEmptyUniverseState();
        SimLifeCanvas3DStateFactory canvasStateFactory = new SimLifeCanvas3DStateFactory();
        SimLifeCanvas3DState canvasState = canvasStateFactory.createEmptyCanvasState();
        return new UniverseContextState(universeState, canvasState, true, NOMINAL_VIEWER_TRANSFORM);
    }
View Full Code Here

        UniverseStateFactory universeStateFactory = new UniverseStateFactory();
        UniverseState universeState = universeStateFactory.createRandomUniverseState();
        MainSynchronizerStateFactory synchroStateFactory = new MainSynchronizerStateFactory();
        MainSynchronizerState synchronizerState = synchroStateFactory.createMainSynchronizerState();
        SimLifeCanvas3DStateFactory canvasStateFactory = new SimLifeCanvas3DStateFactory();
        SimLifeCanvas3DState canvasState = canvasStateFactory.createRandomCanvasState();
        return new UniverseContextState(universeState, synchronizerState, canvasState, axisShowing, fpsShowing,
                NOMINAL_VIEWER_TRANSFORM);
    }
View Full Code Here

        UniverseStateFactory universeStateFactory = new UniverseStateFactory();
        UniverseState universeState = universeStateFactory.createEmptyUniverseState();
        MainSynchronizerStateFactory synchroStateFactory = new MainSynchronizerStateFactory();
        MainSynchronizerState synchronizerState = synchroStateFactory.createMainSynchronizerState();
        SimLifeCanvas3DStateFactory canvasStateFactory = new SimLifeCanvas3DStateFactory();
        SimLifeCanvas3DState canvasState = canvasStateFactory.createEmptyCanvasState();
        return new UniverseContextState(universeState, synchronizerState, canvasState, axisShowing, fpsShowing,
                NOMINAL_VIEWER_TRANSFORM);
    }
View Full Code Here

    public void testCreateRandomUniverseContextState() {
        UniverseContextStateFactory factory = new UniverseContextStateFactory();
        UniverseContextState universeContextState = factory.createRandomUniverseContextState();
        assertTrue(universeContextState.isAxisShowing());

        SimLifeCanvas3DState canvasState = universeContextState.getCanvasState();
        assertNotNull(canvasState);
        assertFalse(canvasState.isFpsShowing());

        UniverseState universeState = universeContextState.getUniverseState();
        assertNotNull(universeState);
        int nbTrees = universeState.getTrees().size();
        assertTrue(nbTrees >= 1);
View Full Code Here

    public UniverseContextState() {
        super();
        this.universeState = new UniverseState();
        this.synchronizer = new MainSynchronizerState();
        this.canvasState = new SimLifeCanvas3DState();
        this.axisShowing = true;
        this.fpsShowing = false;
        // identity matrix
        this.viewerTransform3D = new double[] { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 };
    }
View Full Code Here

TOP

Related Classes of barsuift.simLife.j3d.SimLifeCanvas3DState

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.