de.enough.polish.graphics3d.linalg
Class Vec4Df
java.lang.Object
de.enough.polish.graphics3d.linalg.Vec4Df
public class Vec4Df
- extends Object
A 4 dimensional Vector implementation. Class using floating point precision.
- Author:
- Anders Bo Pedersen, anders@wicore.dk
|
Field Summary |
float |
wf
|
float |
xf
|
float |
yf
|
float |
zf
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xf
public volatile float xf
yf
public volatile float yf
zf
public volatile float zf
wf
public volatile float wf
Vec4Df
public Vec4Df()
Vec4Df
public Vec4Df(float xf,
float yf,
float zf,
float wf)
Vec4Df
public Vec4Df(Vec4Df other)
add
public void add(Vec4Df other)
sub
public void sub(Vec4Df other)
invert
public void invert()
scale
public void scale(float factorx)
scaleNew
public Vec4Df scaleNew(float factorx)
dot
public float dot(Vec4Df other)
equals
public boolean equals(Vec4Df other)
length
public float length()
- Euclidean length of vector
- Returns:
- the length
normalize
public void normalize()
- Normalize the vector to unit length
project
public Vec3Df project()
- Projects 4D vector
propertiesToString
public String propertiesToString()