de.enough.polish.graphics3d.linalg
Class Vec3Dx
java.lang.Object
de.enough.polish.graphics3d.linalg.Vec3Dx
public class Vec3Dx
- extends Object
A 3 dimensional Vector implementation. Class using fixed point precision.
- Author:
- Anders Bo Pedersen, anders@wicore.dk
|
Field Summary |
int |
xx
|
int |
yx
|
int |
zx
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xx
public volatile int xx
yx
public volatile int yx
zx
public volatile int zx
Vec3Dx
public Vec3Dx()
Vec3Dx
public Vec3Dx(int xx,
int yx,
int zx)
Vec3Dx
public Vec3Dx(Vec3Dx other)
add
public void add(Vec3Dx other)
sub
public void sub(Vec3Dx other)
invert
public void invert()
scale
public void scale(int factorx)
scaleNew
public Vec3Dx scaleNew(int factorx)
dot
public int dot(Vec3Dx other)
cross
public Vec3Dx cross(Vec3Dx other)
equals
public boolean equals(Vec3Dx other)
length
public int length()
- Euclidean length of vector
- Returns:
- the length
normalize
public void normalize()
- Normalize the vector to unit length
propertiesToString
public String propertiesToString()