Class Quaternion_F32

java.lang.Object
georegression.struct.so.Quaternion_F32
All Implemented Interfaces:
Serializable

@Generated("georegression.struct.so.Quaternion_F64") public class Quaternion_F32 extends Object implements Serializable

Specifies a 3D rotation using a quaternion. q = w + x*i + y*j + z*k, where (w,x,y,z) are the parameters of the quaternion and (i,j,k) are unit vectors representing the Cartesian axis.

If the quaternion is a unit quaternion then the following is true:
q = cos(theta/2) + (x*i + y*j + z*k)*sin(theta/2)
where 'theta' is the angle of rotation, (x,y,z) is the unit axis of rotation.

See Also:
  • Field Details

    • w

      public float w
      Describes the angle of rotation. See above for how it is encoded.
    • x

      public float x
      Axis of rotation
    • y

      public float y
      Axis of rotation
    • z

      public float z
      Axis of rotation
  • Constructor Details

    • Quaternion_F32

      public Quaternion_F32()
    • Quaternion_F32

      public Quaternion_F32(float w, float x, float y, float z)
  • Method Details

    • setTo

      public Quaternion_F32 setTo(Quaternion_F32 quaternion)
    • setTo

      public Quaternion_F32 setTo(float w, float x, float y, float z)
    • normalize

      public void normalize()
      Converts the quaternion into a unit quaternion.
    • norm

      public float norm()
      Returns the f-norm of this quaternion
    • isIdentical

      public boolean isIdentical(Quaternion_F32 q, float tol)
      Returns true if the two quaternions are identical. Note that they might be equivalent and fail this test
    • toString

      public String toString()
      Overrides:
      toString in class Object