Package javax.vecmath

Examples of javax.vecmath.TexCoord2f


        final int numberOfPoints = coordinates.size();
        final QuadArray plane = new QuadArray(numberOfPoints,
                GeometryArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2
                        | GeometryArray.NORMALS);
        plane.setCoordinates(0, coordinates.toArray(new Point3f[] {}));
        final TexCoord2f[] corners = { new TexCoord2f(0f, 0f),
                new TexCoord2f(1f, 0f), new TexCoord2f(1f, 1f),
                new TexCoord2f(0f, 1f) };
        final TexCoord2f[] textureCoordinates = new TexCoord2f[numberOfPoints];
        for (int i = 0; i < numberOfPoints; ++i) {
            textureCoordinates[i] = new TexCoord2f(corners[i % 4]);
        }
        plane.setTextureCoordinates(0, 0, textureCoordinates);
        for (int i = 0; i < numberOfPoints; ++i) {
            plane.setNormal(i, normal);
        }
View Full Code Here

TOP

Related Classes of javax.vecmath.TexCoord2f

Copyright © 2018 www.massapicom. 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.