org.opensourcephysics.drawing3d.utils.transformations
Class CustomAxisRotation

java.lang.Object
  extended by org.opensourcephysics.numerics.Matrix3DTransformation
      extended by org.opensourcephysics.drawing3d.utils.transformations.AxisRotation
          extended by org.opensourcephysics.drawing3d.utils.transformations.CustomAxisRotation
All Implemented Interfaces:
java.lang.Cloneable, MatrixTransformation, Transformation

public class CustomAxisRotation
extends AxisRotation

AxisRotation implements a 3D rotation around a given axis.


Constructor Summary
CustomAxisRotation()
           
 
Method Summary
 java.lang.Object clone()
          Provides a copy of this transformation.
 double[] getAxis()
          Returns a copy of the axis of the rotation
 boolean setAngle(double theta)
          Sets the angle of the rotation
 boolean setAngleAndAxis(double theta, double[] newAxis)
          Sets the axis and angle of the rotation
 boolean setAxis(double[] newAxis)
          Sets the axis of the rotation
 
Methods inherited from class org.opensourcephysics.drawing3d.utils.transformations.AxisRotation
getAngle, setElement, setOrigin, setOrigin
 
Methods inherited from class org.opensourcephysics.numerics.Matrix3DTransformation
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
 

Constructor Detail

CustomAxisRotation

public CustomAxisRotation()
Method Detail

setAngle

public boolean setAngle(double theta)
Description copied from class: AxisRotation
Sets the angle of the rotation

Overrides:
setAngle in class AxisRotation

setAxis

public boolean setAxis(double[] newAxis)
Sets the axis of the rotation

Parameters:
axis -

getAxis

public double[] getAxis()
Returns a copy of the axis of the rotation

Returns:

setAngleAndAxis

public boolean setAngleAndAxis(double theta,
                               double[] newAxis)
Sets the axis and angle of the rotation

Parameters:
theta -
axis -

clone

public java.lang.Object clone()
Provides a copy of this transformation.

Specified by:
clone in interface Transformation
Overrides:
clone in class Matrix3DTransformation