Skip to content
Snippets Groups Projects
bat.hpp 641 B
Newer Older
Marie AUDOUARD's avatar
Marie AUDOUARD committed
#pragma once

#include "cgp/cgp.hpp"
#include "key_positions_structure.hpp"
Marie AUDOUARD's avatar
Marie AUDOUARD committed

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;

Marie AUDOUARD's avatar
Marie AUDOUARD committed
	void initialize_bat();
	void add_bat(vec3 new_pos, float terrain_length);
	void initialize_mvt(vec3 p, int i, float terrain_length);
	void display_mvt();
Marie AUDOUARD's avatar
Marie AUDOUARD committed
};