| Package | Description |
|---|---|
| com.io7m.jtensors |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionI4F
A four-dimensional immutable quaternion type with single precision
elements.
|
class |
QuaternionM4F
A four-dimensional mutable quaternion type with single precision elements.
|
| Modifier and Type | Method and Description |
|---|---|
static QuaternionI4F |
QuaternionI4F.add(QuaternionReadable4FType q0,
QuaternionReadable4FType q1)
Calculate the element-wise sum of the quaternions
q0 and
q1. |
static QuaternionM4F |
QuaternionM4F.add(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
QuaternionM4F out)
Calculate the element-wise sum of the quaternions
q0 and
q1, saving the result to qr. |
static QuaternionM4F |
QuaternionM4F.addInPlace(QuaternionM4F q0,
QuaternionReadable4FType q1)
Calculate the element-wise sum of the quaternions
q0 and
q1, saving the result to q0. |
static boolean |
QuaternionM4F.almostEqual(com.io7m.jequality.AlmostEqualFloat.ContextRelative context,
QuaternionReadable4FType qa,
QuaternionReadable4FType qb)
Determine whether or not the quaternions
qa and
qb are equal to within the degree of error given in
context. |
static boolean |
QuaternionI4F.almostEqual(com.io7m.jequality.AlmostEqualFloat.ContextRelative context,
QuaternionReadable4FType qa,
QuaternionReadable4FType qb)
Determine whether or not the quaternions
qa and
qb are equal to within the degree of error given in
context. |
static QuaternionI4F |
QuaternionI4F.conjugate(QuaternionReadable4FType q)
Calculate the conjugate of the input quaternion
q. |
static QuaternionM4F |
QuaternionM4F.conjugate(QuaternionReadable4FType q,
QuaternionM4F out)
Calculate the conjugate of the input quaternion
q, saving
the result to out. |
static QuaternionM4F |
QuaternionM4F.copy(QuaternionReadable4FType q,
QuaternionM4F out)
Copy the contents of the quaternion
q to out. |
static double |
QuaternionM4F.dotProduct(QuaternionReadable4FType q0,
QuaternionReadable4FType q1)
Calculate the scalar product of the quaternions
q0 and
q1. |
static float |
QuaternionI4F.dotProduct(QuaternionReadable4FType q0,
QuaternionReadable4FType q1)
Calculate the scalar product of the quaternions
q0 and
q1. |
static QuaternionM4F |
QuaternionM4F.interpolateLinear(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
double alpha,
QuaternionM4F r)
Linearly interpolate between
q0 and q1 by the
amount alpha, such that:
interpolateLinear(q0, q1, 0.0, r) -> r = q0
interpolateLinear(q0, q1, 1.0, r) -> r = q1
|
static QuaternionI4F |
QuaternionI4F.interpolateLinear(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
float alpha)
Linearly interpolate between
q0 and q1 by the
amount alpha, such that:
interpolateLinear(q0, q1, 0.0) = q0
interpolateLinear(q0, q1, 1.0) = q1
|
static boolean |
QuaternionM4F.isNegationOf(com.io7m.jequality.AlmostEqualFloat.ContextRelative context,
QuaternionReadable4FType qa,
QuaternionReadable4FType qb)
Return
true iff qa is the negation of
qb. |
static boolean |
QuaternionI4F.isNegationOf(com.io7m.jequality.AlmostEqualFloat.ContextRelative context,
QuaternionReadable4FType qa,
QuaternionReadable4FType qb)
Return
true iff qa is the negation of
qb. |
static double |
QuaternionM4F.magnitude(QuaternionReadable4FType q)
Calculate the magnitude of the quaternion
q. |
static float |
QuaternionI4F.magnitude(QuaternionReadable4FType q)
Calculate the magnitude of the quaternion
q. |
static double |
QuaternionM4F.magnitudeSquared(QuaternionReadable4FType q)
Calculate the squared magnitude of the quaternion
q. |
static float |
QuaternionI4F.magnitudeSquared(QuaternionReadable4FType q)
Calculate the squared magnitude of the quaternion
q. |
static MatrixM3x3F |
QuaternionI4F.makeRotationMatrix3x3(QuaternionReadable4FType q,
MatrixM3x3F m)
Produce a rotation matrix from the quaternion
q, saving the
result to m. |
static MatrixM4x4F |
QuaternionM4F.makeRotationMatrix4x4(QuaternionReadable4FType q,
MatrixM4x4F m)
Produce a rotation matrix from the quaternion
q, saving the
result to m. |
static MatrixM4x4F |
QuaternionI4F.makeRotationMatrix4x4(QuaternionReadable4FType q,
MatrixM4x4F m)
Produce a rotation matrix from the quaternion
q, saving the
result to m. |
static QuaternionI4F |
QuaternionI4F.multiply(QuaternionReadable4FType q0,
QuaternionReadable4FType q1)
Multiply the quaternion
q0 by the quaternion q1
. |
static QuaternionM4F |
QuaternionM4F.multiply(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
QuaternionM4F qr)
Multiply the quaternion
q0 by the quaternion q1
, saving the result to qr. |
static QuaternionM4F |
QuaternionM4F.multiplyInPlace(QuaternionM4F q0,
QuaternionReadable4FType q1)
Multiply the quaternion
q0 by the quaternion q1
, saving the result to q0. |
static QuaternionI4F |
QuaternionI4F.negate(QuaternionReadable4FType q)
Negate the elements of
q. |
static QuaternionM4F |
QuaternionM4F.negate(QuaternionReadable4FType qa,
QuaternionM4F out)
Negate the elements of
qa, writing the resulting quaternion
to out. |
static QuaternionI4F |
QuaternionI4F.normalize(QuaternionReadable4FType q)
Normalize the quaternion
q, preserqing its direction but
reducing it to unit length. |
static QuaternionM4F |
QuaternionM4F.normalize(QuaternionReadable4FType q,
QuaternionM4F out)
Returns a quaternion with the same orientation as
q but with
magnitude equal to 1.0 in out. |
static QuaternionM4F |
QuaternionM4F.scale(QuaternionReadable4FType q,
double r,
QuaternionM4F out)
Scale the quaternion
q by the scalar r, saving
the result to out. |
static QuaternionI4F |
QuaternionI4F.scale(QuaternionReadable4FType q,
float r)
Scale the quaternion
q by the scalar r. |
static QuaternionI4F |
QuaternionI4F.subtract(QuaternionReadable4FType q0,
QuaternionReadable4FType q1)
Subtract the quaternion
q0 from the quaternion
q1. |
static QuaternionM4F |
QuaternionM4F.subtract(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
QuaternionM4F out)
Subtract the quaternion
q0 from the quaternion
q1, saving the result to out. |
static QuaternionM4F |
QuaternionM4F.subtractInPlace(QuaternionM4F q0,
QuaternionReadable4FType q1)
Subtract the quaternion
q0 from the quaternion
q1, saving the result to q0. |
| Constructor and Description |
|---|
QuaternionI4F(QuaternionReadable4FType q)
Construct a quaternion initialized with the values contained in
q. |
QuaternionM4F(QuaternionReadable4FType q)
Construct a quaternion initialized with the values given in
q. |
Copyright © 2015 <code@io7m.com> http://io7m.com