| Package | Description |
|---|---|
| com.io7m.jtensors |
Core vector and matrix types.
|
| Modifier and Type | Field and Description |
|---|---|
static QuaternionI4D |
QuaternionI4D.IDENTITY
The "identity" quaternion, [0.0 0.0 0.0 1.0]
|
| 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 QuaternionI4D |
QuaternionI4D.conjugate(QuaternionReadable4DType q)
Calculate the conjugate of the input quaternion
q. |
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 QuaternionI4D |
QuaternionI4D.interpolateSphericalLinear(QuaternionReadable4DType q0,
QuaternionReadable4DType q1,
double alpha)
Interpolate between
q0 and q1, using spherical linear
interpolation, by the amount alpha, such that:
interpolateSphericalLinear(q0, q1, 0.0) = normalize(q0)
interpolateSphericalLinear(q0, q1, 1.0) = normalize(q1) |
static QuaternionI4D |
QuaternionI4D.lookAt(QuaternionI4D.Context context,
VectorReadable3DType origin,
VectorReadable3DType target,
VectorReadable3DType up)
Produce a quaternion that represents a rotation that "looks at" the
point at
target assuming the viewer is at origin, using
up as the "up" vector. |
static QuaternionI4D |
QuaternionI4D.makeFromAxisAngle(VectorReadable3DType axis,
double angle)
Produce a quaternion that represents a rotation of
angle degrees
around the axis specified by axis. |
static QuaternionI4D |
QuaternionI4D.makeFromRotationMatrix3x3(MatrixReadable3x3DType m)
Produce a quaternion equivalent to the rotation matrix
m. |
static QuaternionI4D |
QuaternionI4D.makeFromRotationMatrix4x4(MatrixReadable4x4DType m)
Produce a quaternion equivalent to the rotation matrix
m, writing
the result to out. |
static QuaternionI4D |
QuaternionI4D.multiply(QuaternionReadable4DType q0,
QuaternionReadable4DType q1)
Multiply the quaternion
q0 by the quaternion q1 . |
static QuaternionI4D |
QuaternionI4D.negate(QuaternionReadable4DType q)
Negate the elements of
q. |
static QuaternionI4D |
QuaternionI4D.normalize(QuaternionReadable4DType q)
Normalize the quaternion
q, preserqing its direction but reducing
it to unit length. |
static QuaternionI4D |
QuaternionI4D.scale(QuaternionReadable4DType q,
double r)
Scale the quaternion
q by the scalar r. |
static QuaternionI4D |
QuaternionI4D.subtract(QuaternionReadable4DType q0,
QuaternionReadable4DType q1)
Subtract the quaternion
q0 from the quaternion q1. |
Copyright © 2017 <code@io7m.com> http://io7m.com