Package toxi.geom

Examples of toxi.geom.Vec2D.scale()


            Vec3D[] curr = new Vec3D[resV + 1];
            for (int v = 0; v < resV; v++) {
                Vec3D vert = surf.getControlNet().get(u, v).to3D();
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
View Full Code Here


            Vec3D[] curr = new Vec3D[resV + 1];
            for (int v = 0; v < resV; v++) {
                Vec3D vert = surf.getControlNet().get(u, v).to3D();
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
View Full Code Here

            for (int v = 0; v < resV; v++) {
                Vec3D vert = surf.getControlNet().get(u, v).to3D();
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
View Full Code Here

                Vec3D vert = surf.getControlNet().get(u, v).to3D();
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
            prev = curr;
View Full Code Here

                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
            prev = curr;
        }
View Full Code Here

                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
            prev = curr;
        }
View Full Code Here

                } else {
                    vert = surf.pointOnSurface(u * iresU, v * iresV);
                }
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
View Full Code Here

                } else {
                    vert = surf.pointOnSurface(u * iresU, v * iresV);
                }
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
View Full Code Here

                    vert = surf.pointOnSurface(u * iresU, v * iresV);
                }
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
View Full Code Here

                }
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
            }
            prev = curr;
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.