guAlignF
Creates a modeling matrix for rotation around an arbitrary axis (aligned, floating-point)
#include <ultra64.h> /* gu.h */
void guAlignF(float mf[4][4], float a, float x, float y, float z);
None
This macro performs an alignment process (in which the arbitrary axis represented by the line passing through the origin and a point (x, y, z) is rotated so it points in the same direction as the negative Z axis), and then returns a modeling matrix to the structure indicated by mf for use in rotating by an angle of a degrees in the positive direction around this arbitrary axis. The result of calling this macro is the creation of a modeling matrix like the one shown below. Note that a unit matrix is returned when h = 0.
(* Note that the values (x,y,z) here are normalized inside the function)
Fixed-point is handled using guAlign.
The vector does not have to be normalized ahead of time. This is done inside the function. However, when
= 0, the operation of this macro cannot be guaranteed.
guAlign, guRotate, guRotateF, guScale, guScaleF, guTranslate, and guTranslateF
03/01/99 Completely rewritten