10#ifndef MVE_SCENE_HEADER
11#define MVE_SCENE_HEADER
21#define MVE_SCENE_VIEWS_DIR "views/"
22#define MVE_SCENE_BUNDLE_FILE "synth_0.out"
37 typedef std::shared_ptr<Scene>
Ptr;
42 static Scene::Ptr create (std::string
const& path);
48 void load_scene (std::string
const& base_path);
51 ViewList const& get_views (
void)
const;
59 void reset_bundle (
void);
62 View::Ptr get_view_by_id (std::size_t
id);
65 void save_scene (
void);
67 void save_views (
void);
69 void save_bundle (
void);
74 bool is_dirty (
void)
const;
77 std::string
const& get_path (
void)
const;
80 void cache_cleanup (
void);
83 std::size_t get_total_mem_usage (
void);
85 std::size_t get_view_mem_usage (
void);
87 std::size_t get_bundle_mem_usage (
void);
99 void init_views (
void);
106 : bundle_dirty(false)
114 scene->load_scene(path);
133 return (id < this->views.size() ? this->views[
id] :
View::Ptr());
136inline std::string
const&
139 return this->basedir;
145 this->bundle_dirty =
true;
146 this->bundle = bundle;
152 this->bundle.reset();
153 this->bundle_dirty =
false;
std::shared_ptr< Bundle > Ptr
std::shared_ptr< Bundle const > ConstPtr
Scene representation for the MVE.
Scene & operator=(const Scene &)=delete
View::Ptr get_view_by_id(std::size_t id)
Returns a view by ID or 0 on failure.
std::shared_ptr< Scene > Ptr
void set_bundle(Bundle::Ptr bundle)
Sets a new bundle structure.
ViewList const & get_views(void) const
Returns the list of views.
std::string const & get_path(void) const
Returns the base path of the scene.
std::vector< View::Ptr > ViewList
void reset_bundle(void)
Resets the bundle file such that it is re-read on get_bundle.
static Scene::Ptr create(std::string const &path)
Constructs and loads a scene from the given directory.
void rewrite_all_views(void)
Forces rewriting of all views.
Scene(const Scene &)=delete
std::shared_ptr< View > Ptr
#define MVE_NAMESPACE_BEGIN
#define MVE_NAMESPACE_END