com.orsoncharts.graphics3d

## Class Utils3D

- java.lang.Object
- - com.orsoncharts.graphics3d.Utils3D

-     public class Utils3D
      extends java.lang.Object

  A collection of utility methods for 3D geometry.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `angle(Point3D a, Point3D b)` Returns the angle between the two vectors.
    `static double` | `length(Point3D v)` Returns the length of the vector v.
    `static Point3D` | `normal(Point3D a, Point3D b, Point3D c)` Returns the normal vector for the plane defined by three points.
    `static Point3D` | `normalise(Point3D v)` Returns a new vector that is the normalised form of the specified vector.
    `static double` | `scalarprod(Point3D a, Point3D b)` Returns the scalar product of two vectors.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### length

          public static double length(Point3D v)

      Returns the length of the vector v.
      Parameters:
        `v` - the vector (`null` not permitted).
      Returns:
        The length.

    - #### normalise

          public static Point3D normalise(Point3D v)

      Returns a new vector that is the normalised form of the specified vector.
      Parameters:
        `v` - the vector (`null` not permitted).
      Returns:
        The normalised form of the specified vector.
      Since:
        1.2

    - #### scalarprod

          public static double scalarprod(Point3D a,
                                          Point3D b)

      Returns the scalar product of two vectors.
      Parameters:
        `a` - vector A (`null` not permitted).
        `b` - vector B (`null` not permitted).
      Returns:
        The scalar product.

    - #### normal

          public static Point3D normal(Point3D a,
                                       Point3D b,
                                       Point3D c)

      Returns the normal vector for the plane defined by three points.
      Parameters:
        `a` - point A (`null` not permitted).
        `b` - point B (`null` not permitted).
        `c` - point C (`null` not permitted).
      Returns:
        The normal vector.

    - #### angle

          public static double angle(Point3D a,
                                     Point3D b)

      Returns the angle between the two vectors.
      Parameters:
        `a` - vector A (`null` not permitted).
        `b` - vector B (`null` not permitted).
      Returns:
        The (positive) angle in radians.