Class Vector3d
java.lang.Object
org.scilab.forge.scirenderer.tranformations.Vector3d
- Author:
- Pierre Lando
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final doublebooleanstatic final Vector3dgetBarycenter(Vector3d v0, Vector3d v1, double w0, double w1) double[]getData()float[]float[]getDataAsFloatArray(int size) doublegetNorm()doublegetNorm2()doublegetX()doublegetY()doublegetZ()inthashCode()booleanReturn true if this vector is (0, 0, 0).booleanisZero()Return true if this vector is (0, 0, 0).static Vector3dCreate a new vector cross-product of the given vectors.doublesetX(double x) Create a new vector, copy of this one, with a new X value.setY(double y) Create a new vector, copy of this one, with a new Y value.setZ(double z) Create a new vector, copy of this one, with a new Z value.times(double d) toString()
-
Constructor Details
-
Vector3d
-
Vector3d
public Vector3d(double x, double y, double z) -
Vector3d
public Vector3d(float[] position) -
Vector3d
public Vector3d(double[] position) -
Vector3d
-
-
Method Details
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
toString
-
getData
public double[] getData() -
getDataAsFloatArray
public float[] getDataAsFloatArray() -
getDataAsFloatArray
public float[] getDataAsFloatArray(int size) -
plus
-
minus
-
times
-
getNormalized
-
getNorm
public double getNorm() -
getNorm2
public double getNorm2() -
scalar
-
product
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
-
getBarycenter
-
setX
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
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
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
-
hashCode
public int hashCode()
-