29 lines
532 B
C
29 lines
532 B
C
#ifndef FIGURE_H
|
|
#define FIGURE_H
|
|
|
|
#include "geomerty.h"
|
|
|
|
enum figure_type
|
|
{
|
|
FIGURE_CIRCLE = 0,
|
|
FIGURE_TRIANGLE = 1,
|
|
FIGURE_SQUARE = 2
|
|
};
|
|
|
|
struct figure_animation_info {
|
|
enum figure_type type;
|
|
struct vec2 position;
|
|
struct vec2 velocity;
|
|
|
|
float angle;
|
|
float angular_velocity;
|
|
|
|
float speed;
|
|
/* Radius of the figure normalized for window width (0..1)
|
|
* This field is used by animation code to check collisions
|
|
* with the left/right/top/bottom borders. */
|
|
float radius;
|
|
};
|
|
|
|
#endif
|