Examples of Tuple3dState


Examples of barsuift.simLife.j3d.Tuple3dState

    /**
     * Test with 2 leaves, one of which has 0 for area
     */
    public void testGetRandomLeafToIncrease5() {
        TreeLeaf3DState leaf3DState1 = new TreeLeaf3DState();
        leaf3DState1.setEndPoint1(new Tuple3dState(0, 0, 0));
        leaf3DState1.setEndPoint2(new Tuple3dState(0, 0, 0));
        // this is to ensure the leaf is not considered to have reached its maximum size
        leaf3DState1.setInitialEndPoint1(new Tuple3dState(0.2, 0, 0));
        leaf3DState1.setInitialEndPoint2(new Tuple3dState(0, 0.2, 0));
        TreeLeaf3DState leaf3DState2 = new TreeLeaf3DState();
        leaf3DState2.setEndPoint1(new Tuple3dState(2, 0, 0));
        leaf3DState2.setEndPoint2(new Tuple3dState(0, 4, 0));
        TreeLeafState leafState1 = new TreeLeafState();
        leafState1.setLeaf3DState(leaf3DState1);
        TreeLeafState leafState2 = new TreeLeafState();
        leafState2.setLeaf3DState(leaf3DState2);
        List<TreeLeafState> leaveStates = new ArrayList<TreeLeafState>(2);
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

    private Tuple3dState endPoint2;

    public TreeLeaf3DState() {
        super();
        this.transform = new Transform3DState();
        this.initialEndPoint1 = new Tuple3dState();
        this.initialEndPoint2 = new Tuple3dState();
        this.endPoint1 = new Tuple3dState();
        this.endPoint2 = new Tuple3dState();
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

    @Override
    public void synchronize() {
        Transform3D transform3D = new Transform3D();
        tg.getTransform(transform3D);
        state.setTransform(new Transform3DState(transform3D));
        state.setInitialEndPoint1(new Tuple3dState(initialEndPoint1));
        state.setInitialEndPoint2(new Tuple3dState(initialEndPoint2));
        state.setEndPoint1(new Tuple3dState(endPoint1));
        state.setEndPoint2(new Tuple3dState(endPoint2));
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

     * <li>end point 2 : 10 * initial end point 2</li>
     * </ul>
     */
    public TreeLeaf3DState createRandomTreeLeaf3DState(Transform3D transform) {
        Transform3DState transformState = new Transform3DState(transform);
        Tuple3dState initialEndPoint1 = new Tuple3dState(-0.02 + Randomizer.random1() / 10, -0.04
                + Randomizer.random1() / 10, 0);
        Tuple3dState initialEndPoint2 = new Tuple3dState(0.02 + Randomizer.random1() / 10, -0.04 + Randomizer.random1()
                / 10, 0);
        Tuple3dState endPoint1 = new Tuple3dState(initialEndPoint1.getX() * 10, initialEndPoint1.getY() * 10,
                initialEndPoint1.getZ() * 10);
        Tuple3dState endPoint2 = new Tuple3dState(initialEndPoint2.getX() * 10, initialEndPoint2.getY() * 10,
                initialEndPoint2.getZ() * 10);
        return new TreeLeaf3DState(transformState, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

        Transform3DState transformState = new Transform3DState(transform);

        double x1 = -0.02 + Randomizer.random1() / 10;
        double y1 = -0.04 + Randomizer.random1() / 10;
        int z1 = 0;
        Tuple3dState initialEndPoint1 = new Tuple3dState(x1, y1, z1);

        double x2 = 0.02 + Randomizer.random1() / 10;
        double y2 = -0.04 + Randomizer.random1() / 10;
        int z2 = 0;
        Tuple3dState initialEndPoint2 = new Tuple3dState(x2, y2, z2);

        Tuple3dState endPoint1 = new Tuple3dState(x1, y1, z1);
        Tuple3dState endPoint2 = new Tuple3dState(x2, y2, z2);

        return new TreeLeaf3DState(transformState, initialEndPoint1, initialEndPoint2, endPoint1, endPoint2);
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

        return state;
    }

    @Override
    public void synchronize() {
        state.setEndPoint(new Tuple3dState(endPoint));
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

    private Tuple3dState translationVector;

    public Tree3DState() {
        super();
        this.translationVector = new Tuple3dState();
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

    private Tuple3dState endPoint;

    public TreeBranchPart3DState() {
        super();
        this.endPoint = new Tuple3dState();
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

     */
    private double rotation;

    public TreeLeaf3DState() {
        super();
        this.leafAttachPoint = new Tuple3dState();
        this.initialEndPoint1 = new Tuple3dState();
        this.initialEndPoint2 = new Tuple3dState();
        this.endPoint1 = new Tuple3dState();
        this.endPoint2 = new Tuple3dState();
        this.rotation = 0;
    }
View Full Code Here

Examples of barsuift.simLife.j3d.Tuple3dState

    private Tuple3dState translationVector;

    public TreeBranch3DState() {
        super();
        this.translationVector = new Tuple3dState();
    }
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.