papercraft/camera.h

36 lines
473 B
C
Raw Normal View History

2017-09-27 03:37:22 +02:00
#pragma once
#include "v3.h"
typedef struct _camera_t camera_t;
extern camera_t *
camera_new(
2017-09-27 04:59:09 +02:00
v3_t eye,
2017-09-27 03:37:22 +02:00
float phi,
float theta,
float psi
);
extern void
camera_setup(
camera_t * const c,
2017-09-27 04:59:09 +02:00
v3_t eye,
2017-09-27 03:37:22 +02:00
float phi,
float theta,
float psi
);
/** Transform a XYZ point into a screen point.
*
* Returns 0 if this is behind us. Perhaps it should do a z buffer?
*/
extern int
camera_project(
const camera_t * const c,
const v3_t * const v,
v3_t * const v_out
);