Crossfire JXClient, Trunk
Public Member Functions | Package Functions | Package Attributes | Static Package Attributes | List of all members
Matrix3D Class Reference
Collaboration diagram for Matrix3D:
Collaboration graph

Public Member Functions

String toString ()
 
String toString ()
 

Package Functions

 Matrix3D ()
 
 Matrix3D ()
 
void mult (Matrix3D rhs)
 
void mult (Matrix3D rhs)
 
void scale (float f)
 
void scale (float f)
 
void scale (float xf, float yf, float zf)
 
void scale (float xf, float yf, float zf)
 
void transform (float v[], int tv[], int nvert)
 
void transform (float v[], int tv[], int nvert)
 
void translate (float x, float y, float z)
 
void translate (float x, float y, float z)
 
void unit ()
 
void unit ()
 
void xrot (double theta)
 
void xrot (double theta)
 
void yrot (double theta)
 
void yrot (double theta)
 
void zrot (double theta)
 
void zrot (double theta)
 

Package Attributes

float xo
 
float xx
 
float xy
 
float xz
 
float yo
 
float yx
 
float yy
 
float yz
 
float zo
 
float zx
 
float zy
 
float zz
 

Static Package Attributes

static final double pi = 3.14159265
 

Detailed Description

A fairly conventional 3D matrix object that can transform sets of 3D points and perform a variety of manipulations on the transform

Definition at line 44 of file Matrix3D.java.

Constructor & Destructor Documentation

◆ Matrix3D() [1/2]

Matrix3D.Matrix3D ( )
package

Create a new unit matrix

Definition at line 52 of file Matrix3D.java.

References xx, yy, and zz.

◆ Matrix3D() [2/2]

Matrix3D.Matrix3D ( )
package

Create a new unit matrix

Definition at line 52 of file Matrix3D.java.

References xx, yy, and zz.

Member Function Documentation

◆ mult() [1/2]

void Matrix3D.mult ( Matrix3D  rhs)
package

Multiply this matrix by a second: M = M*R

Definition at line 176 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

Referenced by XYZApp.mouseDragged(), ThreeD.mouseDragged(), XYZApp.paint(), and ThreeD.paint().

Here is the caller graph for this function:

◆ mult() [2/2]

void Matrix3D.mult ( Matrix3D  rhs)
package

Multiply this matrix by a second: M = M*R

Definition at line 176 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ scale() [1/4]

void Matrix3D.scale ( float  f)
package

Scale by f in all dimensions

Definition at line 59 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ scale() [2/4]

void Matrix3D.scale ( float  f)
package

Scale by f in all dimensions

Definition at line 59 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

Referenced by XYZApp.paint(), and ThreeD.paint().

Here is the caller graph for this function:

◆ scale() [3/4]

void Matrix3D.scale ( float  xf,
float  yf,
float  zf 
)
package

Scale along each axis independently

Definition at line 75 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ scale() [4/4]

void Matrix3D.scale ( float  xf,
float  yf,
float  zf 
)
package

Scale along each axis independently

Definition at line 75 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ toString() [1/2]

String Matrix3D.toString ( )

Definition at line 243 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ toString() [2/2]

String Matrix3D.toString ( )

Definition at line 243 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ transform() [1/2]

void Matrix3D.transform ( float  v[],
int  tv[],
int  nvert 
)
package

Transform nvert points from v into tv. v contains the input coordinates in floating point. Three successive entries in the array constitute a point. tv ends up holding the transformed points as integers; three successive entries per point

Definition at line 228 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

Referenced by XYZChemModel.transform(), and Model3D.transform().

Here is the caller graph for this function:

◆ transform() [2/2]

void Matrix3D.transform ( float  v[],
int  tv[],
int  nvert 
)
package

Transform nvert points from v into tv. v contains the input coordinates in floating point. Three successive entries in the array constitute a point. tv ends up holding the transformed points as integers; three successive entries per point

Definition at line 228 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ translate() [1/2]

void Matrix3D.translate ( float  x,
float  y,
float  z 
)
package

Translate the origin

Definition at line 91 of file Matrix3D.java.

References xo, yo, and zo.

◆ translate() [2/2]

void Matrix3D.translate ( float  x,
float  y,
float  z 
)
package

Translate the origin

Definition at line 91 of file Matrix3D.java.

References xo, yo, and zo.

Referenced by XYZApp.paint(), and ThreeD.paint().

Here is the caller graph for this function:

◆ unit() [1/2]

void Matrix3D.unit ( )
package

Reinitialize to the unit matrix

Definition at line 209 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

Referenced by XYZApp.paint(), and ThreeD.paint().

Here is the caller graph for this function:

◆ unit() [2/2]

void Matrix3D.unit ( )
package

Reinitialize to the unit matrix

Definition at line 209 of file Matrix3D.java.

References xo, xx, xy, xz, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ xrot() [1/2]

void Matrix3D.xrot ( double  theta)
package

rotate theta degrees about the x axis

Definition at line 124 of file Matrix3D.java.

References pi, yo, yx, yy, yz, zo, zx, zy, and zz.

Referenced by XYZApp.init(), ThreeD.init(), Model3D.Model3D(), and XYZChemModel.XYZChemModel().

Here is the caller graph for this function:

◆ xrot() [2/2]

void Matrix3D.xrot ( double  theta)
package

rotate theta degrees about the x axis

Definition at line 124 of file Matrix3D.java.

References pi, yo, yx, yy, yz, zo, zx, zy, and zz.

◆ yrot() [1/2]

void Matrix3D.yrot ( double  theta)
package

rotate theta degrees about the y axis

Definition at line 98 of file Matrix3D.java.

References pi, xo, xx, xy, xz, zo, zx, zy, and zz.

◆ yrot() [2/2]

void Matrix3D.yrot ( double  theta)
package

rotate theta degrees about the y axis

Definition at line 98 of file Matrix3D.java.

References pi, xo, xx, xy, xz, zo, zx, zy, and zz.

Referenced by XYZApp.init(), ThreeD.init(), Model3D.Model3D(), and XYZChemModel.XYZChemModel().

Here is the caller graph for this function:

◆ zrot() [1/2]

void Matrix3D.zrot ( double  theta)
package

rotate theta degrees about the z axis

Definition at line 150 of file Matrix3D.java.

References pi, xo, xx, xy, xz, yo, yx, yy, and yz.

◆ zrot() [2/2]

void Matrix3D.zrot ( double  theta)
package

rotate theta degrees about the z axis

Definition at line 150 of file Matrix3D.java.

References pi, xo, xx, xy, xz, yo, yx, yy, and yz.

Member Data Documentation

◆ pi

static final double Matrix3D.pi = 3.14159265
staticpackage

Definition at line 49 of file Matrix3D.java.

Referenced by xrot(), yrot(), and zrot().

◆ xo

float Matrix3D.xo
package

Definition at line 46 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), translate(), unit(), yrot(), and zrot().

◆ xx

float Matrix3D.xx
package

Definition at line 46 of file Matrix3D.java.

Referenced by Matrix3D(), mult(), scale(), toString(), transform(), unit(), yrot(), and zrot().

◆ xy

float Matrix3D.xy
package

Definition at line 46 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), yrot(), and zrot().

◆ xz

float Matrix3D.xz
package

Definition at line 46 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), yrot(), and zrot().

◆ yo

float Matrix3D.yo
package

Definition at line 47 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), translate(), unit(), xrot(), and zrot().

◆ yx

float Matrix3D.yx
package

Definition at line 47 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), xrot(), and zrot().

◆ yy

float Matrix3D.yy
package

Definition at line 47 of file Matrix3D.java.

Referenced by Matrix3D(), mult(), scale(), toString(), transform(), unit(), xrot(), and zrot().

◆ yz

float Matrix3D.yz
package

Definition at line 47 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), xrot(), and zrot().

◆ zo

float Matrix3D.zo
package

Definition at line 48 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), translate(), unit(), xrot(), and yrot().

◆ zx

float Matrix3D.zx
package

Definition at line 48 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), xrot(), and yrot().

◆ zy

float Matrix3D.zy
package

Definition at line 48 of file Matrix3D.java.

Referenced by mult(), scale(), toString(), transform(), unit(), xrot(), and yrot().

◆ zz

float Matrix3D.zz
package

Definition at line 48 of file Matrix3D.java.

Referenced by Matrix3D(), mult(), scale(), toString(), transform(), unit(), xrot(), and yrot().


The documentation for this class was generated from the following file: