| Package | Description |
|---|---|
| com.io7m.jtensors |
Core vector and matrix types.
|
| com.io7m.jtensors.bytebuffered |
ByteBuffer backed tensors. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Quaternion4DType
The type of mutable quaternions with
double elements. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionI4D
A four-dimensional immutable quaternion type with
double elements. |
class |
QuaternionM4D
A four-dimensional mutable quaternion type with
double
elements. |
| Modifier and Type | Method and Description |
|---|---|
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.addInPlace(Q q0,
QuaternionReadable4DType q1)
Calculate the element-wise sum of the quaternions
q0 and q1, saving the result to q0. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.conjugateInPlace(Q q)
Calculate the conjugate of the input quaternion
q, modifying q in place. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.multiplyInPlace(Q q0,
QuaternionReadable4DType q1)
Multiply the quaternion
q0 by the quaternion q1 , saving
the result to q0. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.negateInPlace(Q q)
Negate the elements of
q, modifying the quaternion in-place. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.normalizeInPlace(Q q)
Returns a quaternion with the same orientation as
q but with
magnitude equal to 1.0 in q. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.scaleInPlace(Q q,
double r)
Scale the quaternion
q by the scalar r, saving the result
to q. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.subtractInPlace(Q q0,
QuaternionReadable4DType q1)
Subtract the quaternion
q0 from the quaternion q1, saving
the result to q0. |
| 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.add(QuaternionReadable4DType q0,
QuaternionReadable4DType q1,
Q out)
Calculate the element-wise sum of the quaternions
q0 and q1, saving the result to qr. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.addInPlace(Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.conjugate(QuaternionReadable4DType q,
Q out)
Calculate the conjugate of the input quaternion
q, saving the
result to out. |
static <Q extends QuaternionWritable4DType> |
QuaternionM4D.copy(QuaternionReadable4DType q,
Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.interpolateLinear(QuaternionM4D.ContextQM4D c,
QuaternionReadable4DType q0,
QuaternionReadable4DType q1,
double alpha,
Q 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 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 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 <M extends MatrixWritable3x3DType> |
QuaternionM4D.makeRotationMatrix3x3(QuaternionReadable4DType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable3x3DType> |
QuaternionI4D.makeRotationMatrix3x3(QuaternionReadable4DType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable4x4DType> |
QuaternionM4D.makeRotationMatrix4x4(QuaternionReadable4DType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable4x4DType> |
QuaternionI4D.makeRotationMatrix4x4(QuaternionReadable4DType q,
M 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.multiply(QuaternionReadable4DType q0,
QuaternionReadable4DType q1,
Q qr)
Multiply the quaternion
q0 by the quaternion q1 , saving
the result to qr. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.multiplyInPlace(Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.negate(QuaternionReadable4DType qa,
Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.normalize(QuaternionReadable4DType q,
Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.scale(QuaternionReadable4DType q,
double r,
Q 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 <Q extends QuaternionWritable4DType> |
QuaternionM4D.subtract(QuaternionReadable4DType q0,
QuaternionReadable4DType q1,
Q out)
Subtract the quaternion
q0 from the quaternion q1, saving
the result to out. |
static <Q extends QuaternionWritable4DType & QuaternionReadable4DType> |
QuaternionM4D.subtractInPlace(Q 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. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
QuaternionByteBuffered4DType
The type of
Quaternion4DType values that are also byte buffered. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionByteBufferedM4D
A quaternion type with
double elements, packed into a ByteBuffer. |
Copyright © 2016 <code@io7m.com> http://io7m.com