com.threerings.opengl.model.config
Class ModelConfig.Implementation

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.model.config.ModelConfig.Implementation
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
BaseParticleSystemConfig, ComponentBillboardConfig, CompoundConfig, ConditionalConfig, GeneratedStaticConfig, MergedStaticConfig, ModelConfig.BaseWrapper, ModelConfig.Derived, ModelConfig.Imported, ModelConfig.Schemed, SceneInfluencerConfig, ScriptedConfig, ShapeModelConfig, ViewerAffecterConfig
Enclosing class:
ModelConfig

@EditorTypes(value={StaticConfig.class,StaticSetConfig.class,MergedStaticConfig.class,GeneratedStaticConfig.class,ArticulatedConfig.class,ParticleSystemConfig.class,MetaParticleSystemConfig.class,SceneInfluencerConfig.class,ViewerAffecterConfig.class,ComponentBillboardConfig.class,ConditionalConfig.class,CompoundConfig.class,ScriptedConfig.class,ActorModelConfig.Wrapper.class,ShapeModelConfig.class,ModelConfig.Derived.class,ModelConfig.Schemed.class})
public abstract static class ModelConfig.Implementation
extends DeepObject
implements Exportable

Contains the actual implementation of the model.


Constructor Summary
ModelConfig.Implementation()
           
 
Method Summary
 ConfigManager getConfigManager(ConfigManager cfgmgr)
          Returns a reference to the config manager to use when resolving references.
abstract  Model.Implementation getModelImplementation(GlContext ctx, Scope scope, Model.Implementation impl)
          Creates or updates a model implementation for this configuration.
 ModelConfig.Implementation getOriginal(ConfigManager cfgmgr)
          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.
 void getUpdateReferences(ConfigReferenceSet refs)
          Adds the implementation's update references to the provided set.
 void invalidate()
          Invalidates any cached data.
 void updateFromSource(EditorContext ctx, boolean force)
          Updates this implementation from its external source, if any.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelConfig.Implementation

public ModelConfig.Implementation()
Method Detail

getOriginal

public ModelConfig.Implementation getOriginal(ConfigManager cfgmgr)
Retrieves a reference to the underlying original implementation.


updateFromSource

public void updateFromSource(EditorContext ctx,
                             boolean force)
Updates this implementation from its external source, if any.

Parameters:
force - if true, reload the source data even if it has already been loaded.

getUpdateReferences

public void getUpdateReferences(ConfigReferenceSet refs)
Adds the implementation's update references to the provided set.


getConfigManager

public ConfigManager getConfigManager(ConfigManager cfgmgr)
Returns a reference to the config manager to use when resolving references.

Parameters:
cfgmgr - the config manager of the config containing the implementation.

getModelImplementation

public abstract Model.Implementation getModelImplementation(GlContext ctx,
                                                            Scope scope,
                                                            Model.Implementation impl)
Creates or updates a model implementation for this configuration.

Parameters:
scope - the model's expression scope.
impl - an existing implementation to reuse, if possible.
Returns:
either a reference to the existing implementation (if reused), a new implementation, or null if no implementation could be created.

getParticleGeometry

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


getParticleMaterial

public ConfigReference<MaterialConfig> getParticleMaterial(GlContext ctx)
Returns a reference to the material to use when this model is selected for use within a particle system.


invalidate

public void invalidate()
Invalidates any cached data.



Copyright © 2011. All Rights Reserved.