A node of this type is created automatically at the root of each model file that is loaded. More...
Classes | |
class | ModelReference |
Public Member Functions | |
ModelRoot (string name) | |
Filename const | getFullpath () |
Returns the full pathname of the model represented by this node, as found on disk. | |
int | getModelRefCount () |
Returns the number of copies that exist of this particular ModelRoot node. | |
ModelReference | getReference () |
Returns the pointer that represents the object shared between all copies of this ModelRoot. | |
setFullpath (Filename const fullpath) | |
Sets the full pathname of the model represented by this node, as found on disk. | |
setReference (ModelReference ref) | |
Changes the pointer that represents the object shared between all copies of this ModelRoot. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
A node of this type is created automatically at the root of each model file that is loaded.
It may eventually contain some information about the contents of the model; at the moment, it contains no special information, but can be used as a flag to indicate the presence of a loaded model file.
ModelRoot | ( | string | name | ) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from ModelNode.
Filename const getFullpath | ( | ) |
int getModelRefCount | ( | ) |
Returns the number of copies that exist of this particular ModelRoot node.
Each time ModelRoot::copy_subgraph() or make_copy() is called (or some other copying mechanism, such as NodePath.copy_to(), is used), this count will increment by one in all copies; when one of the copies is destructed, this count will decrement.
setFullpath | ( | Filename const | fullpath | ) |
Sets the full pathname of the model represented by this node, as found on disk.
This is mainly useful for reference purposes, but is also used to index the ModelRoot into the ModelPool.
This is normally set automatically when a model is loaded, and should not be set directly by the user. If you change this on a loaded model, then ModelPool::release_model() may fail.
setReference | ( | ModelReference | ref | ) |