2023-05-08 13:10:39 +02:00
|
|
|
#ifndef DEMO_UTILS_H
|
|
|
|
#define DEMO_UTILS_H 1
|
|
|
|
|
2023-05-08 14:35:36 +02:00
|
|
|
#include <GL4D/gl4duw_SDL2.h>
|
2023-05-12 16:00:17 +02:00
|
|
|
#include <string.h>
|
2023-05-08 13:10:39 +02:00
|
|
|
|
|
|
|
// Récupère un delta-temps
|
2023-05-08 13:41:32 +02:00
|
|
|
double get_dt(double *, GLboolean);
|
2023-05-08 13:10:39 +02:00
|
|
|
|
2023-05-08 14:35:36 +02:00
|
|
|
// Bind and load a matrix
|
|
|
|
void bindAndLoadf(const char *name);
|
|
|
|
|
2023-05-12 13:49:33 +02:00
|
|
|
/* Move something in space
|
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `+x` => movement to right
|
2023-05-12 13:49:33 +02:00
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `-x` => movement to left
|
2023-05-12 13:49:33 +02:00
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `+y` => movement to top (fly)
|
2023-05-12 13:49:33 +02:00
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `-y` => movement to bottom (sink)
|
2023-05-12 13:49:33 +02:00
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `+z` => move closer
|
2023-05-12 13:49:33 +02:00
|
|
|
*
|
2023-05-12 17:46:25 +02:00
|
|
|
* `-z` => move away */
|
2023-05-12 16:42:51 +02:00
|
|
|
void move(GLfloat x, GLfloat y, GLfloat z);
|
2023-05-12 13:49:33 +02:00
|
|
|
|
2023-05-19 11:13:37 +02:00
|
|
|
/* Rotate a vector XYZ */
|
|
|
|
void rotate_vec(GLfloat *, GLfloat);
|
|
|
|
|
2023-05-08 13:10:39 +02:00
|
|
|
#endif
|