Class Vector3Df


  • public class Vector3Df
    extends java.lang.Object
    A 3D vector \mathbf{v}\in \mathbb{R}^3

    \robabx{i}{j}{\mathbf{v}} = \left[ \begin{array}{c} v_x \\ v_y \\ v_z \end{array} \right]

    Usage example:

    const Vector3Ddouble v1(1.0, 2.0, 3.0); const Vector3Ddouble v2(6.0, 7.0, 8.0); const Vector3Ddouble v3 = cross(v1, v2); const double d = dot(v1, v2); const Vector3Ddouble v4 = v2 - v1;
    • Constructor Detail

      • Vector3Df

        public Vector3Df​(long cPtr,
                         boolean cMemoryOwn)
      • Vector3Df

        public Vector3Df()
        Creates a 3D vector initialized with 0's
      • Vector3Df

        public Vector3Df​(float x,
                         float y,
                         float z)
        Creates a 3D vector
        Parameters:
        x - [in] x
        y - [in] y
        z - [in] z
    • Method Detail

      • getCPtr

        public static long getCPtr​(Vector3Df obj)
      • delete

        public void delete()
      • e

        public EigenVector3f e()
        Returns Eigen vector with the values of *this
      • size

        public long size()
        The dimension of the vector (i.e. 3).
        This method is provided to help support generic algorithms using
        size() and operator[].
      • divide

        public Vector3Df divide​(float s)
        Scalar division.
      • multiply

        public Vector3Df multiply​(float scale)
        Scalar multiplication.
      • negate

        public Vector3Df negate()
        Unary minus.
      • equals

        public boolean equals​(Vector3Df q)
        Compare with b for equality.

        Returns:
        True if a equals b, false otherwise.
      • norm2

        public float norm2()
        Returns the Euclidean norm (2-norm) of the vector
        Returns:
        the norm
      • norm1

        public float norm1()
        Returns the Manhatten norm (1-norm) of the vector
        Returns:
        the norm
      • normInf

        public float normInf()
        Returns the infinte norm ( \inf -norm) of the vector
        Returns:
        the norm
      • zero

        public static Vector3Df zero()
        Get zero vector.
        Returns:
        vector.
      • x

        public static Vector3Df x()
        Get x vector (1,0,0)
        Returns:
        vector.
      • y

        public static Vector3Df y()
        Get y vector (0,1,0)
        Returns:
        vector.
      • z

        public static Vector3Df z()
        Get z vector (0,0,1)
        Returns:
        vector.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • get

        public float get​(long i)
      • set

        public void set​(long i,
                        float d)