Class Vector3D_F64

All Implemented Interfaces:
Serializable

public class Vector3D_F64 extends GeoTuple3D_F64<Vector3D_F64>
Spacial vector in 3D. A vector defines a direction.
See Also:
  • Constructor Details

    • Vector3D_F64

      public Vector3D_F64(GeoTuple3D_F64 orig)
    • Vector3D_F64

      public Vector3D_F64(double x, double y, double z)
    • Vector3D_F64

      public Vector3D_F64()
    • Vector3D_F64

      public Vector3D_F64(Point3D_F64 a, Point3D_F64 b)
      Defines the vector using two points. v = b - a;
      Parameters:
      a - (Input) Point
      b - (Input) Point
  • Method Details

    • setTo

      public Vector3D_F64 setTo(Vector3D_F64 src)
      Description copied from class: GeoTuple
      Sets this equal to 'src'
      Overrides:
      setTo in class GeoTuple3D_F64<Vector3D_F64>
      Parameters:
      src - The tuple being copied
      Returns:
      Reference to 'this' class instance. Used to chain operations.
    • minus

      public void minus(Point3D_F64 a, Point3D_F64 b)
      In-place minus operation. this = a - b.
      Parameters:
      a - Point
      b - Point
    • divide

      public void divide(double value)
      In-place divide operation. x /= value;
      Parameters:
      value - The value each component is divided by
    • crossSetTo

      public void crossSetTo(Vector3D_F64 a, Vector3D_F64 b)
      Assigns this vector to the results of crossing the two passed in vectors.
      Parameters:
      a - Vector
      b - Vector
    • crossWith

      public Vector3D_F64 crossWith(Vector3D_F64 b)
      Crosses this matrix with 'b' and returns the result
    • createNewInstance

      public Vector3D_F64 createNewInstance()
      Description copied from class: GeoTuple

      Creates a new tuple instance of the same type.

      Specified by:
      createNewInstance in class GeoTuple<Vector3D_F64>
      Returns:
      new tuple instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • normalize

      public void normalize()
    • dot

      public double dot(Vector3D_F64 a)
      Dot product between this and 'a' = this.x * a.x + this.y * a.y + this.z * a.z
      Parameters:
      a - A vector
      Returns:
      dot product.
    • dot

      public double dot(double x, double y, double z)
    • acute

      public double acute(Vector3D_F64 a)
      Returns the acute angle between the two vectors. Computed using the dot product.
      Parameters:
      a - Vector
      Returns:
      Acute angle in radians between 'this' and 'a'.