Class Vector3d

java.lang.Object
inra.ijpb.measure.Vector3d

@Deprecated
public class Vector3d
extends java.lang.Object
Deprecated.
since 1.3.6, replaced by inra.ijpb.geometry.Vector3D
Represents a triplet of coordinates in linear space, and provides some computing methods. The class is immutable.
Author:
dlegland
See Also:
Vector3D
  • Constructor Summary

    Constructors
    Constructor Description
    Vector3d()
    Deprecated.
    Empty constructor, with all coordinates initialized to zero.
    Vector3d​(double x, double y, double z)
    Deprecated.
    Initialization constructor.
  • Method Summary

    Modifier and Type Method Description
    boolean almostEquals​(Vector3d v, double eps)
    Deprecated.
    Checks if this vector is close to the given vector, by checking each coordinate using the given threshold.
    static double angle​(Vector3d v1, Vector3d v2)
    Deprecated.
    Computes the angle between two 3D vectors.
    static Vector3d crossProduct​(Vector3d v1, Vector3d v2)
    Deprecated.
    Computes the cross product of the two vectors.
    static double dotProduct​(Vector3d v1, Vector3d v2)
    Deprecated.
    Computes the dot product of two vectors, defined by:
    double getNorm()
    Deprecated.
    Computes the norm of the vector, given as the square root of the sum of squared coordinates.
    double getX()
    Deprecated.
    Returns the x coordinate of the vector.
    double getY()
    Deprecated.
    Returns the y coordinate of the vector.
    double getZ()
    Deprecated.
    Returns the z coordinate of the vector.
    Vector3d minus​(Vector3d v)
    Deprecated.
    Returns the result of the subtraction of this vector with another vector.
    Vector3d normalize()
    Deprecated.
    Returns a normalized vector with same direction as this vector
    Vector3d plus​(Vector3d v)
    Deprecated.
    Returns the result of the addition of this vector with another vector.
    Vector3d times​(double k)
    Deprecated.
    Returns the result of the multiplication of this vector with a scalar value.

    Methods inherited from class java.lang.Object

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

    • Vector3d

      public Vector3d()
      Deprecated.
      Empty constructor, with all coordinates initialized to zero.
    • Vector3d

      public Vector3d​(double x, double y, double z)
      Deprecated.
      Initialization constructor.
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
  • Method Details

    • crossProduct

      public static final Vector3d crossProduct​(Vector3d v1, Vector3d v2)
      Deprecated.
      Computes the cross product of the two vectors. Cross product is zero for colinear vectors.
      Parameters:
      v1 - the first vector
      v2 - the second vector
      Returns:
      the cross product of the two vectors
    • dotProduct

      public static final double dotProduct​(Vector3d v1, Vector3d v2)
      Deprecated.
      Computes the dot product of two vectors, defined by:

      x1 * x2 + y1 * y2 + z1 * z2

      Dot product is zero if the vectors are orthogonal. It is positive if vectors are in the same direction, and negative if they are in opposite direction.

      Parameters:
      v1 - the first vector
      v2 - the second vector
      Returns:
      the dot product of the two vectors
    • angle

      public static final double angle​(Vector3d v1, Vector3d v2)
      Deprecated.
      Computes the angle between two 3D vectors. The result is given between 0 and PI.
      Parameters:
      v1 - the first vector
      v2 - the second vector
      Returns:
      the angle between the two vectors, in radians
    • getX

      public double getX()
      Deprecated.
      Returns the x coordinate of the vector.
      Returns:
      the x coordinate of the vector
    • getY

      public double getY()
      Deprecated.
      Returns the y coordinate of the vector.
      Returns:
      the y coordinate of the vector
    • getZ

      public double getZ()
      Deprecated.
      Returns the z coordinate of the vector.
      Returns:
      the z coordinate of the vector
    • plus

      public Vector3d plus​(Vector3d v)
      Deprecated.
      Returns the result of the addition of this vector with another vector.
      Parameters:
      v - the vector to add
      Returns:
      the results of the vector addition
    • minus

      public Vector3d minus​(Vector3d v)
      Deprecated.
      Returns the result of the subtraction of this vector with another vector.
      Parameters:
      v - the vector to subtract
      Returns:
      the results of the vector subtraction
    • times

      public Vector3d times​(double k)
      Deprecated.
      Returns the result of the multiplication of this vector with a scalar value.
      Parameters:
      k - the scalar coefficient
      Returns:
      the results of scalar multiplication
    • normalize

      public Vector3d normalize()
      Deprecated.
      Returns a normalized vector with same direction as this vector
      Returns:
      the normalized vector with same direction as this.
    • getNorm

      public double getNorm()
      Deprecated.
      Computes the norm of the vector, given as the square root of the sum of squared coordinates.
      Returns:
      the norm of the vector
    • almostEquals

      public boolean almostEquals​(Vector3d v, double eps)
      Deprecated.
      Checks if this vector is close to the given vector, by checking each coordinate using the given threshold.
      Parameters:
      v - the vector to compare to
      eps - the absolute tolerance for comparing coodinates
      Returns:
      true if vector have same coordinates with respect to tolerance