java.lang.Object
org.scilab.forge.scirenderer.tranformations.Vector3d

public class Vector3d extends Object
Author:
Pierre Lando
  • Constructor Details

    • Vector3d

      public Vector3d(Vector3d v)
    • Vector3d

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

      public Vector3d(float[] position)
    • Vector3d

      public Vector3d(double[] position)
    • Vector3d

      public Vector3d(Double[] position)
  • Method Details

    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • toString

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

      public double[] getData()
    • getDataAsFloatArray

      public float[] getDataAsFloatArray()
    • getDataAsFloatArray

      public float[] getDataAsFloatArray(int size)
    • plus

      public Vector3d plus(Vector3d v)
    • minus

      public Vector3d minus(Vector3d v)
    • times

      public Vector3d times(double d)
    • getNormalized

      public Vector3d getNormalized()
    • getNorm

      public double getNorm()
    • getNorm2

      public double getNorm2()
    • scalar

      public double scalar(Vector3d v)
    • product

      public static Vector3d product(Vector3d v1, Vector3d v2)
      Create a new vector cross-product of the given vectors.
      Parameters:
      v1 - the first given vector.
      v2 - the second given vector.
      Returns:
      a new vector cross-product of the given vectors.
    • det

      public static final double det(Vector3d v0, Vector3d v1, Vector3d v2)
    • getBarycenter

      public static final Vector3d getBarycenter(Vector3d v0, Vector3d v1, double w0, double w1)
    • setX

      public Vector3d setX(double x)
      Create a new vector, copy of this one, with a new X value.
      Parameters:
      x - the new X value.
      Returns:
      a new vector, copy of this one, with a new X value.
    • setY

      public Vector3d setY(double y)
      Create a new vector, copy of this one, with a new Y value.
      Parameters:
      y - the new Y value.
      Returns:
      a new vector, copy of this one, with a new Y value.
    • setZ

      public Vector3d setZ(double z)
      Create a new vector, copy of this one, with a new Z value.
      Parameters:
      z - the new Z value.
      Returns:
      a new vector, copy of this one, with a new Z value.
    • isZero

      public boolean isZero()
      Return true if this vector is (0, 0, 0).
      Returns:
      true if this vector is (0, 0, 0).
    • isNearZero

      public boolean isNearZero()
      Return true if this vector is (0, 0, 0).
      Returns:
      true if this vector is (0, 0, 0).
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object