Class Vector4
java.lang.Object
graphic.Vector4
Homogeneous 3D coordinates vector for 3D computations.
- Author:
- Andrea Zoppi
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclone()static Vector4createAxis3D(float x, float y, float z) static Vector4createPoint3D(float x, float y, float z) voiddiv(float scalar) voiddivSelf(float scalar) floatfloatget(int i) floatlength()mult(float scalar) voidmultSelf(float scalar) voidreverse()voidvoidset(float[] a) voidset(float x, float y, float z, float w) voidset(int i, float value) voidfloatvoidfloat[]toArray()toString()unit()floatw()voidw(float value) floatx()voidx(float value) floaty()voidy(float value) floatz()voidz(float value)
-
Field Details
-
v
protected float[] v -
ORIGIN
-
X_AXIS
-
Y_AXIS
-
Z_AXIS
-
X_AXIS_REV
-
Y_AXIS_REV
-
Z_AXIS_REV
-
X_INDEX
public static final int X_INDEX- See Also:
-
Y_INDEX
public static final int Y_INDEX- See Also:
-
Z_INDEX
public static final int Z_INDEX- See Also:
-
-
Constructor Details
-
Vector4
public Vector4() -
Vector4
-
Vector4
public Vector4(float[] a) -
Vector4
public Vector4(float x, float y, float z, float w) -
Vector4
public Vector4(float xyzValue)
-
-
Method Details
-
x
public float x() -
y
public float y() -
z
public float z() -
w
public float w() -
x
public void x(float value) -
y
public void y(float value) -
z
public void z(float value) -
w
public void w(float value) -
get
public float get(int i) -
set
public void set(float x, float y, float z, float w) -
set
public void set(int i, float value) -
set
-
set
public void set(float[] a) -
length
public float length() -
squaredLength
public float squaredLength() -
normalize
public void normalize() -
unit
-
reverse
-
reverseSelf
public void reverseSelf() -
add
-
addSelf
-
sub
-
subSelf
-
dot
-
cross
-
crossSelf
-
mult
-
mult
-
multSelf
public void multSelf(float scalar) -
div
-
divSelf
public void divSelf(float scalar) -
toArray
public float[] toArray() -
clone
-
toString
-
toString3D
-
createPoint3D
-
createAxis3D
-