Examples of TreeLeaf3DState


Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        super();
        this.efficiency = new BigDecimal(0);
        this.energy = new BigDecimal(0);
        this.freeEnergy = new BigDecimal(0);
        this.age = 0;
        this.leaf3DState = new TreeLeaf3DState();
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        Transform3DState transform = createRandomTransform3DState();
        Tuple3dState initialEndPoint1 = createRandomTupleState();
        Tuple3dState initialEndPoint2 = createRandomTupleState();
        Tuple3dState endPoint1 = createRandomTupleState();
        Tuple3dState endPoint2 = createRandomTupleState();
        return new TreeLeaf3DState(transform, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        Transform3DState transform = createSpecificTransform3DState();
        Tuple3dState initialEndPoint1 = new Tuple3dState(0.2, 0.2, 0.0);
        Tuple3dState initialEndPoint2 = new Tuple3dState(0.2, 0.1, 0.0);
        Tuple3dState endPoint1 = new Tuple3dState(0.4, 0.0, 0.0);
        Tuple3dState endPoint2 = new Tuple3dState(0.2, 0.4, 0.0);
        return new TreeLeaf3DState(transform, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        BigDecimal efficiency = PercentHelper.getDecimalValue(Randomizer.randomBetween(90, 100));
        int age = Randomizer.randomBetween(0, 100);
        BigDecimal energy = new BigDecimal(Randomizer.randomBetween(0, 100));
        BigDecimal freeEnergy = new BigDecimal(Randomizer.randomBetween(0, 50));
        TreeLeaf3DStateFactory leaf3DStateFactory = new TreeLeaf3DStateFactory();
        TreeLeaf3DState leaf3dState = leaf3DStateFactory.createRandomTreeLeaf3DState(leafAttachPoint);
        return new TreeLeafState(age, energy, freeEnergy, efficiency, leaf3dState);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

    public TreeLeafState createNewTreeLeafState(Point3d leafAttachPoint, BigDecimal energy) {
        BigDecimal efficiency = PercentHelper.getDecimalValue(Randomizer.randomBetween(90, 100));
        int age = 0;
        BigDecimal freeEnergy = new BigDecimal(0);
        TreeLeaf3DStateFactory leaf3DStateFactory = new TreeLeaf3DStateFactory();
        TreeLeaf3DState leaf3dState = leaf3DStateFactory.createNewTreeLeaf3DState(leafAttachPoint);
        return new TreeLeafState(age, energy, freeEnergy, efficiency, leaf3dState);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        BigDecimal efficiency = PercentHelper.getDecimalValue(Randomizer.randomBetween(90, 100));
        long creationMillis = Randomizer.randomBetween(0, 100) * 1000;
        BigDecimal energy = new BigDecimal(Randomizer.randomBetween(0, 100));
        BigDecimal freeEnergy = new BigDecimal(Randomizer.randomBetween(0, 50));
        TreeLeaf3DStateFactory leaf3DStateFactory = new TreeLeaf3DStateFactory();
        TreeLeaf3DState leaf3dState = leaf3DStateFactory.createRandomTreeLeaf3DState(transform);
        return new TreeLeafState(creationMillis, energy, freeEnergy, efficiency, leaf3dState);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

     */
    public TreeLeafState createNewTreeLeafState(Transform3D transform, BigDecimal energy, long creationMillis) {
        BigDecimal efficiency = PercentHelper.getDecimalValue(Randomizer.randomBetween(90, 100));
        BigDecimal freeEnergy = new BigDecimal(0);
        TreeLeaf3DStateFactory leaf3DStateFactory = new TreeLeaf3DStateFactory();
        TreeLeaf3DState leaf3dState = leaf3DStateFactory.createNewTreeLeaf3DState(transform);
        return new TreeLeafState(creationMillis, energy, freeEnergy, efficiency, leaf3dState);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        Point3dState initialEndPoint1 = createRandomPointState();
        Point3dState initialEndPoint2 = createRandomPointState();
        Point3dState endPoint1 = createRandomPointState();
        Point3dState endPoint2 = createRandomPointState();
        double rotation = Randomizer.randomRotation();
        return new TreeLeaf3DState(attachPoint, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2, rotation);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

        Point3dState initialEndPoint1 = new Point3dState(0.2, 0.2, 0.0);
        Point3dState initialEndPoint2 = new Point3dState(0.2, 0.1, 0.0);
        Point3dState endPoint1 = new Point3dState(0.4, 0.0, 0.0);
        Point3dState endPoint2 = new Point3dState(0.2, 0.4, 0.0);
        double rotation = Math.PI / 3;
        return new TreeLeaf3DState(attachPoint, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2, rotation);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3DState

    }

    public void testAddElement3D() {
        BasicUniverse3D universe3D = new BasicUniverse3D(new Universe3DState(), new MockUniverse());
        TreeLeaf3DStateFactory stateFactory = new TreeLeaf3DStateFactory();
        TreeLeaf3DState leaf3dState = stateFactory.createRandomTreeLeaf3DState(new Transform3D());
        BasicTreeLeaf3D treeLeaf3D = new BasicTreeLeaf3D(universe3D, leaf3dState, new MockTreeLeaf());
        universe3D.addElement3D(treeLeaf3D.getBranchGroup());
        Set<Node> elements3d = universe3D.getElements3D();
        assertNotNull(elements3d);
        assertEquals(1, elements3d.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.