Examples of generateNormals()


Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

        tr.triangulate(gi);
        Debug.message("3detail", "OMGraphicUtil: end triangulation");
        gi.recomputeIndices();

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        gi.recomputeIndices();

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

    nioCoords.position(0);
    nioCoords.get(coords);
    gi.setCoordinates(coords);
        // generate normals
        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        Vector3f[] n3f = gi.getNormals();
        int[] ni = gi.getNormalIndices();
        float[] tmp = new float[3];
    for (int i=0; i<ni.length; ++i) {
      n3f[ni[i]].get(tmp);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

        gi.setCoordinates(values);
        int sc[]=new int [1];
        sc[0]=values.length/3;
        gi.setStripCounts(sc);
        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        Stripifier st = new Stripifier();
        st.stripify(gi);
        GeometryArray result = gi.getGeometryArray();
        return result;
    }
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

            } else {
              NormalGenerator normalGenerator = new NormalGenerator(Math.PI / 2);
              if (!group.isSmooth()) {
                normalGenerator.setCreaseAngle(0);
              }
              normalGenerator.generateNormals(geometryInfo);
            }
            geometryArray = geometryInfo.getGeometryArray(true, true, false);
          } else { // Line
            int format = IndexedGeometryArray.COORDINATES;
            if (firstGeometryHasTextureCoordinateIndices) {
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

    // Generate normals
    NormalGenerator normalGenerator = new NormalGenerator();
    if (arcCircleCenter == null) {
      normalGenerator.setCreaseAngle(0);
    }
    normalGenerator.generateNormals(geometryInfo);
    return geometryInfo.getIndexedGeometryArray();
  }

  /**
   * Returns <code>pointAngle</code> plus or minus 2 PI to ensure <code>pointAngle</code> value
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

    // Generate normals
    NormalGenerator normalGenerator = new NormalGenerator();
    if (roundWall) {
      normalGenerator.setCreaseAngle(0);
    }
    normalGenerator.generateNormals(geometryInfo);
    return geometryInfo.getIndexedGeometryArray ();
  }
 
  /**
   * Returns the geometry of the top part of a wall.
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

    // Generate normals
    NormalGenerator normalGenerator = new NormalGenerator();
    if (roundWall) {
      normalGenerator.setCreaseAngle(0);
    }
    normalGenerator.generateNormals(geometryInfo);
    return geometryInfo.getIndexedGeometryArray ();
  }
 
  /**
   * Returns the height at the start of the wall managed by this 3D object.
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

      numPoints += outVerts[i].length;
      GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
      gi.setCoordinates(outVerts[i]);
      gi.setStripCounts(islandCounts[i]);
      gi.setContourCounts(contourCounts);
      ng.generateNormals(gi);

      GeometryArray ga = gi.getGeometryArray(false, false, false);
      vertOffset += ga.getVertexCount();

      triangData.add(ga);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

        gi.setCoordinates(top);
        gi.setStripCounts(new int[] { top.length/3 });
        gi.setContourCounts(new int[] { 1 });

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);

        Stripifier st = new Stripifier();
        st.stripify(gi);
       
        return new Shape3D(gi.getGeometryArray());
View Full Code Here

Examples of com.sun.j3d.utils.geometry.NormalGenerator.generateNormals()

        GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_STRIP_ARRAY);
        gi.setCoordinates(border);
        gi.setStripCounts(new int[] { border.length/3 });

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);

        Stripifier st = new Stripifier();
        st.stripify(gi);
       
        return new Shape3D(gi.getGeometryArray());
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.