de.enough.polish.graphics3d.linalg
Class Vec3Dx

java.lang.Object
  extended by 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
           
 
Constructor Summary
Vec3Dx()
           
Vec3Dx(int xx, int yx, int zx)
           
Vec3Dx(Vec3Dx other)
           
 
Method Summary
 void add(Vec3Dx other)
           
 Vec3Dx cross(Vec3Dx other)
           
 int dot(Vec3Dx other)
           
 boolean equals(Vec3Dx other)
           
 void invert()
           
 int length()
          Euclidean length of vector
 void normalize()
          Normalize the vector to unit length
 String propertiesToString()
           
 void scale(int factorx)
           
 Vec3Dx scaleNew(int factorx)
           
 void sub(Vec3Dx other)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xx

public volatile int xx

yx

public volatile int yx

zx

public volatile int zx
Constructor Detail

Vec3Dx

public Vec3Dx()

Vec3Dx

public Vec3Dx(int xx,
              int yx,
              int zx)

Vec3Dx

public Vec3Dx(Vec3Dx other)
Method Detail

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()