Class SmoothingGroups

java.lang.Object
eu.mihosoft.vrl.v3d.ext.openjfx.importers.SmoothingGroups

public class SmoothingGroups extends Object
Util for converting Normals to Smoothing Groups
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    SmoothingGroups(int[][] faces, int[][] faceNormals, float[] normals)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static int[]
    calcSmoothGroups(int[][] faces, int[][] faceNormals, float[] normals)
    Calculates smoothing groups for data formatted in PolygonMesh style
    static int[]
    calcSmoothGroups(javafx.scene.shape.TriangleMesh mesh, int[] flatFaces, int[] flatFaceNormals, float[] normals)
    Calculates smoothing groups for data formatted in TriangleMesh style

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • SmoothingGroups Link icon

      public SmoothingGroups(int[][] faces, int[][] faceNormals, float[] normals)
  • Method Details Link icon

    • calcSmoothGroups Link icon

      public static int[] calcSmoothGroups(int[][] faces, int[][] faceNormals, float[] normals)
      Calculates smoothing groups for data formatted in PolygonMesh style
      Parameters:
      faces - An array of faces, where each face consists of an array of vertex and uv indices
      faceNormals - An array of face normals, where each face normal consists of an array of normal indices
      normals - The array of normals
      Returns:
      An array of smooth groups, where the length of the array is the number of faces
    • calcSmoothGroups Link icon

      public static int[] calcSmoothGroups(javafx.scene.shape.TriangleMesh mesh, int[] flatFaces, int[] flatFaceNormals, float[] normals)
      Calculates smoothing groups for data formatted in TriangleMesh style
      Parameters:
      flatFaces - An array of faces, where each triangle face is represented by 6 (vertex and uv) indices
      flatFaceNormals - An array of face normals, where each triangle face is represented by 3 normal indices
      normals - The array of normals
      Returns:
      An array of smooth groups, where the length of the array is the number of faces