fxengine/include/fxengine/camera.h

31 lines
835 B
C

#ifndef FE_CAMERA
#define FE_CAMERA
#include <fxengine/space.h>
struct fe_camera
{
fe_ipoint pos; // point of view
fe_fpoint pos_temp; // floating copy used while moving
double dh, dv, roll;
};
typedef struct fe_camera fe_camera;
/**
* @brief Sets up the translation matrices for a new rendering cycle
* There is no need to call this function if you have already called render_update()
*
* @param[in] dh Camera's horizontal direction (rad)
* @param[in] dv Camera's vertical direction (rad)
* @param[in] roulis Optionnal rotation around the middle of the screen
* @param[in] camera The camera's coordinates, as an integer position
*/
void fe_view_set_param(const double dh, const double dv, const double roulis, const fe_ipoint * camera);
void fe_view_set(const fe_camera * cam);
#endif