|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcynosurex.math.Quaternion
public class Quaternion
Field Summary | |
---|---|
protected double |
w
|
protected double |
x
|
protected double |
y
|
protected double |
z
|
Fields inherited from interface cynosurex.internal.CommonInterface |
---|
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
---|
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
---|
company, email, website |
Constructor Summary | |
---|---|
Quaternion(double s,
double[] v)
Constructor to create a Quaternion from a vector array. |
|
Quaternion(double w,
double x,
double y,
double z)
Constructor to create a Quaternion. |
|
Quaternion(double s,
Vector v)
Constructor to create a Quaternion from a Vector. |
Method Summary | |
---|---|
static Quaternion |
addition(Quaternion q1,
Quaternion q2)
Static method to add two Quaternions together. |
void |
conjugate()
Conjugates the current Quaternion. |
Angle |
getAngle()
Returns the angle this Quaternion represents. |
Quaternion |
getConjugate()
Returns the conjugate of the Quaternion. |
double |
getMagnitude()
Returns the magnitude of the Quaternion. |
double |
getS()
Returns the scalar component (same as w) of the Quaternion. |
Vector |
getVector()
Returns the Vector component of the Quaternion. |
double |
getW()
Returns the w component of the Quaternion. |
double |
getX()
Returns the x component of the Quaternion. |
double |
getY()
Returns the y component of the Quaternion. |
double |
getZ()
Returns the z component of the Quaternion. |
static Quaternion |
product(Quaternion q1,
Quaternion q2)
Static method to calculate the product of two Quaternions. |
java.lang.String |
toString()
Overrides the super class method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double w
protected double x
protected double y
protected double z
Constructor Detail |
---|
public Quaternion(double w, double x, double y, double z)
public Quaternion(double s, Vector v)
s
- scalar value (same as w)v
- vector with three dimensionspublic Quaternion(double s, double[] v)
s
- scalar value (same as w)v
- array with three elementsMethod Detail |
---|
public static Quaternion addition(Quaternion q1, Quaternion q2)
q1
- Quaternion 1q2
- Quaternion 2public static Quaternion product(Quaternion q1, Quaternion q2)
q1
- Quaternion 1q2
- Quaternion 2public Angle getAngle()
public double getW()
public double getS()
public double getX()
public double getY()
public double getZ()
public Vector getVector()
public double getMagnitude()
public Quaternion getConjugate()
public void conjugate()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |