com.bramosystems.oss.player.core.client.geom
Class Matrix2D

java.lang.Object
  extended by com.bramosystems.oss.player.core.client.geom.Matrix2D

public class Matrix2D
extends Object

Implements a 3x3 matrix. The matrix is represented as an array of Vectors Vx, Vy, Vz. The matrix notation is shown below:

         [ VxX  VyX  VzX ]
         [ VxY  VyY  VzY ]
         [ VxZ  VyZ  VzZ ]
 

Since:
1.1
Author:
Sikiru Braheem
See Also:
Vector

Constructor Summary
Matrix2D()
          Constructs an identity 3x3 matrix
Matrix2D(Vector vx, Vector vy, Vector vz)
          Constructs a 3x3 matrix using the specified vectors
 
Method Summary
 boolean equals(Object obj)
          Tests the specified object obj for equality with this matrix
 Vector getVx()
          Returns the vector Vx
 Vector getVy()
          Returns the vector Vy
 Vector getVz()
          Returns the vector Vz
 int hashCode()
           
 void setVx(Vector vx)
          Sets the vector Vx
 void setVy(Vector vy)
          Sets the vector Vy
 void setVz(Vector vz)
          Sets the vector Vz
 Matrix2D toIdentity()
          Converts this matrix to an identity matrix
 String toString()
          Returns the matrix elements as a String
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Matrix2D

public Matrix2D()
Constructs an identity 3x3 matrix


Matrix2D

public Matrix2D(Vector vx,
                Vector vy,
                Vector vz)
Constructs a 3x3 matrix using the specified vectors

Parameters:
vx - the vector x
vy - the vector y
vz - the vector z
Method Detail

toIdentity

public Matrix2D toIdentity()
Converts this matrix to an identity matrix

Returns:
the identity matrix

getVx

public Vector getVx()
Returns the vector Vx

Returns:
the vector Vx

setVx

public void setVx(Vector vx)
Sets the vector Vx

Parameters:
vx - the vector Vx

getVy

public Vector getVy()
Returns the vector Vy

Returns:
the vector Vy

setVy

public void setVy(Vector vy)
Sets the vector Vy

Parameters:
vy - the vector Vy

getVz

public Vector getVz()
Returns the vector Vz

Returns:
the vector Vz

setVz

public void setVz(Vector vz)
Sets the vector Vz

Parameters:
vz - the vector Vz

equals

public boolean equals(Object obj)
Tests the specified object obj for equality with this matrix

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns the matrix elements as a String

Overrides:
toString in class Object
Returns:
the matrix in the form VxX, VyX, VzX, VxY, VyY, VzY, VxZ, VyZ, VzZ


Copyright © 2009-2011. All Rights Reserved.