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