Package org.jzy3d.maths
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 class
Normal.NormalMode
Indicates how the normal of a vertex is computed SHARED: as a mean of all polygons that the vertex belongs to.static class
Normal.NormalPer
Indicate if normals are defined per point or per geometry.
-
Constructor Summary
Constructors Constructor Description Normal()
-
Method Summary
All Methods Static Methods Concrete Methods 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(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.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.
-
-
-
Method Detail
-
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 normalaverageNormals
- 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:
-
-