- java.lang.Object
-
- spice.basic.AxisAndAngle
-
public class AxisAndAngle extends java.lang.Object
Class AxisAndAngle provides containers for rotation axis and angle combinations.Version 1.0.0 08-DEC-2009 (NJB)
-
-
Constructor Summary
Constructors Constructor Description AxisAndAngle(AxisAndAngle a)
Copy constructor.This constructor creates a deep copy.AxisAndAngle(Matrix33 r)
Create a rotation axis and angle from a rotation matrix.AxisAndAngle(Vector3 v, double angle)
Create a rotation axis and angle from a vector and scalar.
-
-
-
Field Detail
-
axis
private Vector3 axis
-
angle
private double angle
-
-
Constructor Detail
-
AxisAndAngle
public AxisAndAngle(AxisAndAngle a)
Copy constructor.This constructor creates a deep copy.- Parameters:
a
- AxisAndAngle
-
AxisAndAngle
public AxisAndAngle(Vector3 v, double angle) throws SpiceException
Create a rotation axis and angle from a vector and scalar.The axis must be non-zero.
- Parameters:
v
- Vector3angle
- double- Throws:
SpiceException
- exception
-
AxisAndAngle
public AxisAndAngle(Matrix33 r) throws SpiceException
Create a rotation axis and angle from a rotation matrix.- Parameters:
r
- Matrix33- Throws:
SpiceException
- exception
-
-
Method Detail
-
getAxis
public Vector3 getAxis()
Get the rotation axis from this instance.- Returns:
- Vector3
-
getAngle
public double getAngle()
Get the rotation angle from this instance.- Returns:
- angle
-
toMatrix
public Matrix33 toMatrix() throws SpiceException
Create a rotation matrix from this instance.- Returns:
- Matrix33
- Throws:
SpiceException
- exception
-
-