Class Normal

java.lang.Object
org.jzy3d.maths.Normal

public class Normal extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Indicates how the normal of a vertex is computed SHARED: as a mean of all polygons that the vertex belongs to.
    static enum 
    Indicate if normals are defined per point or per geometry.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Coord3d
    compute(List<Point> points, boolean normalize, boolean averageNormals)
    Compute the normal for the input list of points.
    static Coord3d
    Compute the normal for the three points which is a vector perpendicular to the plane formed by the three input points.
    static Coord3d
    compute(Coord3d p0, Coord3d p1, Coord3d p2, boolean normalize)
    Compute the normal for the three points which is a vector perpendicular to the plane formed by the three input points.

    Methods inherited from class java.lang.Object

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

    • Normal

      public Normal()
  • Method Details

    • compute

      public static Coord3d compute(Coord3d p0, Coord3d p1, Coord3d p2)
      Compute the normal for the three points which is a vector perpendicular to the plane formed by the three input points.
    • compute

      public static Coord3d compute(Coord3d p0, Coord3d p1, Coord3d p2, boolean normalize)
      Compute the normal for the three points which is a vector perpendicular to the plane formed by the three input points.
      Parameters:
      normalize - if true, will divise normal components by the length of the normal
    • compute

      public static Coord3d compute(List<Point> points, boolean normalize, boolean averageNormals)
      Compute the normal for the input list of points.
      Parameters:
      points -
      normalize - if true, will divise normal components by the length of the normal
      averageNormals - if true and if points.size() > 3, will compute a normal for each triangle and then process an average normal of all triangles. If false, simply process normal out of the three first points, hence assuming coplanarity of the points.
      Returns: