|
World Manager
C4Models.h
class ModelRegistrationTheModelRegistration class contains information about an application-defined model type.
Definition
Member Functions
Constructor
Parameters
Description
The ModelRegistration class is used to register an application-defined model type so that instances of the model can easily be cloned and so that they can be placed in a world using the World Editor. The act of instantiating an ModelRegistration object automatically registers the corresponding model type. The model type is unregistered when the ModelRegistration object is destroyed.Each model type must have a unique 32-bit identifier which is usually a four-character code. This identifier is specified in the type parameter in the model registration, and is later passed to the Model::Get function to create instances of the specific type of model.The name parameter specifies the human-readable model name that is displayed in the World Editor. If the kModelPrivate flag is specified in the flags parameter, then the name parameter may be nullptr.The path parameter specifies the name of the model resource corresponding to the model type.The flags parameter is optional and assigns special properties to the model registration. It can be a combination (through logical OR) of the following values.
kModelPrivate flag is specified, then the model type cannot be placed in a world using the World Editor, but the Model::Get function still produces instances of the model.The contType parameter is optional and identifies the type of controller that should be automatically assigned to a model of the registration's type when it is placed in a world using the World Editor. The type of controller specified does not need to be registered using the ControllerRegistration class, but the controller won't be accessible in the World Editor if it's not registered. The default value of 0 means that no controller is assigned.
Base Classes
See Also
Model
|