|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.config.ManagedConfig
com.threerings.config.ParameterizedConfig
com.threerings.opengl.model.config.ModelConfig
public class ModelConfig
The configuration of a model.
| Nested Class Summary | |
|---|---|
static class |
ModelConfig.BaseWrapper
Base wrapper implementation. |
static class |
ModelConfig.Derived
A derived implementation. |
static class |
ModelConfig.Implementation
Contains the actual implementation of the model. |
static class |
ModelConfig.Imported
Superclass of the imported implementations (this is not abstract because in order for the exporter to create a prototype of MaterialMapping, it must be able to instantiate this class). |
static class |
ModelConfig.MeshSet
Contains a set of meshes. |
static class |
ModelConfig.Schemed
Chooses different models based on the render scheme. |
static class |
ModelConfig.SchemedModel
Combines a render scheme with a model reference. |
static class |
ModelConfig.VisibleMesh
Pairs a texture name with a geometry config. |
| Field Summary | |
|---|---|
protected ConfigManager |
_configs
The model's local config library. |
protected static ModelParser |
_parser
Parses model exports. |
protected static String |
DEFAULT_MATERIAL
The default material for the default tag. |
protected static HashMap<String,String> |
DEFAULT_MATERIALS
Maps tags to default materials (each of which we expect to take a single parameter, "Texture," representing the texture reference). |
static String |
DEFAULT_TAG
The default tag for unskinned meshes. |
protected static String |
DEFAULT_TEXTURE
The default texture config (which we expect to take a single parameter, "File," representing the texture image path). |
ModelConfig.Implementation |
implementation
The actual model implementation. |
static String |
SKINNED_TAG
The default tag for skinned meshes. |
| Fields inherited from class com.threerings.config.ParameterizedConfig |
|---|
_args, _base, _derived, parameters |
| Fields inherited from class com.threerings.config.ManagedConfig |
|---|
_cfgmgr, _listeners, _name, _updateConfigs, _updateResources |
| Constructor Summary | |
|---|---|
ModelConfig()
Default constructor. |
|
ModelConfig(ModelConfig.Implementation impl)
Constructor that takes an already-created implementation. |
|
| Method Summary | |
|---|---|
protected void |
fireConfigUpdated()
Fires a configuration updated event. |
ConfigManager |
getConfigManager()
Returns a reference to the config manager to use when resolving references within this config. |
Model.Implementation |
getModelImplementation(GlContext ctx,
Scope scope,
Model.Implementation impl)
Creates or updates a model implementation for this configuration. |
ModelConfig.Implementation |
getOriginal()
Retrieves a reference to the underlying original implementation. |
GeometryConfig |
getParticleGeometry(GlContext ctx)
Returns the GeometryConfig to use when this model is selected for use within a
particle system (or null if it cannot be used). |
ConfigReference<MaterialConfig> |
getParticleMaterial(GlContext ctx)
Returns a reference to the material to use when this model is selected for use within a particle system. |
protected void |
getUpdateReferences(ConfigReferenceSet refs)
Collects all of the references within this config to configs that, when updated, should trigger a call to ManagedConfig.fireConfigUpdated(). |
void |
init(ConfigManager cfgmgr)
Initializes this config with a reference to the config manager that it should use to resolve references. |
void |
updateFromSource(EditorContext ctx,
boolean force)
Updates this configuration from its external source, if any. |
boolean |
validateReferences(String where,
PrintStream out)
Validates the references in this config. |
| Methods inherited from class com.threerings.config.ParameterizedConfig |
|---|
applyArguments, applyArguments, getBound, getInstance, getParameter, getParameter, getReference, maybeFireOnConfigManager, validateOuters, wasUpdated |
| Methods inherited from class com.threerings.config.ManagedConfig |
|---|
addListener, addUpdateDependencies, clearUpdateDependencies, configUpdated, getInstance, getInstance, getInstance, getInstance, getName, getUpdateResources, removeListener, resourceModified, setName |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_TAG
public static final String SKINNED_TAG
@Editable public ModelConfig.Implementation implementation
protected ConfigManager _configs
protected static ModelParser _parser
protected static final String DEFAULT_MATERIAL
protected static final String DEFAULT_TEXTURE
protected static final HashMap<String,String> DEFAULT_MATERIALS
| Constructor Detail |
|---|
public ModelConfig()
public ModelConfig(ModelConfig.Implementation impl)
| Method Detail |
|---|
public ModelConfig.Implementation getOriginal()
public Model.Implementation getModelImplementation(GlContext ctx,
Scope scope,
Model.Implementation impl)
scope - the model's expression scope.impl - an existing implementation to reuse, if possible.
null if no implementation could be created.public GeometryConfig getParticleGeometry(GlContext ctx)
GeometryConfig to use when this model is selected for use within a
particle system (or null if it cannot be used).
public ConfigReference<MaterialConfig> getParticleMaterial(GlContext ctx)
public void init(ConfigManager cfgmgr)
ManagedConfig
init in class ManagedConfigpublic ConfigManager getConfigManager()
ManagedConfig
getConfigManager in class ManagedConfig
public void updateFromSource(EditorContext ctx,
boolean force)
ManagedConfig
updateFromSource in class ManagedConfigforce - if true, reload the source data even if it has already been loaded.
public boolean validateReferences(String where,
PrintStream out)
ManagedConfig
validateReferences in class ParameterizedConfigprotected void fireConfigUpdated()
ManagedConfig
fireConfigUpdated in class ManagedConfigprotected void getUpdateReferences(ConfigReferenceSet refs)
ManagedConfigManagedConfig.fireConfigUpdated().
getUpdateReferences in class ManagedConfig
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||