|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcrystalspace.jbind.impl.csNativeObject
crystalspace.jbind.impl.csgeom.quaterni.csQuaternion
Class for a quaternion.
| Field Summary |
| Fields inherited from class crystalspace.jbind.impl.csNativeObject |
ImplFactory, nPointer |
| Constructor Summary | |
csQuaternion()
Construct a 0,0,0,0 quaternion. |
|
csQuaternion(csMatrix3 smat)
Construct quaternion from a matrix. |
|
csQuaternion(csQuaternion q)
Copy constructor. |
|
csQuaternion(csVector3 v)
Construct quaternion from a vector. |
|
csQuaternion(float theR)
Construct a quaternion with the given parameters. |
|
csQuaternion(float theR,
float theX)
Construct a quaternion with the given parameters. |
|
csQuaternion(float theR,
float theX,
float theY)
Construct a quaternion with the given parameters. |
|
csQuaternion(float theR,
float theX,
float theY,
float theZ)
Construct a quaternion with the given parameters. |
|
csQuaternion(iPointer nPointer)
Create a java csQuaternion object which points to the native csQuaternion nPointer. |
|
| Method Summary | |
static csQuaternion |
add(csQuaternion q1,
csQuaternion q2)
Add two quaternions. |
void |
getAxisAngle(csVector3 axis,
float phi)
Get an axis-angle representation of this orientation. |
void |
getEulerAngles(csVector3 angles)
Convert a Quaternion to a set of Euler angles. |
void |
init(float theR,
float theX,
float theY,
float theZ)
Initialize a quaternion with specific values. |
void |
invert()
Invert the orientation of this quaternion. |
protected boolean |
isNativePointerValidSafe(long nPointer)
|
static csQuaternion |
minus(csQuaternion q1,
csQuaternion q2)
Subtract two quaternions. |
csQuaternion |
mul(csQuaternion q2)
Multiply two quaternions. |
static csQuaternion |
mul(csQuaternion q1,
csQuaternion q2)
Multiply two quaternions. |
protected void |
nDelete(long pointer)
|
void |
negate()
Negate all parameters of the quaternion. |
void |
normalize()
Normalize this quaternion. |
void |
prepRotation(float angle,
csVector3 vec)
Prepare a rotation quaternion, we do a rotation around vec by an angle of "angle". |
csVector3 |
rotate(csVector3 vec)
rotated = q * vec * qConj. |
void |
setWithAxisAngle(csVector3 axis,
float phi)
Set the quaternion using an axis-angle representation. |
void |
setWithEuler(csVector3 rot)
Convert a set of Euler angles to a Quaternion. |
csQuaternion |
slerp(csQuaternion quat2,
float slerp)
Spherical Linear Interpolation between two quaternions Calculated between this class & the second quaternion by the slerp factor and returned as a new quaternion. |
csQuaternion |
toAxisAngle()
Return an Axis Angle representation of this Quaternion. |
| Methods inherited from class crystalspace.jbind.impl.csNativeObject |
changePointer, equals, finalize, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public csQuaternion(iPointer nPointer)
nPointer - public csQuaternion()
public csQuaternion(float theR)
theR -
public csQuaternion(float theR,
float theX)
theR - theX -
public csQuaternion(float theR,
float theX,
float theY)
theR - theX - theY -
public csQuaternion(float theR,
float theX,
float theY,
float theZ)
theR - theX - theY - theZ - public csQuaternion(csQuaternion q)
q - public csQuaternion(csVector3 v)
v - public csQuaternion(csMatrix3 smat)
smat - | Method Detail |
protected void nDelete(long pointer)
nDelete in class csNativeObjectcsNativeObject.nDelete(long)protected boolean isNativePointerValidSafe(long nPointer)
isNativePointerValidSafe in class csNativeObjectcrystalspace.jbind.impl.csNativeObject#isNativePointerValidSafe()
public void init(float theR,
float theX,
float theY,
float theZ)
theR - theX - theY - theZ - public csQuaternion mul(csQuaternion q2)
q2 -
public void negate()
public void invert()
public void getAxisAngle(csVector3 axis,
float phi)
axis - phi -
public void setWithAxisAngle(csVector3 axis,
float phi)
axis - phi -
public void prepRotation(float angle,
csVector3 vec)
angle - vec - public csVector3 rotate(csVector3 vec)
vec -
public void normalize()
public void setWithEuler(csVector3 rot)
rot - public void getEulerAngles(csVector3 angles)
angles - public csQuaternion toAxisAngle()
public csQuaternion slerp(csQuaternion quat2,
float slerp)
quat2 - slerp -
public static csQuaternion add(csQuaternion q1,
csQuaternion q2)
q1 - q2 -
public static csQuaternion minus(csQuaternion q1,
csQuaternion q2)
q1 - q2 -
public static csQuaternion mul(csQuaternion q1,
csQuaternion q2)
q1 - q2 -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||