*m | Calculation matrix |
*p3 | Coordinates of arbitrary point |
*p2 | Point coordinates after projection |
The following projects point ps(100, 200, 300) onto the screen. NJS_MATRIX stack[10]; NJS_VIEW view; NJS_POINT3 p3; NJS_POINT2 p2; p3.x = 100.f; p3.y = 200.f; p3.z = 300.f; njInitMatrix(stack, 10); njInitView(&view); njSetView(&view); njClearMatrix(); njPushMatrix(NULL); njProjectScreen(NULL, &p3, &p2); njPopMatrix(1); % Result % p2(153.333328, 573.333374)