|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VolumeJ.VJMatrix
This class implements a transformation matrix and 3D transformation methods on it.
It also implements the tranformations necessary for the shear-warp rendering algorithm
as defined in Lacroute's thesis.
Interface leans heavily on
Foley, van Dam. Computer Graphics. Second ed.
Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.
Constructor Summary | |
VJMatrix()
Create a new transformation matrix initialized to the unit matrix. |
|
VJMatrix(float[][] m)
Create a new transformation matrix from a float[][] matrix. |
|
VJMatrix(VJMatrix vjm)
Create a new transformation matrix initialized to another matrix. |
Method Summary | |
float[] |
getColumn(int n)
Return the n-th column of the 3D transform matrix as a vector. |
static float[] |
getMax(float[][] vertex,
int dimension)
Find the homogenuous coordinate with the highest value in an array of coordinates. |
static float[] |
getMin(float[][] vertex,
int dimension)
Find the homogenuous coordinate with the lowest value on a dimension in an array of coordinates. |
float |
getOversamplingRatio()
Return the oversampling ratio for this (usually inverse) transformation matrix. |
double[] |
getShearCoefficients()
Return the shear coefficients as defined in Lacroute's thesis. |
boolean |
getSliceOrder(double sci,
double scj)
Return the slice order as defined in Lacroutes thesis. |
float[] |
getStepperColumn()
Return the third column of the 3D transform matrix as a vector. |
double[] |
getViewingVector()
Return the viewing vector as defined in Lacroute's thesis. |
VJMatrix |
inverse()
Invert this matrix. |
float[] |
mul(float[] v)
Multiply a vector v with this transformation matrix and return the result as a vector. |
void |
mul(VJMatrix m0)
Multiply this transformation matrix with another transformation matrix in place. |
static float[] |
newVector(float x,
float y,
float z)
Create a new 3-D homogenuous vector from 3 coordinates. |
void |
permutation(int axis)
Make a permutation for one of the major axes (x,y,z) Used for shear-warp rendering. |
void |
rotatex(double theta)
Rotate the coordinate system around the x axis. |
void |
rotatey(double theta)
Rotate the coordinate system around the y axis. |
void |
rotatez(double theta)
Rotate the coordinate system around the z axis. |
void |
scale(double sx,
double sy,
double sz)
Scale the coordinate system by sx, sy, sz. |
void |
shear(double sx,
double sy)
Shear the coordinate system by sx, sy. |
java.lang.String |
toString()
|
void |
translate(double tx,
double ty,
double tz)
Translate the coordinate system to tx, ty, tz. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public VJMatrix()
public VJMatrix(float[][] m)
public VJMatrix(VJMatrix vjm)
m1
- the matrix that is copied to this matrix.Method Detail |
public static float[] newVector(float x, float y, float z)
public void translate(double tx, double ty, double tz)
tx,ty,tz
- the amounts to translate on each of the three axes.public void scale(double sx, double sy, double sz)
sx,sy,sz
- the amounts to scale by on each of the three axes.public void rotatex(double theta)
theta
- the amount to rotate (in degrees)public void rotatey(double theta)
theta
- the amount to rotate (in degrees)public void rotatez(double theta)
theta
- the amount to rotate (in degrees)public float[] mul(float[] v)
v
- a 4-D homogeneous vector (x,y,z,w).public static float[] getMin(float[][] vertex, int dimension)
vertex
- an array of double[4] coordinates.dimension
- the axis on which you want the maximum value.public static float[] getMax(float[][] vertex, int dimension)
vertex
- an array of double[4] coordinates.dimension
- the axis on which you want the maximum value.public void mul(VJMatrix m0)
ml
- a VJMatrix.public float[] getStepperColumn()
public float[] getColumn(int n)
the
- axis for which to get the column. 0 = i, 1 = j, 2 = k axis.public float getOversamplingRatio()
public void shear(double sx, double sy)
sx,sy
- the amounts of shear by on each of the two axes.public void permutation(int axis)
axis
- the axis around which to permute.public double[] getViewingVector()
public boolean getSliceOrder(double sci, double scj)
public double[] getShearCoefficients()
public VJMatrix inverse()
public java.lang.String toString()
toString
in class java.lang.Object
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |