42class EXPCL_PANDA_PGRAPH ModelPool {
62 static void write(std::ostream &out);
67 bool ns_has_model(
const Filename &filename);
72 void ns_release_model(
const Filename &filename);
77 void ns_release_all_models();
78 int ns_garbage_collect();
79 void ns_list_contents(std::ostream &out)
const;
81 static ModelPool *get_ptr();
83 static ModelPool *_global_ptr;
The name of a file, such as a texture file or an Egg file.
This is a standard, non-reentrant mutex, similar to the Mutex class.
Specifies parameters that may be passed to the loader.
static int garbage_collect()
Releases only those models in the pool that have a reference count of exactly 1; i....
static void add_model(const Filename &filename, ModelRoot *model)
Adds the indicated already-loaded model to the pool.
static ModelRoot * get_model(const Filename &filename, bool verify)
Returns the model that has already been previously loaded, or NULL otherwise.
static void list_contents(std::ostream &out)
Lists the contents of the model pool to the indicated output stream.
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 bool has_model(const Filename &filename)
Returns true if the model has ever been loaded, false otherwise.
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 void release_all_models()
Releases all models in the pool and restores the pool to the empty state.
static void write(std::ostream &out)
Lists the contents of the model pool to the indicated output stream.
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...
A node of this type is created automatically at the root of each model file that is loaded.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.