edu.jhu.ece.iacl.jist.structures.vector
Class Vector3

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.vector.Vector3
All Implemented Interfaces:
VectorX, java.lang.Cloneable

public class Vector3
extends java.lang.Object
implements VectorX

The Class Vector3.


Constructor Summary
Vector3()
          Instantiates a new vector3.
Vector3(java.lang.Number[] m)
          Instantiates a new vector3.
Vector3(java.lang.Number x, java.lang.Number y, java.lang.Number z)
          Instantiates a new vector3.
 
Method Summary
 Vector3 add(double a)
          Adds the.
 Vector3 add(VectorX v)
          Adds the.
 Vector3 clone()
          Clone.
 Vector3 div(double a)
          Div.
 Vector3 div(VectorX v)
          Div.
 java.lang.Number get(int i)
          Gets the.
 java.lang.Number getW()
          Gets the w.
 java.lang.Number getX()
          Gets the x.
 java.lang.Number getY()
          Gets the y.
 java.lang.Number getZ()
          Gets the z.
 java.lang.Number mag()
          Mag.
 Vector3 mul(double a)
          Mul.
 Vector3 mul(VectorX v)
          Mul.
 Vector3 normalize()
          Normalize.
static Vector3 round(Vector3 v, int prec)
          Round.
 void set(java.lang.Number value, int i)
          Sets the.
 void set(Vector3 v)
          Sets the.
 void setW(java.lang.Number z)
          Sets the w.
 void setX(java.lang.Number x)
          Sets the x.
 void setY(java.lang.Number y)
          Sets the y.
 void setZ(java.lang.Number z)
          Sets the z.
 int size()
          Size.
 Vector3 sub(double a)
          Sub.
 Vector3 sub(VectorX v)
          Sub.
 java.lang.Number[] toArray()
          To array.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector3

public Vector3(java.lang.Number[] m)
Instantiates a new vector3.

Parameters:
m - the m

Vector3

public Vector3(java.lang.Number x,
               java.lang.Number y,
               java.lang.Number z)
Instantiates a new vector3.

Parameters:
x - the x
y - the y
z - the z

Vector3

public Vector3()
Instantiates a new vector3.

Method Detail

size

public int size()
Description copied from interface: VectorX
Size.

Specified by:
size in interface VectorX
Returns:
the int

round

public static Vector3 round(Vector3 v,
                            int prec)
Round.

Parameters:
v - the v
prec - the prec
Returns:
the vector3

get

public java.lang.Number get(int i)
Description copied from interface: VectorX
Gets the.

Specified by:
get in interface VectorX
Parameters:
i - the i
Returns:
the number

getX

public java.lang.Number getX()
Description copied from interface: VectorX
Gets the x.

Specified by:
getX in interface VectorX
Returns:
the x

getY

public java.lang.Number getY()
Description copied from interface: VectorX
Gets the y.

Specified by:
getY in interface VectorX
Returns:
the y

getZ

public java.lang.Number getZ()
Description copied from interface: VectorX
Gets the z.

Specified by:
getZ in interface VectorX
Returns:
the z

setX

public void setX(java.lang.Number x)
Description copied from interface: VectorX
Sets the x.

Specified by:
setX in interface VectorX
Parameters:
x - the new x

setY

public void setY(java.lang.Number y)
Description copied from interface: VectorX
Sets the y.

Specified by:
setY in interface VectorX
Parameters:
y - the new y

setZ

public void setZ(java.lang.Number z)
Description copied from interface: VectorX
Sets the z.

Specified by:
setZ in interface VectorX
Parameters:
z - the new z

setW

public void setW(java.lang.Number z)
Description copied from interface: VectorX
Sets the w.

Specified by:
setW in interface VectorX
Parameters:
z - the new w

toArray

public java.lang.Number[] toArray()
Description copied from interface: VectorX
To array.

Specified by:
toArray in interface VectorX
Returns:
the number[]

add

public Vector3 add(double a)
Description copied from interface: VectorX
Adds the.

Specified by:
add in interface VectorX
Parameters:
a - the a
Returns:
the vector x

sub

public Vector3 sub(double a)
Description copied from interface: VectorX
Sub.

Specified by:
sub in interface VectorX
Parameters:
a - the a
Returns:
the vector x

mul

public Vector3 mul(double a)
Description copied from interface: VectorX
Mul.

Specified by:
mul in interface VectorX
Parameters:
a - the a
Returns:
the vector x

div

public Vector3 div(double a)
Description copied from interface: VectorX
Div.

Specified by:
div in interface VectorX
Parameters:
a - the a
Returns:
the vector x

add

public Vector3 add(VectorX v)
Description copied from interface: VectorX
Adds the.

Specified by:
add in interface VectorX
Parameters:
v - the v
Returns:
the vector x

sub

public Vector3 sub(VectorX v)
Description copied from interface: VectorX
Sub.

Specified by:
sub in interface VectorX
Parameters:
v - the v
Returns:
the vector x

mul

public Vector3 mul(VectorX v)
Description copied from interface: VectorX
Mul.

Specified by:
mul in interface VectorX
Parameters:
v - the v
Returns:
the vector x

div

public Vector3 div(VectorX v)
Description copied from interface: VectorX
Div.

Specified by:
div in interface VectorX
Parameters:
v - the v
Returns:
the vector x

getW

public java.lang.Number getW()
Description copied from interface: VectorX
Gets the w.

Specified by:
getW in interface VectorX
Returns:
the w

set

public void set(Vector3 v)
Sets the.

Parameters:
v - the v

normalize

public Vector3 normalize()
Description copied from interface: VectorX
Normalize.

Specified by:
normalize in interface VectorX
Returns:
the vector x

mag

public java.lang.Number mag()
Description copied from interface: VectorX
Mag.

Specified by:
mag in interface VectorX
Returns:
the number

clone

public Vector3 clone()
Description copied from interface: VectorX
Clone.

Specified by:
clone in interface VectorX
Overrides:
clone in class java.lang.Object
Returns:
the vector x

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

set

public void set(java.lang.Number value,
                int i)
Description copied from interface: VectorX
Sets the.

Specified by:
set in interface VectorX
Parameters:
value - the value
i - the i