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

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

public class Matrix3D
extends java.lang.Object

Implements a 4x4 matrix. The matrix is represented as an array of Vector3Ds Vx, Vy, Vz, Vw. The matrix notation is shown below:

         [ VxX  VyX  VzX  VwX ]
         [ VxY  VyY  VzY  VwY ]
         [ VxZ  VyZ  VzZ  VwZ ]
         [ VxW  VyW  VzW  VwW ]
 

Since:
1.1
Author:
Sikiru Braheem
See Also:
Vector3D

Constructor Summary
Matrix3D()
          Constructs an identity 4x4 matrix
Matrix3D(Vector3D vx, Vector3D vy, Vector3D vz, Vector3D vw)
          Constructs a 4x4 matrix using the specified vectors
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests the specified object obj for equality with this matrix
 Vector3D getVw()
          Returns the vector Vw
 Vector3D getVx()
          Returns the vector Vx
 Vector3D getVy()
          Returns the vector Vy
 Vector3D getVz()
          Returns the vector Vz
 int hashCode()
           
 void setVw(Vector3D vw)
          Sets the vector Vw
 void setVx(Vector3D vx)
          Sets the vector Vx
 void setVy(Vector3D vy)
          Sets the vector Vy
 void setVz(Vector3D vz)
          Sets the vector Vz
 Matrix3D toIdentity()
          Converts this matrix to an identity matrix
 java.lang.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

Matrix3D

public Matrix3D()
Constructs an identity 4x4 matrix


Matrix3D

public Matrix3D(Vector3D vx,
                Vector3D vy,
                Vector3D vz,
                Vector3D vw)
Constructs a 4x4 matrix using the specified vectors

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

toIdentity

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

Returns:
the identity matrix

getVw

public Vector3D getVw()
Returns the vector Vw

Returns:
the vector Vw

setVw

public void setVw(Vector3D vw)
Sets the vector Vw

Parameters:
vw - the vector Vw

getVx

public Vector3D getVx()
Returns the vector Vx

Returns:
the vector Vx

setVx

public void setVx(Vector3D vx)
Sets the vector Vx

Parameters:
vx - the vector Vx

getVy

public Vector3D getVy()
Returns the vector Vy

Returns:
the vector Vy

setVy

public void setVy(Vector3D vy)
Sets the vector Vy

Parameters:
vy - the vector Vy

getVz

public Vector3D getVz()
Returns the vector Vz

Returns:
the vector Vz

setVz

public void setVz(Vector3D vz)
Sets the vector Vz

Parameters:
vz - the vector Vz

equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns the matrix elements as a String

Overrides:
toString in class java.lang.Object
Returns:
the matrix in the form VxX, VyX, VzX, VwX, VxY, VyY, VzY, VwY, VxZ, VyZ, VzZ, VwZ, VxW, VyW, VzW, VwW


Copyright © 2009-2011. All Rights Reserved.