Package javaforce.gl
Class Vector4
java.lang.Object
javaforce.gl.Vector4
Stores one vector (x,y,z) with optional w component (default = 1.0f).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
v
public float[] v
-
-
Constructor Details
-
Vector4
public Vector4() -
Vector4
public Vector4(float x, float y, float z) -
Vector4
public Vector4(float x, float y, float z, float w)
-
-
Method Details
-
set
public void set(float x, float y, float z) -
set
public void set(float x, float y, float z, float w) -
sub
this = a - b -
cross
this = a X b -
normalize
public void normalize()normalize this vector -
length
public float length() -
lengthSquared
public float lengthSquared() -
scale
public void scale(float s) -
divide
public void divide(float d) -
dot
-
length
-
toString
-