Examples of SkewTransform


Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test
    public void testConstructor()
    {
        final SkewTransform transform = new SkewTransform();
        assertNull(transform.getSid());
        assertNotNull(transform.getRotationAxis());
        assertNotNull(transform.getTranslationAxis());
        assertEquals(0, transform.getAngle(), 0.001f);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test
    public void testSid()
    {
        final SkewTransform transform = new SkewTransform();
        assertNull(transform.getSid());
        transform.setSid("foo");
        assertEquals("foo", transform.getSid());
        transform.setSid(null);
        assertNull(transform.getSid());
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test
    public void testAngle()
    {
        final SkewTransform transform = new SkewTransform();
        assertEquals(0, transform.getAngle(), 0.001f);
        transform.setAngle(1);
        assertEquals(1, transform.getAngle(), 0.001f);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test
    public void testRotationAxis()
    {
        final SkewTransform transform = new SkewTransform();
        assertTrue(transform.getRotationAxis().isNull());
        final ImmutableVector3d translation = new ImmutableVector3d(1, 2, 3);
        transform.setRotationAxis(translation);
        assertEquals(translation.getX(), transform.getRotationAxis().getX(),
            0.0001f);
        assertEquals(translation.getY(), transform.getRotationAxis().getY(),
            0.0001f);
        assertEquals(translation.getZ(), transform.getRotationAxis().getZ(),
            0.0001f);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test(expected = IllegalArgumentException.class)
    public void testRotationAxisWithNull()
    {
        new SkewTransform().setRotationAxis(null);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test
    public void testTranslationAxis()
    {
        final SkewTransform transform = new SkewTransform();
        assertTrue(transform.getTranslationAxis().isNull());
        final ImmutableVector3d translation = new ImmutableVector3d(1, 2, 3);
        transform.setTranslationAxis(translation);
        assertEquals(translation.getX(), transform.getTranslationAxis().getX(),
            0.0001f);
        assertEquals(translation.getY(), transform.getTranslationAxis().getY(),
            0.0001f);
        assertEquals(translation.getZ(), transform.getTranslationAxis().getZ(),
            0.0001f);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     */

    @Test(expected = IllegalArgumentException.class)
    public void testTranslationAxisWithNull()
    {
        new SkewTransform().setTranslationAxis(null);
    }
View Full Code Here

Examples of de.ailis.jollada.model.SkewTransform

     *            The element attributes.
     */

    private void enterSkew(final Attributes attributes)
    {
        final SkewTransform transform = new SkewTransform();
        transform.setSid(attributes.getValue("sid"));

        final MutableVector3d rotationAxis = transform.getRotationAxis();
        final MutableVector3d translationAxis = transform.getTranslationAxis();
        this.chunkFloatReader = new ChunkFloatReader()
        {
            private int index = 0;

            @Override
            protected void valueFound(final double value)
            {
                switch (this.index)
                {
                    case 0:
                        transform.setAngle(value);
                        break;

                    case 1:
                        rotationAxis.setX(value);
                        break;
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.