Class Vector3D_F32

All Implemented Interfaces:
Serializable

@Generated("georegression.struct.point.Vector3D_F64") public class Vector3D_F32 extends GeoTuple3D_F32<Vector3D_F32>
Spacial vector in 3D. A vector defines a direction.
See Also:
  • Constructor Details

    • Vector3D_F32

      public Vector3D_F32(GeoTuple3D_F32 orig)
    • Vector3D_F32

      public Vector3D_F32(float x, float y, float z)
    • Vector3D_F32

      public Vector3D_F32()
    • Vector3D_F32

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

    • setTo

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

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

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

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

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

      public Vector3D_F32 createNewInstance()
      Description copied from class: GeoTuple

      Creates a new tuple instance of the same type.

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

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

      public void normalize()
    • dot

      public float dot(Vector3D_F32 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 float dot(float x, float y, float z)
    • acute

      public float acute(Vector3D_F32 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'.