Package libshapedraw.primitive

Examples of libshapedraw.primitive.Vector3


public class TestWireframeLine extends SetupTestEnvironment.TestCase {
    @Test
    public void testConstructors() {
        new WireframeLine(1.0,2.0,3.0, 4.0,5.0,6.0);
        new WireframeLine(new Vector3(1.0,2.0,3.0), new Vector3(4.0,5.0,6.0));

        // it is valid to have both points be the same values
        new WireframeLine(0,0,0, 0,0,0);
        // or even the same instance
        Vector3 v = new Vector3(8.67, -5.3, 0.9);
        WireframeLine shape = new WireframeLine(v, v);
        assertSame(shape.getPointA(), shape.getPointB());
    }
View Full Code Here


        assertSame(shape.getPointA(), shape.getPointB());
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorInvalidNullA() {
        new WireframeLine(null, new Vector3(1.0, 2.0, 3.0));
    }
View Full Code Here

        new WireframeLine(null, new Vector3(1.0, 2.0, 3.0));
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorInvalidNullB() {
        new WireframeLine(new Vector3(1.0, 2.0, 3.0), null);
    }
View Full Code Here

        assertEquals("(4.0,5.0,6.0)", shape.getPointB().toString());
        assertNotSame(shape.getPointA(), shape.getPointB());

        shape.setPointA(shape.getPointB());
        assertSame(shape.getPointA(), shape.getPointB());
        shape.setPointB(new Vector3(-1.0, -2.0, -3.0));
        assertNotSame(shape.getPointA(), shape.getPointB());
        assertEquals("(-1.0,-2.0,-3.0)", shape.getPointB().toString());
    }
View Full Code Here

        arr = new ArrayList<ReadonlyVector3>();
        new WireframeLinesBlend(arr);

        arr = new ArrayList<ReadonlyVector3>();
        arr.add(new Vector3(1.0, 2.0, 3.0));
        new WireframeLinesBlend(arr);
    }
View Full Code Here

    }

    @Test
    public void testConstructorHiddenNullItem() {
        ArrayList<ReadonlyVector3> arr = new ArrayList<ReadonlyVector3>();
        arr.add(new Vector3(1.0, 2.0, 3.0));
        // this null is invalid and will break things later, but the constructor will accept it
        arr.add(null);
        new WireframeLinesBlend(arr);
    }
View Full Code Here

        arr = new ArrayList();
        new WireframeLinesBlend(arr);

        arr = new ArrayList();
        arr.add(new Vector3(1.0, 2.0, 3.0));
        new WireframeLinesBlend(arr);
    }
View Full Code Here

*/
public class ShapeScale implements ShapeTransform, Animates<ReadonlyVector3> {
    private Vector3 scaleXYZ;

    public ShapeScale() {
        this(new Vector3(1.0, 1.0, 1.0));
    }
View Full Code Here

    public ShapeScale() {
        this(new Vector3(1.0, 1.0, 1.0));
    }
    public ShapeScale(double scaleX, double scaleY, double scaleZ) {
        this(new Vector3(scaleX, scaleY, scaleZ));
    }
View Full Code Here

    }
    public ShapeScale(double scaleX, double scaleY, double scaleZ) {
        this(new Vector3(scaleX, scaleY, scaleZ));
    }
    public ShapeScale(double scale) {
        this(new Vector3(scale, scale, scale));
    }
View Full Code Here

TOP

Related Classes of libshapedraw.primitive.Vector3

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.