Examples of TexCoord2f


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

Examples of org.openmali.vecmath2.TexCoord2f

               
                coords[coordIndex++] = new Point3f(x * cSizeX,   (y+d) * cSizeY,   getZ(x, y+d));
                coords[coordIndex++] = new Point3f((x+d) * cSizeX, y * cSizeY,   getZ(x+d, y));
                coords[coordIndex++] = new Point3f((x+d) * cSizeX,(y+d) * cSizeY,   getZ(x+d, y+d));
               
                texCoords[texIndex++] = new TexCoord2f((x / sizeX    ) * repeatCount, (y / sizeY) * repeatCount);
                texCoords[texIndex++] = new TexCoord2f((x / sizeX + d) * repeatCount, (y / sizeY) * repeatCount);
                texCoords[texIndex++] = new TexCoord2f((x / sizeX    ) * repeatCount, (y / sizeY + d) * repeatCount);
               
                texCoords[texIndex++] = new TexCoord2f((x / sizeX    ) * repeatCount, (y / sizeY + d) * repeatCount);
                texCoords[texIndex++] = new TexCoord2f((x / sizeX + d) * repeatCount, (y / sizeY) * repeatCount);
                texCoords[texIndex++] = new TexCoord2f((x / sizeX + d) * repeatCount, (y / sizeY + d) * repeatCount);
               
            }
           
        }
       
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.