fxengine/include/render/translate.h

62 lines
1.2 KiB
C

#ifndef RENDER_TRANSLATE_H
#define RENDER_TRANSLATE_H
#include <stdint.h>
#include <fxengine/render/parameters.h>
/* FE_position:
notion de point dans l'espace simple */
typedef struct FE_integer_position FE_integer_position;
struct FE_integer_position
{
int32_t x,
y,
z;
};
typedef struct FE_floating_position FE_floating_position;
struct FE_floating_position
{
double x,
y,
z;
};
/* FE_point:
notion de point dans l'espace destiné à etre utilisé dans l'affichage */
typedef struct FE_integer_point FE_integer_point;
struct FE_integer_point
{
FE_integer_position real,
translated;
};
// applique la matrice de rotation et les deltas sur les coordonnées d'un point
void render_translate(FE_integer_point * point);
// change la matrice de rotation et les deltas pour le cycle à venir
void render_set(const double dh, const double dv, const double roulis, const FE_integer_position * camera);
// constantes mathématiques
extern const double pi, pi2, pi_sur_2;
// fonctions mathématiques
double modulo_2pi(double a);
double cos(double angle);
double sin(const double angle);
#endif