Package nu3a.geometry

Examples of nu3a.geometry.N3VertexData


   *
   * @param render
   *            Render en el que realizar el dibujado de la caja.
   */
  public void draw(N3Render render) {
    N3VertexData v = new N3VertexData();
    N3ColorData c = new N3ColorData();
    c.addColor(new N3ColorRGBA(1.0f, 1.0f, 1.0f));

    v1.x = minX;
    v1.y = maxY;
    v1.z = maxZ;

    v2.x = minX;
    v2.y = minY;
    v2.z = maxZ;

    v3.x = maxX;
    v3.y = minY;
    v3.z = maxZ;

    v4.x = maxX;
    v4.y = maxY;
    v4.z = maxZ;

    v5.x = minX;
    v5.y = maxY;
    v5.z = minZ;

    v6.x = minX;
    v6.y = minY;
    v6.z = minZ;

    v7.x = maxX;
    v7.y = minY;
    v7.z = minZ;

    v8.x = maxX;
    v8.y = maxY;
    v8.z = minZ;

    v.addVertex(v1);
    v.addVertex(v2);
    v.addVertex(v2);
    v.addVertex(v3);
    v.addVertex(v3);
    v.addVertex(v4);
    v.addVertex(v4);
    v.addVertex(v1);

    v.addVertex(v5);
    v.addVertex(v6);
    v.addVertex(v6);
    v.addVertex(v7);
    v.addVertex(v7);
    v.addVertex(v8);
    v.addVertex(v8);
    v.addVertex(v5);

    v.addVertex(v1);
    v.addVertex(v5);
    v.addVertex(v2);
    v.addVertex(v6);

    v.addVertex(v4);
    v.addVertex(v8);
    v.addVertex(v3);
    v.addVertex(v7);

    render.drawData(v, render.N3_LINES_DATA, c);
  }
View Full Code Here


  protected N3VisualObject(N3Scene scene, N3GeometryData g, String name)
      throws N3NameException {
    super(scene, name);
    geometry = g;
    colorData = new N3ColorData();
    vertexData = new N3VertexData();
    normalData = new N3NormalData();
    texCoordData = new N3TexCoordData();
    disabledLights = new Vector(0, 1);
    geometry.addGeometryListener(this);
    scene.addVisualObject(this);
View Full Code Here

TOP

Related Classes of nu3a.geometry.N3VertexData

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.