Package org.mt4j.components.visibleComponents.shapes

Examples of org.mt4j.components.visibleComponents.shapes.MTRectangle.translate()


        assertEquals(centerGlobalR1, expectedUntransformedCenter);


        //Check with Transformed local matrix but not added to a parent
        Vector3D transVect = new Vector3D(10,10,10);
        rect1.translate(transVect, TransformSpace.LOCAL);

        //Local center should not change
        Vector3D centerLocal2 = rect1.getCenterPointLocal();
        assertEquals(centerLocal2, expectedUntransformedCenter);
View Full Code Here


        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect2);
        rect3.sendToFront();
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect3);
       
        //Test when translated Z
        rect3.translate(new Vector3D(0,0,-0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect2);
        rect3.translate(new Vector3D(0,0, 0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect3);
        rect1.translate(new Vector3D(0,0, 0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect1);
View Full Code Here

        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect3);
       
        //Test when translated Z
        rect3.translate(new Vector3D(0,0,-0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect2);
        rect3.translate(new Vector3D(0,0, 0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect3);
        rect1.translate(new Vector3D(0,0, 0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect1);
        rect1.translate(new Vector3D(0,0, -0.5f));
        assertEquals(getCanvas().pick(50, 50).getNearestPickResult(), rect3);
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.