fxengine/include/render/translate.h

48 lines
1.3 KiB
C

#ifndef RENDER_TRANSLATE_H
#define RENDER_TRANSLATE_H
#include <fxengine/point.h>
/**
* @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 render_set(const double dh, const double dv, const double roulis, const render_integer_position * camera);
/**
* @brief Sets up an angle mesure between -pi and +pi
*
* @param[in] a the angle (rad)
*
* @return angle mesure which respect the following contraint :
* -pi <= angle <= pi
*/
double modulo_2pi(double a);
/**
* @brief Homemade cosinus implementation, which is faster than casio provided cosinus function
*
* @param[in] angle The angle (rad)
*
* @return cos angle
*/
double cos(double angle);
/**
* @brief Homemade sinus implementation, which is faster than casio provided sinus function
*
* @param[in] angle The angle (rad)
*
* @return sin angle
*/
double sin(const double angle);
#endif