|
|||||||||
| Version 1.5 | APIs subject to change! | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmultiverse.server.math.Quaternion
public class Quaternion
this object is not thread safe
| Field Summary | |
|---|---|
static float |
epsilon
|
static Quaternion |
Identity
|
| Constructor Summary | |
|---|---|
Quaternion()
no args constructor sets w to 1.0, all others 0 |
|
Quaternion(float x,
float y,
float z,
float w)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(Quaternion q)
|
static Quaternion |
fromAngleAxis(double angle,
MVVector axis)
Create a quaternion from a supplied angle and axis |
static Quaternion |
fromAngleAxisDegrees(double angle,
MVVector axis)
Create a quaternion from a supplied angle and axis |
static Quaternion |
fromVectorRotation(MVVector a,
MVVector b)
Create a new quaternion that will rotate vector a into vector b about their mutually perpendicular axis. |
double |
getAngleAxis(MVVector axis)
Get the axis of rotation and the angle for this quaternion |
double |
getAngleAxisDegrees(MVVector axis)
Get the axis of rotation and the angle for this quaternion |
float |
getW()
|
float |
getX()
|
float |
getY()
|
float |
getZ()
|
static MVVector |
multiply(Quaternion quat,
MVVector vector)
|
static Quaternion |
multiply(Quaternion left,
Quaternion right)
Multiply two quaternions |
static Quaternion |
parseQuaternion(java.lang.String s)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
setW(float w)
|
void |
setX(float x)
|
void |
setY(float y)
|
void |
setZ(float z)
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Quaternion Identity
public static float epsilon
| Constructor Detail |
|---|
public Quaternion()
public Quaternion(float x,
float y,
float z,
float w)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic static Quaternion parseQuaternion(java.lang.String s)
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(Quaternion q)
public float getX()
public float getY()
public float getZ()
public float getW()
public void setX(float x)
public void setY(float y)
public void setZ(float z)
public void setW(float w)
public static Quaternion fromAngleAxis(double angle,
MVVector axis)
angle - angle in radiansaxis - axis vector about which to rotate
public static Quaternion fromAngleAxisDegrees(double angle,
MVVector axis)
angle - angle in degreesaxis - axis vector about which to rotate
public double getAngleAxisDegrees(MVVector axis)
axis - reference to axis vector which will be populated with
axis of rotation.
public double getAngleAxis(MVVector axis)
axis - reference to axis vector which will be populated with
axis of rotation.
public static Quaternion fromVectorRotation(MVVector a,
MVVector b)
a - starting facingb - ending facing
public static Quaternion multiply(Quaternion left,
Quaternion right)
left - the quaternion on the leftright - the quaternion on the right
public static MVVector multiply(Quaternion quat,
MVVector vector)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
Copyright © 2008 The Multiverse Network, Inc. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||