Package org.antlr.xjlib.appkit.gview.base

Examples of org.antlr.xjlib.appkit.gview.base.Vector2D.normalize()


        setDirection(mouse.sub(end));
    }

    public void setFlatenessByMouse(Vector2D mouse) {
        Vector2D corde = getEndWithOffset().sub(getStartWithOffset());
        double dot = mouse.sub(getStartWithOffset()).dot(corde.normalize());
        corde.setLength(dot);

        Vector2D z = getStartWithOffset().add(corde);
        Vector2D f = mouse.sub(z);
        double cross = corde.cross(f);
View Full Code Here


            Vector2D v2 = new Vector2D(cubic.ctrlx2, cubic.ctrly2).sub(getStartWithOffset());

            v1 = v1.normalize();
            v1.stretch(startTangentOffset);

            v2 = v2.normalize();
            v2.stretch(endTangentOffset);

            cubic.x1 = getStartWithOffset().getX()+v1.getX();
            cubic.y1 = getStartWithOffset().getY()+v1.getY();
            cubic.x2 = getEndWithOffset().getX()+v2.getX();
View Full Code Here

            Vector2D v2 = controlPoint.sub(getEndWithOffset());

            v1 = v1.normalize();
            v1.stretch(startTangentOffset);

            v2 = v2.normalize();
            v2.stretch(endTangentOffset);

            quad.x1 = getStartWithOffset().getX()+v1.getX();
            quad.y1 = getStartWithOffset().getY()+v1.getY();
            quad.x2 = getEndWithOffset().getX()+v2.getX();
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.