opengl.geometry
Class Vec2

java.lang.Object
  extended by opengl.geometry.Vec2

public class Vec2
extends java.lang.Object


Constructor Summary
Vec2()
           
Vec2(int[] coords)
           
Vec2(int[] coords, java.awt.Color col)
           
Vec2(int x, int y)
           
Vec2(int x, int y, java.awt.Color col)
           
Vec2(Vec2 vec)
           
 
Method Summary
 Vec2 add(Vec2 vec)
           
 float distance(Vec2 vec)
           
 java.awt.Color getColor()
           
 int getX()
           
 int getY()
           
 float length()
           
 void printStd()
           
 void setColor(java.awt.Color col)
           
 void setX(int x)
           
 void setY(int y)
           
 float sqLength()
           
 int[] toArray()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vec2

public Vec2()

Vec2

public Vec2(int[] coords)

Vec2

public Vec2(int[] coords,
            java.awt.Color col)

Vec2

public Vec2(int x,
            int y)

Vec2

public Vec2(int x,
            int y,
            java.awt.Color col)

Vec2

public Vec2(Vec2 vec)
Method Detail

setX

public void setX(int x)

setY

public void setY(int y)

setColor

public void setColor(java.awt.Color col)

getX

public int getX()

getY

public int getY()

getColor

public java.awt.Color getColor()

add

public Vec2 add(Vec2 vec)

printStd

public void printStd()

sqLength

public float sqLength()

length

public float length()

distance

public float distance(Vec2 vec)

toArray

public int[] toArray()