Examples of Axis


Examples of tgfx.system.Axis

            tgfx.Main.postConsoleMessage("[!]TinyG is Not Connected...\n");
        }
    }

    public static void _updateGuiAxisSettings(String axname) {
        Axis ax = TinygDriver.getInstance().machine.getAxisByName(axname);
        _updateGuiAxisSettings(ax);
    }
View Full Code Here

Examples of toxi.geom.Vec3D.Axis

     */
    public Origin3D(Vec3D o, Vec3D dir) {
        this.origin = o;
        this.zAxis = dir.getNormalized();
        Vec3D av = null;
        Axis a = zAxis.getClosestAxis();
        if (a == Vec3D.Axis.X) {
            av = Vec3D.Axis.Z.getVector().getInverted();
        } else if (a == Vec3D.Axis.Y) {
            av = Vec3D.Axis.Z.getVector().getInverted();
        } else if (a == Vec3D.Axis.Z) {
View Full Code Here

Examples of tripleplay.ui.util.Scale9.Axis

public class Scale9Test
{
    static float DELTA = (float)1e-7;

    @Test public void testAxis () {
        Axis axis = checkCoords(new Axis(1));
        assertEquals(1f/3, axis.size(0), DELTA);
        assertEquals(1-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);
    }
View Full Code Here

Examples of tripleplay.ui.util.Scale9.Axis

        assertEquals(1-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);
    }

    @Test public void testAxisResize () {
        Axis axis1 = checkCoords(new Axis(1).resize(0, .25f).resize(2, .25f));
        Axis axis2 = checkCoords(new Axis(1).resize(1, .5f));
        for (Axis axis : new Axis[] {axis1, axis2}) {
            assertEquals(.25f, axis.size(0), DELTA);
            assertEquals(.5f, axis.size(1), DELTA);
            assertEquals(.25f, axis.size(2), DELTA);
        }
View Full Code Here

Examples of tripleplay.ui.util.Scale9.Axis

            assertEquals(.25f, axis.size(2), DELTA);
        }
    }

    @Test public void testAxisDest () {
        Axis axis = checkCoords(new Axis(1, new Axis(1)));
        assertEquals(1f/3, axis.size(0), DELTA);
        assertEquals(1-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);

        axis = checkCoords(new Axis(2, new Axis(1)));
        assertEquals(1f/3, axis.size(0), DELTA);
        assertEquals(2-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);

        axis = checkCoords(new Axis(.5f, new Axis(1)));
        assertEquals(1f/3, axis.size(0), DELTA);
        assertEquals(.5-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);
    }
View Full Code Here

Examples of tripleplay.ui.util.Scale9.Axis

        assertEquals(.5-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);
    }

    @Test public void testAxisClamp () {
        Axis axis = checkCoords(Scale9.clamp(new Axis(1), 1));
        assertEquals(1f/3, axis.size(0), DELTA);
        assertEquals(1-2f/3, axis.size(1), DELTA);
        assertEquals(1f/3, axis.size(2), DELTA);

        axis = checkCoords(Scale9.clamp(new Axis(2).resize(1, 1.5f), 1));
        assertEquals(.25f, axis.size(0), DELTA);
        assertEquals(.5f, axis.size(1), DELTA);
        assertEquals(.25f, axis.size(2), DELTA);

        axis = checkCoords(Scale9.clamp(new Axis(1), .5f));
        assertEquals(.25f, axis.size(0), DELTA);
        assertEquals(0, axis.size(1), DELTA);
        assertEquals(.25f, axis.size(2), DELTA);
    }
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.