glcanvas.data
Class Vec3

java.lang.Object
  extended by glcanvas.data.Vec3
Direct Known Subclasses:
Vec4

public class Vec3
extends java.lang.Object


Constructor Summary
Vec3()
           
Vec3(float x, float y, float z)
           
Vec3(Vec3 vec)
           
 
Method Summary
 void add(Vec3 vec)
           
static Vec3 addVec3(Vec3 vec1, Vec3 vec2)
           
 float distance(Vec3 vec)
           
 float get(int i)
           
 float getX()
           
 float getY()
           
 float getZ()
           
 float length()
           
 Vec3 minus(Vec3 pos2)
           
 void multiply(float num)
           
static Vec3 multiply(Vec3 vec, float num)
           
 void norm()
           
 Vec3 normalize()
           
 void setX(float x)
           
 void setY(float y)
           
 void setZ(float z)
           
 float sqLength()
           
 void subtract(Vec3 vec)
           
 void subtract(Vec3 vec1, Vec3 vec2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vec3

public Vec3()

Vec3

public Vec3(float x,
            float y,
            float z)

Vec3

public Vec3(Vec3 vec)
Method Detail

add

public void add(Vec3 vec)

addVec3

public static Vec3 addVec3(Vec3 vec1,
                           Vec3 vec2)

distance

public float distance(Vec3 vec)

get

public float get(int i)

getX

public float getX()

getY

public float getY()

getZ

public float getZ()

length

public float length()

minus

public Vec3 minus(Vec3 pos2)

multiply

public void multiply(float num)

multiply

public static Vec3 multiply(Vec3 vec,
                            float num)

norm

public void norm()

normalize

public Vec3 normalize()

setX

public void setX(float x)

setY

public void setY(float y)

setZ

public void setZ(float z)

sqLength

public float sqLength()

subtract

public void subtract(Vec3 vec)

subtract

public void subtract(Vec3 vec1,
                     Vec3 vec2)