34 lines
614 B
C++
34 lines
614 B
C++
#ifndef SCENE_H
|
|
#define SCENE_H
|
|
|
|
#include "app/elements.h"
|
|
#include "bindings/ruby.h"
|
|
#include "utils.h"
|
|
#include "window/window.h"
|
|
|
|
namespace app {
|
|
struct Scene {
|
|
std::vector<uint64_t> element_ids;
|
|
Ruby::Block update;
|
|
|
|
~Scene();
|
|
|
|
void add_element(uint64_t element_id);
|
|
|
|
void delete_element(uint64_t element_id);
|
|
void update_scene(mrb_value dt_val);
|
|
|
|
void click(Vec2<float> position);
|
|
|
|
void render(uint64_t abs_time);
|
|
|
|
std::vector<uint64_t> elements_at(Vec2<float> position);
|
|
|
|
Vec2<float> world_to_local(Vec2<float> p, Element *e);
|
|
};
|
|
|
|
inline Pool<Scene> scene_pool;
|
|
} // namespace app
|
|
|
|
#endif
|