org.jscience.chemistry.gui.basic
Class Matrix3D

java.lang.Object
  extended by org.jscience.chemistry.gui.basic.Matrix3D

public class Matrix3D
extends java.lang.Object

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


Constructor Summary
Matrix3D()
          Create a new unit matrix
 
Method Summary
 void mult(Matrix3D rhs)
          Multiply this matrix by a second: M = MR
 void scale(double f)
          Scale by f in all dimensions
 void scale(double xf, double yf, double zf)
          Scale along each axis independently
 java.lang.String toString()
          DOCUMENT ME!
 void transform(Atom atom)
          DOCUMENT ME!
 void transform(double[] v, int[] tv, int nvert)
          Transform nvert points from v into tv.
 void translate(double x, double y, double z)
          Translate the origin
 void unit()
          Reinitialize to the unit matrix
 void xrot(double theta)
          rotate theta degrees about the x axis
 void yrot(double theta)
          rotate theta degrees about the y axis
 void zrot(double theta)
          rotate theta degrees about the z axis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Matrix3D

public Matrix3D()
Create a new unit matrix

Method Detail

scale

public void scale(double f)
Scale by f in all dimensions

Parameters:
f - DOCUMENT ME!

scale

public void scale(double xf,
                  double yf,
                  double zf)
Scale along each axis independently

Parameters:
xf - DOCUMENT ME!
yf - DOCUMENT ME!
zf - DOCUMENT ME!

translate

public void translate(double x,
                      double y,
                      double z)
Translate the origin

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
z - DOCUMENT ME!

yrot

public void yrot(double theta)
rotate theta degrees about the y axis

Parameters:
theta - DOCUMENT ME!

xrot

public void xrot(double theta)
rotate theta degrees about the x axis

Parameters:
theta - DOCUMENT ME!

zrot

public void zrot(double theta)
rotate theta degrees about the z axis

Parameters:
theta - DOCUMENT ME!

mult

public void mult(Matrix3D rhs)
Multiply this matrix by a second: M = MR

Parameters:
rhs - DOCUMENT ME!

unit

public void unit()
Reinitialize to the unit matrix


transform

public void transform(Atom atom)
DOCUMENT ME!

Parameters:
atom - DOCUMENT ME!

transform

public void transform(double[] v,
                      int[] tv,
                      int nvert)
Transform nvert points from v into tv. v contains the input coordinates in doubleing point. Three successive entries in the array constitute a point. tv ends up holding the transformed points as integers; three successive entries per point

Parameters:
v - DOCUMENT ME!
tv - DOCUMENT ME!
nvert - DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!