##### Ninja Library - Matrix Function

# njRotateZXY

Applies a matrix that gives rotation around Z, X, and Y axes

### FORMAT

`

  void njRotateZXY(*m, x, y, z)
  NJS_MATRIX *m
  Angle x
  Angle y
  Angle z

`

### PARAMETER

  `*m` | Destination matrix
  `x` | X axis rotation angle
  `y` | Y axis rotation angle
  `z` | Z axis rotation angle

### RETURN

  None

### DESCRIPTION

  Applies matrix that gives rotation around the Z, X, and Y axes to the matrix m, in that order. When parameter m is NULL, the current matrix will be the destination.

### EXAMPLE

      The following applies a matrix that gives rotation of 90 degrees around the Z axis,
      30 degrees around the X axis and 60 degrees around the Y axis to the current matrix.

      NJS_MATRIX stack[10];
      NJS_VIEW view;
      njInitMatrix(stack, 10);
      njInitView(&view);
      njSetView(&view);
      njClearMatrix();
      njPushMatrix(NULL);
      njRotateZXY(NULL, NJM_DEG_ANG(30), NJM_DEG_ANG(60), NJM_DEG_ANG(90));
      njPopMatrix(1);

### NOTE

  For a matrix [M] and multiplicative rotational matrix [R], [M] = [R] * [M]. Care must be taken with the order in which matrices are multiplied.

njRotateZXY

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999