|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hermetica.util3d.trackball
Constructor Summary | |
trackball()
Constructor |
|
trackball(float size)
Constructor with trackball size. |
Method Summary | |
float[] |
addQuats(float[] q1,
float[] q2)
Given two rotations, e1 and e2, expressed as quaternion rotations, figure out the equivalent single rotation and return it. |
float[] |
axisToQuat(float[] a,
float phi)
Given an axis and angle, compute the quaternion |
float[][] |
buildMatrix(float[] q)
Builds a rotation matrix from a given quaternion |
float[] |
buildQuaternion(float p1x,
float p1y,
float p2x,
float p2y)
Calculates a quaternion representing the trackball |
float |
projectToSphere(float r,
float x,
float y)
Project an x, y pair onto a sphere of radius r OR a hyperbolic sheet if we are away from the centre of the sphere. |
float[] |
renormalizeQuat(float[] q)
Quaternions always obey: a^2 + b^2 + c^2 + d^2 = 1.0. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public trackball()
public trackball(float size)
Method Detail |
public float[] buildQuaternion(float p1x, float p1y, float p2x, float p2y)
public float[] axisToQuat(float[] a, float phi)
public float projectToSphere(float r, float x, float y)
public float[] addQuats(float[] q1, float[] q2)
public float[] renormalizeQuat(float[] q)
public float[][] buildMatrix(float[] q)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |