C4 Engine
C4 Engine API Documentation

class GenericModel

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

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

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

GenericModel(const char *name);

name The name of the model resource.
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.
See Also