|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.math.AxisAngle3
A 3D spatial transform specifying rotation about an arbitrary axis, which is defined by a scalar angle and a rotation axis vector. Rotation about the axis uses the right-hand rule and is cummulative (like a transform).
Constructor Summary | |
AxisAngle3()
Creates an instance with zero rotation, and a default unit vector axis. |
|
AxisAngle3(AxisAngle3 target)
Creates an instance with the same geometry as the target. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
double |
getAngle()
Gets this axis-angle's rotation angle. |
UnitVector3 |
getAxis()
Gets an immutable view of this axis-angle's rotation axis. |
AxisAngle3 |
getAxisAngle3()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
java.lang.Object |
getGraphic()
Default implementation: Returns this (non-native implementation). |
SpaceNode |
getGraphicLocalSpace()
Default implementation: Returns null (absolute reference space). |
void |
set(AxisAngle3 rotation)
Sets this axis-angle to the value of another axis-angle. |
AxisAngle3 |
setAngle(double angle)
Sets this axis-angle's rotation angle, in radians. |
AxisAngle3 |
setAxis(Vector3 axis)
Sets this axis-angle's rotation axis. |
java.lang.String |
toString()
|
void |
transformGraphic(Matrix4 matrix)
Default implementation: Only affects the axis, not the angle. |
void |
transformGraphic(SpaceNode from,
SpaceNode to)
Default implementation: Only affects the axis, not the angle. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AxisAngle3()
public AxisAngle3(AxisAngle3 target)
Method Detail |
public void set(AxisAngle3 rotation)
rotation
- Rotation to copy. Never null.public AxisAngle3 setAngle(double angle)
public AxisAngle3 setAxis(Vector3 axis)
public double getAngle()
public UnitVector3 getAxis()
public AxisAngle3 getAxisAngle3()
public void transformGraphic(SpaceNode from, SpaceNode to)
transformGraphic
in interface TransformableGraphic
from
- The current reference space. Never null.to
- The new reference space. Never null.public void transformGraphic(Matrix4 matrix)
transformGraphic
in interface TransformableGraphic
matrix
- Value of the transform matrix. Never null.public SpaceNode getGraphicLocalSpace()
getGraphicLocalSpace
in interface GraphicGeometry
public java.lang.Object getGraphic()
getGraphic
in interface Graphic
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |