Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions

# ModelRoot Class Reference

A node of this type is created automatically at the root of each model file that is loaded. More...

Inheritance diagram for ModelRoot:

List of all members.

## 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 ()

## Detailed Description

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.

## Constructor & Destructor Documentation

ModelRoot | ( | string | name | ) |

## Member Function Documentation

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from ModelNode.

Filename const getFullpath | ( |  | ) |

Returns 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.

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.

ModelReference getReference | ( |  | ) |

Returns the pointer that represents the object shared between all copies of this ModelRoot.

Since there's not much associated with this object other than a reference count, normally there's not much reason to get the pointer (though it may be compared pointerwise with other ModelRoot objects).

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 | ) |

Changes the pointer that represents the object shared between all copies of this ModelRoot.

This will disassociate this ModelRoot from all of its copies. Normally, there's no reason to do this.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties