2019-09-18 18:51:26 +02:00
|
|
|
#ifndef FE_CAMERA
|
|
|
|
#define FE_CAMERA
|
|
|
|
|
2019-09-18 19:04:56 +02:00
|
|
|
#include <fxengine/space.h>
|
2019-09-18 18:51:26 +02:00
|
|
|
|
|
|
|
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
|