*m | Calculation matrix |
*v | Data for arbitrary axis |
ang | Rotation angle |
The following rotates the current matrix 90 degrees around the arbitrary axis containing vector v(1,1,1). NJS_MATRIX stack[10]; NJS_VIEW view; NJS_VECTOR v; v.x = 1.f; v.y = 1.f; v.z = 1.f; njInitMatrix(stack, 10); njInitView(&view); njSetView(&view); njClearMatrix(); njPushMatrix(NULL); njRotate(NULL, &v, NJM_DEG_ANG(90)); njPopMatrix(1);