org.opensourcephysics.drawing3d.utils.transformations
Class AxisRotation

java.lang.Object
  extended by org.opensourcephysics.numerics.Matrix3DTransformation
      extended by org.opensourcephysics.drawing3d.utils.transformations.AxisRotation
All Implemented Interfaces:
java.lang.Cloneable, MatrixTransformation, Transformation
Direct Known Subclasses:
CustomAxisRotation, XAxisRotation, YAxisRotation, ZAxisRotation

public abstract class AxisRotation
extends Matrix3DTransformation

XAxisRotation implements a 3D rotation around the X axis.


Method Summary
 double getAngle()
          Returns the angle of the rotation
 boolean setAngle(double theta)
          Sets the angle of the rotation
 void setElement(Element element)
          Sets the element the rotation applies to
 double[] setOrigin(double[] origin)
          Sets the origin for this rotation.
 void setOrigin(double ox, double oy, double oz)
          Sets the origin for this rotation.
 
Methods inherited from class org.opensourcephysics.numerics.Matrix3DTransformation
clone, createAlignmentTransformation, direct, direct, getFlatMatrix, getLoader, getOrigin, getTransposedFlatMatrix, inverse, inverse, multiply, multiply, Quaternion, Quaternion, rotation, rotationX, rotationY, rotationZ, setMatrix, setMatrix, toQuaternion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setElement

public void setElement(Element element)
Sets the element the rotation applies to

Parameters:
element -

setOrigin

public double[] setOrigin(double[] origin)
Description copied from class: Matrix3DTransformation
Sets the origin for this rotation.

Overrides:
setOrigin in class Matrix3DTransformation
Parameters:
origin - double[] the new origin
Returns:
double[]

setOrigin

public void setOrigin(double ox,
                      double oy,
                      double oz)
Description copied from class: Matrix3DTransformation
Sets the origin for this rotation.

Overrides:
setOrigin in class Matrix3DTransformation
Parameters:
ox - double
oy - double
oz - double

setAngle

public boolean setAngle(double theta)
Sets the angle of the rotation

Parameters:
theta -

getAngle

public double getAngle()
Returns the angle of the rotation

Returns: