Examples of scalarMult()


Examples of org.graphstream.ui.geom.Vector2.scalarMult()

        Vector2 perp = new Vector2(theDirection.data[1],
            -theDirection.data[0]);

        perp.normalize();
        theDirection.scalarMult(arrowLength);
        perp.scalarMult(arrowWidth);

        // Create a polygon.

        shape.reset();
        shape.moveTo(x, y);
View Full Code Here

Examples of org.graphstream.ui.geom.Vector2.scalarMult()

            Vector2 perp = CubicCurve.perpendicular(p0, p1, p2, p3,
                sprite.getX());
            double y = metrics.lengthToGu(sprite.getY(), sprite.getUnits());

            perp.normalize();
            perp.scalarMult(y);

            pos.x = CubicCurve.eval(p0.x, p1.x, p2.x, p3.x, sprite.getX())
                - perp.data[0];
            pos.y = CubicCurve.eval(p0.y, p1.y, p2.y, p3.y, sprite.getX())
                - perp.data[1];
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.