Package aspect.render

Examples of aspect.render.Mesh


            vpos += nv;
            tpos += nt;
            npos += nn;
        }
       
        addBehavior(new Mesh(QUADS, vertices, normals, texCoords, m));
    }
View Full Code Here


                float[] n2 = faceNormals(v3, v4, v1);
                System.arraycopy(n2, 0, normals, index + 9, 9);
            }
        }

        return new Mesh(GeometryType.TRIANGLES, vertices, normals, texcoords, m);
    }
View Full Code Here

        i = 0;
        for (float f : lineVerts) {
            lines[i++] = f;
        }

        Mesh triangleVBO = new Mesh(TRIANGLES, triangles, new float[triangles.length / 3]);
        Mesh lineVBO = new Mesh(LINES, lines, new float[lines.length / 3]);

        return new LineModel(triangleVBO, lineVBO);
    }
View Full Code Here

                normals[i * 3 + 2] = v.normal.z;

                i++;
            }

            polygons.add(new Mesh(TRIANGLES, positions, normals, texcoords, m));
        }

        return new MultiModel(polygons);
    }
View Full Code Here

    }

    public static ViewModel rect(Material texture, float hRepeat, float vRepeat, float width, float height) {
        float[] vertices = rectVertices(width, height);
        float[] texCoords = rectTexCoords(hRepeat, vRepeat);
        return new Mesh(QUADS, vertices, copyVector3(Vector3.zAxis(), 4), texCoords, texture);
    }
View Full Code Here

    }

    public static ViewModel ellipse(Material texture, float width, float height, int npoints) {
        float[] vertices = ellipseVertices(width, height, npoints);
        float[] texCoords = ellipseTexCoords(npoints);
        return new Mesh(POLYGON, vertices, copyVector3(Vector3.zAxis(), npoints), texCoords, texture);
    }
View Full Code Here

    public static int pipeNormals(int lod, float[] dest, int start) {
        return pipeVertices(1.0f, 0.0f, lod, dest, start);
    }

    public static ViewModel pipe(Material sides, float hRepeat, float vRepeat, float radius, float length, int lod) {
        return new Mesh(QUADS, pipeVertices(radius, length, lod), pipeNormals(lod), pipeTexCoords(hRepeat, vRepeat, lod), sides);
    }
View Full Code Here

    public static float[] sphereNormals(int lod) {
        return sphereVertices(1.0f, lod);
    }
   
    public static ViewModel sphere(float radius, int lod, Material mtl) {
        return new Mesh(QUADS, sphereVertices(radius, lod), sphereNormals(lod), sphereTexCoords(lod), mtl);
    }
View Full Code Here

    }

    public static ViewModel box(Material texture, float xRepeat, float yRepeat, float zRepeat, float width, float height, float depth) {
        float[] vertices = boxVertices(width, height, depth);
        float[] texCoords = boxTexCoords(xRepeat, yRepeat, zRepeat);
        return new Mesh(QUADS, vertices, boxNormals(), texCoords, texture);
    }
View Full Code Here

    }

    public static ViewModel polygon(Material texture, float hRepeat, float vRepeat, Vector3... points) {
        float[] vertices = polygonVertices(points);
        float[] texCoords = polygonTexCoords(hRepeat, vRepeat, points);
        return new Mesh(POLYGON, vertices, copyVector3(Vector3.zAxis(), points.length), texCoords, texture);
    }
View Full Code Here

TOP

Related Classes of aspect.render.Mesh

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.