com.threerings.opengl.model.config
Class MergedStaticConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.model.config.ModelConfig.Implementation
          extended by com.threerings.opengl.model.config.MergedStaticConfig
All Implemented Interfaces:
Exportable, Copyable, Cloneable

public class MergedStaticConfig
extends ModelConfig.Implementation

A merged static implementation.


Nested Class Summary
protected static class MergedStaticConfig.TransformedCollision
          Holds a collision mesh and associated transform.
 
Field Summary
protected  SoftReference<StaticConfig.Resolved> _resolved
          The cached resolved config bits.
 CompoundConfig.ComponentModel[] models
          The component models.
 
Constructor Summary
MergedStaticConfig()
          Default constructor.
MergedStaticConfig(CompoundConfig.ComponentModel[] models)
          Constructor that takes a precreated array of component models.
 
Method Summary
 Model.Implementation getModelImplementation(GlContext ctx, Scope scope, Model.Implementation impl)
          Creates or updates a model implementation for this configuration.
 void getUpdateReferences(ConfigReferenceSet refs)
          Adds the implementation's update references to the provided set.
 void invalidate()
          Invalidates any cached data.
protected  StaticConfig.Resolved resolve(GlContext ctx)
          (Re)resolves the data.
 
Methods inherited from class com.threerings.opengl.model.config.ModelConfig.Implementation
getConfigManager, getOriginal, getParticleGeometry, getParticleMaterial, updateFromSource
 
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

models

@Editable
public CompoundConfig.ComponentModel[] models
The component models.


_resolved

@DeepOmit
protected transient SoftReference<StaticConfig.Resolved> _resolved
The cached resolved config bits.

Constructor Detail

MergedStaticConfig

public MergedStaticConfig()
Default constructor.


MergedStaticConfig

public MergedStaticConfig(CompoundConfig.ComponentModel[] models)
Constructor that takes a precreated array of component models.

Method Detail

getUpdateReferences

public void getUpdateReferences(ConfigReferenceSet refs)
Description copied from class: ModelConfig.Implementation
Adds the implementation's update references to the provided set.

Overrides:
getUpdateReferences in class ModelConfig.Implementation

getModelImplementation

public Model.Implementation getModelImplementation(GlContext ctx,
                                                   Scope scope,
                                                   Model.Implementation impl)
Description copied from class: ModelConfig.Implementation
Creates or updates a model implementation for this configuration.

Specified by:
getModelImplementation in class ModelConfig.Implementation
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.

invalidate

public void invalidate()
Description copied from class: ModelConfig.Implementation
Invalidates any cached data.

Overrides:
invalidate in class ModelConfig.Implementation

resolve

protected StaticConfig.Resolved resolve(GlContext ctx)
(Re)resolves the data.