Facebook Twitter YouTube

class GenericModel

Defined in:  TSModels.h
The GenericModel class represents a generic model node in a world.
Definition

class GenericModel final : public Model, public ListElement<GenericModel>

Member Functions
GenericModel::GetModelName Returns the model resource name.
Constructor

GenericModel(const char *name);

Parameters
name The name of the model resource.
Description
The GenericModel class serves as the root node for a generic model in a world. An instance of GenericModel should be constructed to explicitly create a model that does not have a type that was previously registered through the ModelRegistration class.

When a GenericModel node is created, the model resource specified by the name parameter is loaded as a subtree of the GenericModel node. If another GenericModel node already exists for the same name, then the resource is not reloaded, but a clone of the existing model is created to share the same object data.

If no model resource matching the name parameter can be found, then no subnodes are created beneath the GenericModel node.
Base Classes
Model A GenericModel node is a specific type of model.
ListElement<GenericModel> Used internally by the World Manager.
See Also

ModelRegistration

Model::GetModel