Newer
Older
using namespace cgp;
// The entire hierarchy
struct bat{
cgp::hierarchy_mesh_drawable bat;
int N;
std::vector<double> size;
std::vector<bool> isdead;
std::vector<vec3> pos;
std::vector<vec3> pos2;
// Timer used for the interpolation of the position
cgp::timer_interval timer_mvt;
// A helper structure used to store and display the key positions/time
std::vector<keyframe_structure> keyframe;
void add_bat(vec3 new_pos, float terrain_length);
void initialize_mvt(vec3 p, int i, float terrain_length);
void display_mvt();