Jeospace API

org.jeospace.coordinate
Class AxisAngle

java.lang.Object
  extended byorg.jeospace.coordinate.AxisAngle
All Implemented Interfaces:
java.lang.Cloneable

public class AxisAngle
extends java.lang.Object
implements java.lang.Cloneable

An object that represents a normalized axis-angle representation of a rotation utilizing double precision floating point values.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton
See Also:
Axis, Vector

Constructor Summary
AxisAngle()
          Construct an instance initialized to (0, 0, 1, 0)
AxisAngle(AxisAngle value)
          Construct an instance initialized to duplicate the argument
AxisAngle(Axis axis, double angle)
          Construct an instance initialized to the given rotation about the specified axis
AxisAngle(double[] value)
          Construct an instance initialized to the given value and normalized
AxisAngle(double x, double y, double z, double angle)
          Construct an instance initialized to the given value and normalized
AxisAngle(float[] value)
          Construct an instance initialized to the given value and normalized
AxisAngle(Vector axis, double angle)
          Construct an instance initialized to the given values and normalize
 
Method Summary
 void clear()
          Set the axis angle values to (0, 0, 1, 0)
 java.lang.Object clone()
          Return the clone of the axis angle
 boolean equals(java.lang.Object obj)
          Check the axis angle for equality with the passed object.
 void get(AxisAngle value)
          Return the value of the axis angle in the argument AxisAngle object
 void get(double[] value)
          Return the value of the axis angle in the argument array in x, y, z, angle order
 void get(float[] value)
          Return the value of the axis angle in the argument array in x, y, z, angle order
 double get(Vector axis)
          Return the value of the axis angle
 int hashCode()
          Calculate the hash code
 void set(AxisAngle value)
          Set the value of the axis angle to duplicate the argument
 void set(Axis axis, double angle)
          Set the value of the axis angle to the rotation about the specified axis
 void set(double[] value)
          Set the value of the axis angle and normalize
 void set(double x, double y, double z, double angle)
          Set the value of the axis angle and normalize
 void set(float[] value)
          Set the value of the axis angle and normalize
 void set(Vector axis, double angle)
          Set the value of the axis angle and normalize
 java.lang.String toString()
          Return a string representing the axis angle of the form (x, y, z, angle)
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisAngle

public AxisAngle()
Construct an instance initialized to (0, 0, 1, 0)


AxisAngle

public AxisAngle(double x,
                 double y,
                 double z,
                 double angle)
Construct an instance initialized to the given value and normalized

Parameters:
x - the x value
y - the y value
z - the z value
angle - the angle value

AxisAngle

public AxisAngle(double[] value)
Construct an instance initialized to the given value and normalized

Parameters:
value - the double array of values in x, y, z, angle order

AxisAngle

public AxisAngle(float[] value)
Construct an instance initialized to the given value and normalized

Parameters:
value - the float array of values in x, y, z, angle order

AxisAngle

public AxisAngle(Vector axis,
                 double angle)
Construct an instance initialized to the given values and normalize

Parameters:
axis - the Vector axis of rotation
angle - the rotation in radians about the axis

AxisAngle

public AxisAngle(Axis axis,
                 double angle)
Construct an instance initialized to the given rotation about the specified axis

Parameters:
axis - the Axis axis of rotation
angle - the rotation in radians about the axis

AxisAngle

public AxisAngle(AxisAngle value)
Construct an instance initialized to duplicate the argument

Parameters:
value - the AxisAngle object to duplicate
Method Detail

clear

public void clear()
Set the axis angle values to (0, 0, 1, 0)


set

public void set(double x,
                double y,
                double z,
                double angle)
Set the value of the axis angle and normalize

Parameters:
x - the x value
y - the y value
z - the z value
angle - the angle value

set

public void set(double[] value)
Set the value of the axis angle and normalize

Parameters:
value - the double array of values in x, y, z, angle order

set

public void set(float[] value)
Set the value of the axis angle and normalize

Parameters:
value - the float array of values in x, y, z, angle order

set

public void set(Vector axis,
                double angle)
Set the value of the axis angle and normalize

Parameters:
axis - the Vector axis of rotation
angle - the rotation in radians about the axis

set

public void set(Axis axis,
                double angle)
Set the value of the axis angle to the rotation about the specified axis

Parameters:
axis - the Axis axis of rotation
angle - the rotation in radians about the axis

set

public void set(AxisAngle value)
Set the value of the axis angle to duplicate the argument

Parameters:
value - the AxisAngle object to duplicate

get

public void get(double[] value)
Return the value of the axis angle in the argument array in x, y, z, angle order

Parameters:
value - the double array to initialize

get

public void get(float[] value)
Return the value of the axis angle in the argument array in x, y, z, angle order

Parameters:
value - the float array to initialize

get

public double get(Vector axis)
Return the value of the axis angle

Parameters:
axis - the Vector object to initialize with the axis of rotation
Returns:
the rotation in radians about the axis

get

public void get(AxisAngle value)
Return the value of the axis angle in the argument AxisAngle object

Parameters:
value - the AxisAngle object to initialize

clone

public java.lang.Object clone()
Return the clone of the axis angle

Returns:
a fully duplicated AxisAngle object

hashCode

public int hashCode()
Calculate the hash code

Returns:
the hash code

equals

public boolean equals(java.lang.Object obj)
Check the axis angle for equality with the passed object.

Returns:
true if the values of the axis angle are identical, false otherwise

toString

public java.lang.String toString()
Return a string representing the axis angle of the form (x, y, z, angle)

Returns:
the string representation of the quaternion

Jeospace API

Copyright © 2006 - jeospace.org