20 return get_ptr()->ns_has_model(filename);
47 return get_ptr()->ns_get_model(filename, verify);
59 return get_ptr()->ns_load_model(filename, options);
71 get_ptr()->ns_add_model(filename, model);
85 get_ptr()->ns_release_model(filename);
94 get_ptr()->ns_add_model(model);
108 get_ptr()->ns_release_model(model);
116 get_ptr()->ns_release_all_models();
126 return get_ptr()->ns_garbage_collect();
134 get_ptr()->ns_list_contents(out);
142 get_ptr()->ns_list_contents(std::cout);
A node of this type is created automatically at the root of each model file that is loaded.
static void add_model(const Filename &filename, ModelRoot *model)
Adds the indicated already-loaded model to the pool.
Specifies parameters that may be passed to the loader.
static void list_contents()
Lists the contents of the model pool to cout.
static ModelRoot * load_model(const Filename &filename, const LoaderOptions &options=LoaderOptions())
Loads the given filename up as a model, if it has not already been loaded, and returns the new model.
static int garbage_collect()
Releases only those models in the pool that have a reference count of exactly 1; i....
static bool verify_model(const Filename &filename)
Loads the given filename up as a model, if it has not already been loaded, and returns true to indica...
The name of a file, such as a texture file or an Egg file.
static void release_all_models()
Releases all models in the pool and restores the pool to the empty state.
static void release_model(const Filename &filename)
Removes the indicated model from the pool, indicating it will never be loaded again; the model may th...
static ModelRoot * get_model(const Filename &filename, bool verify)
Returns the model that has already been previously loaded, or NULL otherwise.
static bool has_model(const Filename &filename)
Returns true if the model has ever been loaded, false otherwise.