Package toxi.geom

Examples of toxi.geom.Vec4D.scaleSelf()


        for (int i = 0; i < nU; i++) {
            for (int j = 0; j < nV; j++) {
                centroid.addSelf(cps[i][j]);
            }
        }
        return centroid.scaleSelf(1f / (nU * nV)).to3D();
    }

    /**
     * Get the ControlPoint at the position u,v
     *
 
View Full Code Here


        for (int k = 1; k <= d; k++) {
            int tmp = degree - k + 1;
            for (int i = 0; i <= (r - k); i++) {
                Vec4D cw = new Vec4D(result[k - 1][i + 1]);
                cw.subSelf(result[k - 1][i]);
                cw.scaleSelf(tmp);
                cw.scaleSelf(1 / (uKnots.get(r1 + i + degree + 1) - uKnots
                        .get(r1 + i + k)));
                result[k][i] = cw;
            }
        }
View Full Code Here

            int tmp = degree - k + 1;
            for (int i = 0; i <= (r - k); i++) {
                Vec4D cw = new Vec4D(result[k - 1][i + 1]);
                cw.subSelf(result[k - 1][i]);
                cw.scaleSelf(tmp);
                cw.scaleSelf(1 / (uKnots.get(r1 + i + degree + 1) - uKnots
                        .get(r1 + i + k)));
                result[k][i] = cw;
            }
        }
        return result;
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.