Class SbVec3d

    • Field Summary

      Fields 
      Modifier and Type Field Description
      double[] array  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(SbVec3d v)
      Component-wise vector addition operator.
      SbVec3d cross​(SbVec3d v)
      Returns right-handed cross product of vector and another vector.
      void divide​(double d)
      Component-wise scalar division operator.
      double dot​(SbVec3d v)
      Returns dot (inner) product of vector and another vector.
      boolean equals​(SbVec3d v, double tolerance)
      Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
      boolean equals​(java.lang.Object obj)  
      SbVec3d getClosestAxis()
      Returns principal axis that is closest (based on maximum dot product) to this vector.
      double[] getValue()  
      double getValueAt​(int index)  
      double getX()  
      double getY()  
      double getZ()  
      double length()
      Returns geometric length of vector.
      double lengthSquared()
      Returns square length of vector.
      SbVec3d minus​(SbVec3d v2)
      Component-wise binary vector subtraction operator.
      void multiply​(double d)
      Component-wise scalar multiplication operator.
      void multiply​(SbVec3d v)
      Component-wise vector multiplication operator.
      void negate()
      Negates each component of vector in place.
      double normalize()
      Changes vector to be unit length, returning the length before normalization.
      SbVec3d over​(double d)
      Component-wise binary scalar division operator.
      SbVec3d plus​(SbVec3d v2)
      Component-wise binary vector addition operator.
      SbVec3d setValue​(double[] components)  
      SbVec3d setValue​(double[] components, int startIndex)  
      SbVec3d setValue​(double c0, double c1, double c2)  
      void setValue​(SbVec3d copyFrom)  
      SbVec3d setValue​(SbVec3d barycentic, SbVec3d v0, SbVec3d v1, SbVec3d v2)
      Sets value of vector as the weighted average of 3 other vectors.
      SbVec3d setValue​(SbVec3f vec3f)
      Sets value of vector from a single precision vector.
      void setValueAt​(int index, double value)  
      void setX​(double value)  
      void setY​(double value)  
      void setZ​(double value)  
      void substract​(SbVec3d v)
      Component-wise vector subtraction operator.
      SbVec3d times​(double d)
      Component-wise binary scalar multiplication operator.
      SbVec3d times​(SbVec3d v)
      Component-wise vector multiplication operator.
      static SbVec3d[] toArray​(long nativeArray, long length)  
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • array

        public final double[] array
    • Constructor Detail

      • SbVec3d

        public SbVec3d()
      • SbVec3d

        public SbVec3d​(SbVec3d copyFrom)
      • SbVec3d

        public SbVec3d​(double[] components)
      • SbVec3d

        public SbVec3d​(double c0,
                       double c1,
                       double c2)
    • Method Detail

      • setX

        public void setX​(double value)
      • setValue

        public SbVec3d setValue​(double c0,
                                double c1,
                                double c2)
      • setY

        public void setY​(double value)
      • setZ

        public void setZ​(double value)
      • setValue

        public void setValue​(SbVec3d copyFrom)
      • getValue

        public double[] getValue()
      • setValue

        public SbVec3d setValue​(double[] components)
      • setValueAt

        public void setValueAt​(int index,
                               double value)
      • getValueAt

        public double getValueAt​(int index)
      • getY

        public double getY()
      • getZ

        public double getZ()
      • getX

        public double getX()
      • setValue

        public SbVec3d setValue​(double[] components,
                                int startIndex)
      • plus

        public SbVec3d plus​(SbVec3d v2)
        Component-wise binary vector addition operator.
      • cross

        public SbVec3d cross​(SbVec3d v)
        Returns right-handed cross product of vector and another vector.
      • getClosestAxis

        public SbVec3d getClosestAxis()
        Returns principal axis that is closest (based on maximum dot product) to this vector.
      • equals

        public boolean equals​(SbVec3d v,
                              double tolerance)
        Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toArray

        public static SbVec3d[] toArray​(long nativeArray,
                                        long length)
      • minus

        public SbVec3d minus​(SbVec3d v2)
        Component-wise binary vector subtraction operator.
      • over

        public SbVec3d over​(double d)
        Component-wise binary scalar division operator.
      • negate

        public void negate()
        Negates each component of vector in place.
      • length

        public double length()
        Returns geometric length of vector.
      • lengthSquared

        public double lengthSquared()
        Returns square length of vector. Faster than length().
      • normalize

        public double normalize()
        Changes vector to be unit length, returning the length before normalization.
      • setValue

        public SbVec3d setValue​(SbVec3f vec3f)
        Sets value of vector from a single precision vector.
      • times

        public SbVec3d times​(SbVec3d v)
        Component-wise vector multiplication operator.
      • times

        public SbVec3d times​(double d)
        Component-wise binary scalar multiplication operator.
      • multiply

        public void multiply​(SbVec3d v)
        Component-wise vector multiplication operator.
      • divide

        public void divide​(double d)
        Component-wise scalar division operator.
      • multiply

        public void multiply​(double d)
        Component-wise scalar multiplication operator.
      • add

        public void add​(SbVec3d v)
        Component-wise vector addition operator.
      • substract

        public void substract​(SbVec3d v)
        Component-wise vector subtraction operator.
      • dot

        public double dot​(SbVec3d v)
        Returns dot (inner) product of vector and another vector.