| Package | Description |
|---|---|
| com.io7m.jtensors |
Core vector and matrix types.
|
| com.io7m.jtensors.bytebuffered |
ByteBuffer backed tensors. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Quaternion4FType
The type of mutable quaternions with
float elements. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionI4F
A four-dimensional immutable quaternion type with
float elements. |
class |
QuaternionM4F
A four-dimensional mutable quaternion type with
float elements. |
| Modifier and Type | Method and Description |
|---|---|
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.addInPlace(Q q0,
QuaternionReadable4FType q1)
Calculate the element-wise sum of the quaternions
q0 and q1, saving the result to q0. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.conjugate(QuaternionReadable4FType q,
Q out)
Calculate the conjugate of the input quaternion
q, saving the
result to out. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.conjugateInPlace(Q q)
Calculate the conjugate of the input quaternion
q, modifying q in place. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.multiplyInPlace(Q q0,
QuaternionReadable4FType q1)
Multiply the quaternion
q0 by the quaternion q1 , saving
the result to q0. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.negateInPlace(Q q)
Negate the elements of
q, modifying the quaternion in-place. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.normalizeInPlace(Q q)
Returns a quaternion with the same orientation as
q but with
magnitude equal to 1.0 in q. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.scaleInPlace(Q q,
double r)
Scale the quaternion
q by the scalar r, saving the result
to q. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.subtractInPlace(Q q0,
QuaternionReadable4FType q1)
Subtract the quaternion
q0 from the quaternion q1, saving
the result to q0. |
| 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.add(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
Q out)
Calculate the element-wise sum of the quaternions
q0 and q1, saving the result to qr. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.addInPlace(Q 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 <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.conjugate(QuaternionReadable4FType q,
Q out)
Calculate the conjugate of the input quaternion
q, saving the
result to out. |
static <Q extends QuaternionWritable4FType> |
QuaternionM4F.copy(QuaternionReadable4FType q,
Q 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.interpolateLinear(QuaternionM4F.ContextQM4F c,
QuaternionReadable4FType q0,
QuaternionReadable4FType 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 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 <M extends MatrixWritable3x3FType> |
QuaternionM4F.makeRotationMatrix3x3(QuaternionReadable4FType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable3x3FType> |
QuaternionI4F.makeRotationMatrix3x3(QuaternionReadable4FType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable4x4FType> |
QuaternionM4F.makeRotationMatrix4x4(QuaternionReadable4FType q,
M m)
Produce a rotation matrix from the quaternion
q, saving the result
to m. |
static <M extends MatrixWritable4x4FType> |
QuaternionI4F.makeRotationMatrix4x4(QuaternionReadable4FType q,
M 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.multiply(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
Q qr)
Multiply the quaternion
q0 by the quaternion q1 , saving
the result to qr. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.multiplyInPlace(Q 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.negate(QuaternionReadable4FType qa,
Q 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.normalize(QuaternionReadable4FType q,
Q out)
Returns a quaternion with the same orientation as
q but with
magnitude equal to 1.0 in out. |
static <Q extends QuaternionWritable4FType> |
QuaternionM4F.scale(QuaternionReadable4FType q,
double r,
Q 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 <Q extends QuaternionWritable4FType> |
QuaternionM4F.subtract(QuaternionReadable4FType q0,
QuaternionReadable4FType q1,
Q out)
Subtract the quaternion
q0 from the quaternion q1, saving
the result to out. |
static <Q extends QuaternionWritable4FType & QuaternionReadable4FType> |
QuaternionM4F.subtractInPlace(Q q0,
QuaternionReadable4FType q1)
Subtract the quaternion
q0 from the quaternion q1, saving
the result to q0. |
static <V extends VectorWritable3FType> |
QuaternionM4F.toAxisAngle(QuaternionReadable4FType q,
V out)
Determine the axis-angle representation of the given quaternion.
|
| 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. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
QuaternionByteBuffered4FType
The type of
Quaternion4FType values that are also byte buffered. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionByteBufferedM4F
A quaternion type with
float elements, packed into a ByteBuffer. |
Copyright © 2017 <code@io7m.com> http://io7m.com