|
Returns the direction towards which the camera points.
Example A:
double x,y,z;
DWORD camera=STATE_camera_get_default_camera();
STATE_camera_get_direction(camera, &x, &y, &z);
Example B:
Note that instead of doing it as shown below, it is easier to use the function STATE_camera_get_direction1() instead
double xyz[3];
DWORD camera=STATE_camera_get_default_camera();
STATE_camera_get_direction(camera, &xyz[0], &xyz[1], &xyz[2]);
See also STATE_camera_get_direction1()
Remarks:
The returned direction is normalized (meaning it is a unit vector)
For more information about coordination systems and setting directions see the book (download the book free from www.3dstate.com )
|