Package de.ailis.jollada.model

Examples of de.ailis.jollada.model.Geometry


    @Test
    public void testDefaultConstructor()
    {
        final Vertices vertices = new Vertices("ID");
        final Mesh mesh = new Mesh(vertices);
        final Geometry geometry = new Geometry(mesh);
        assertNull(geometry.getId());
        assertNull(geometry.getAsset());
        assertNull(geometry.getName());
        assertSame(mesh, geometry.getGeometric());
    }
View Full Code Here


     */

    @Test
    public void testId()
    {
        final Geometry geometry = new Geometry(new Mesh(new Vertices("ID")));
        assertNull(geometry.getId());
        geometry.setId("foo");
        assertEquals("foo", geometry.getId());
        geometry.setId(null);
        assertNull(geometry.getId());
    }
View Full Code Here

     */

    @Test
    public void testName()
    {
        final Geometry geometry = new Geometry(new Mesh(new Vertices("ID")));
        assertNull(geometry.getName());
        geometry.setName("foo");
        assertEquals("foo", geometry.getName());
        geometry.setName(null);
        assertNull(geometry.getName());
    }
View Full Code Here

     */

    @Test
    public void testAsset()
    {
        final Geometry geometry = new Geometry(new Mesh(new Vertices("ID")));
        assertNull(geometry.getAsset());
        geometry.setAsset(new Asset());
        assertNotNull(geometry.getAsset());
        geometry.setAsset(null);
        assertNull(geometry.getAsset());
    }
View Full Code Here

     */

    @Test
    public void testGeometric()
    {
        final Geometry geometry = new Geometry(new Mesh(new Vertices("ID")));
        final Mesh mesh = new Mesh(new Vertices("ID2"));
        geometry.setGeometric(mesh);
        assertSame(mesh, geometry.getGeometric());
    }
View Full Code Here

     */

    @Test(expected = IllegalArgumentException.class)
    public void testSetGeometricWithNull()
    {
        final Geometry geometry = new Geometry(new Mesh(new Vertices("ID")));
        geometry.setGeometric(null);
    }
View Full Code Here

    public Geometry build()
    {
        if (this.geometric == null)
            throw new IllegalStateException("geometric not set");
        final Geometry geometry = new Geometry(this.geometric);
        geometry.setAsset(this.asset);
        geometry.setId(this.id);
        geometry.setName(this.name);
        return geometry;
    }
View Full Code Here

TOP

Related Classes of de.ailis.jollada.model.Geometry

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.