Bewerken

Delen via


QUATERNION structure (sensorsstructures.h)

A structure that represents a 4-dimensional vector used for simple 3D rotation operation.

Syntax

typedef struct {
  float X;
  float Y;
  float Z;
  float W;
} QUATERNION, *PQUATERNION;

Members

X

Horizontal vector.

Y

Vertical vector.

Z

Vector on the Z-axis.

W

Remarks

The rotation is done around the axis formed by the vector v= [X, Y, Z] and is of angle ?, and we have:

W=cos(theta/2)
|v|=sin(theta/2)

Requirements

Requirement Value
Header sensorsstructures.h