Class Matrix3D

java.lang.Object
   |
   +----Matrix3D

public class Matrix3D
extends Object
Matrix3D Class


Constructor Index

 o Matrix3D()
blank constructor for future extentions
 o Matrix3D(Matrix3D)
initialize with copy of source
 o Matrix3D(Raster)
initialize with a mapping from canonical space to screen space

Method Index

 o compose(float[][])
 o compose(Matrix3D)
this = this * src compose two matricies -- they must be of the same size and square.
 o crossprod(float[], float[])
 o dotprod(float[], float[])
 o get(int, int)
This method returns element [j][i] from this transformation matrix
 o initializeIdentity()
initializes the identity matrix which is 4x4 matrix kept as a private variable in this class.
 o initializeShear(float, float, float)
initializes the shear matrix used for skew procedure
 o loadIdentity()
this = identity loads identity matrix in as this matrix
 o lookAt(float, float, float, float, float, float, float, float, float)
this = this * lookat Natural Viewing Transform: Transform the eye to the origin and the look-at direction (optical axis) to a specified coordinate axis.
 o matAdd(float[][], float[][])
adds two matricies together, entry by entry and return resulting matrix.
 o multiplyConst(float[][], float)
 o multiplyPoint(Point3D)
This method is used as a subroutine for public void transform and will multiply this matrix with a column vector created from the Point3D that is passed in as an argument.
 o normalizeVal(float[])
 o orthographic(float, float, float, float, float, float)
this = this * ortho Orthographic or parallel projection: Images lack perspective, don't appear natural.
 o perspective(float, float, float, float, float, float)
this = this * perps Perspective Transformation: Causes objects nearer to the viewer to appear larger than the same object would appear farther away.
 o rotate(float, float, float, float)
this = this*rotate Expects angle in radians.
 o scale(float, float, float)
this = this * scale composes this matrix with scale matrix that is defined by points sx, sy, sz
 o set(int, int, float)
This method sets element [j][i] to value in this transformation matrix
 o skew(float, float, float)
this = this*skew composes this matrix with a skew matrix that is defined by points kxy, kxz, kyz
 o toString()
 o transform(Point3D[], Point3D[], int, int)
Transforms points from the in array to the out array using the current matrix.
 o translate(float, float, float)
this = this * t multiply matrix = matrix*t where t is a column vector

Constructors

 o Matrix3D
 public Matrix3D()
blank constructor for future extentions

 o Matrix3D
 public Matrix3D(Matrix3D copy)
initialize with copy of source

 o Matrix3D
 public Matrix3D(Raster r)
initialize with a mapping from canonical space to screen space

Methods

 o set
 public void set(int i,
                 int j,
                 float value)
This method sets element [j][i] to value in this transformation matrix

 o get
 public float get(int i,
                  int j)
This method returns element [j][i] from this transformation matrix

 o transform
 public void transform(Point3D in[],
                       Point3D out[],
                       int start,
                       int length)
Transforms points from the in array to the out array using the current matrix. The subset of points transformed begins at the start index and has the specified length for (i = 0; i < length; i++) out[start+i] = this * in[start+i]

 o compose
 public final void compose(Matrix3D src)
this = this * src compose two matricies -- they must be of the same size and square. The matrix from the argument is from an object of type Matrix3D.

 o compose
 protected final void compose(float src[][])
 o loadIdentity
 public void loadIdentity()
this = identity loads identity matrix in as this matrix

 o translate
 public void translate(float tx,
                       float ty,
                       float tz)
this = this * t multiply matrix = matrix*t where t is a column vector

 o scale
 public void scale(float sx,
                   float sy,
                   float sz)
this = this * scale composes this matrix with scale matrix that is defined by points sx, sy, sz

 o skew
 public void skew(float kxy,
                  float kxz,
                  float kyz)
this = this*skew composes this matrix with a skew matrix that is defined by points kxy, kxz, kyz

 o rotate
 public void rotate(float ax,
                    float ay,
                    float az,
                    float angle)
this = this*rotate Expects angle in radians. The axis of rotation is determined by the values of ax, ay, and az.

 o lookAt
 public void lookAt(float eyex,
                    float eyey,
                    float eyez,
                    float atx,
                    float aty,
                    float atz,
                    float upx,
                    float upy,
                    float upz)
this = this * lookat Natural Viewing Transform: Transform the eye to the origin and the look-at direction (optical axis) to a specified coordinate axis.

 o normalizeVal
 protected float normalizeVal(float a[])
 o crossprod
 protected float[] crossprod(float a[],
                             float b[])
 o dotprod
 protected float dotprod(float a[],
                         float b[])
 o perspective
 public void perspective(float left,
                         float right,
                         float bottom,
                         float top,
                         float near,
                         float far)
this = this * perps Perspective Transformation: Causes objects nearer to the viewer to appear larger than the same object would appear farther away. Parallel lines appear to converge to a single point when viewed in perspective. (The artist's projection)

 o orthographic
 public void orthographic(float left,
                          float right,
                          float bottom,
                          float top,
                          float near,
                          float far)
this = this * ortho Orthographic or parallel projection: Images lack perspective, don't appear natural. parallel lines remain parallel.

 o toString
 public String toString()
Overrides:
toString in class Object
 o multiplyPoint
 protected Point3D multiplyPoint(Point3D p)
This method is used as a subroutine for public void transform and will multiply this matrix with a column vector created from the Point3D that is passed in as an argument. transpose([x',y',z',1]) = this.matrix*transpose([x,y,z,1])

 o initializeShear
 protected void initializeShear(float kxy,
                                float kxz,
                                float kyz)
initializes the shear matrix used for skew procedure

 o initializeIdentity
 protected void initializeIdentity()
initializes the identity matrix which is 4x4 matrix kept as a private variable in this class.

 o multiplyConst
 protected float[][] multiplyConst(float a[][],
                                   float ct)
 o matAdd
 protected float[][] matAdd(float a[][],
                            float b[][])
adds two matricies together, entry by entry and return resulting matrix. Assumes matricies are of the same size and are square.