Axis Angle

Provides a helper structure for conversion to quaternions.

#include <graphics/axisang.h>
struct axisang
float axisang.x

X axis

float axisang.y

Y axis

float axisang.z

Z axis

float axisang.w

Angle

float axisang.ptr[4]

void axisang_zero(struct axisang *dst)

Zeroes the axis angle.

Parameters:
  • dst – Axis angle


void axisang_copy(struct axisang *dst, struct axisang *aa)

Copies an axis angle.

Parameters:
  • dst – Axis angle to copy to

  • aa – Axis angle to copy from


void axisang_set(struct axisang *dst, float x, float y, float z, float w)

Sets an axis angle.

Parameters:
  • dst – Axis angle to set

  • x – X axis

  • y – Y axis

  • z – Z axis

  • w – Angle


void axisang_from_quat(struct axisang *dst, const struct quat *q)

Creates an axis angle from a quaternion.

Parameters:
  • dst – Axis angle destination

  • q – Quaternion to convert