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

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.ModelConfig.Imported
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
ArticulatedConfig, StaticConfig, StaticSetConfig
Enclosing class:
ModelConfig

public static class ModelConfig.Imported
extends ModelConfig.Implementation

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


Nested Class Summary
 class ModelConfig.Imported.MaterialMapping
          Represents a mapping from texture name to material.
 
Field Summary
 float boundsExpansion
          A fixed amount by which to expand the bounds (to account for skinning).
 boolean generateTangents
          If true, generate tangent attributes for meshes.
 boolean ignoreRootTransforms
          If true, ignore the transforms of the top-level children.
 InfluenceFlagConfig influences
          The influences allowed to affect this model.
 ModelConfig.Imported.MaterialMapping[] materialMappings
          The mappings from texture name to material.
 float scale
          The model scale.
 
Constructor Summary
ModelConfig.Imported()
           
 
Method Summary
 Model.Implementation getModelImplementation(GlContext ctx, Scope scope, Model.Implementation impl)
          Creates or updates a model implementation for this configuration.
 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.
 String getSource()
          Returns the source file.
 void setSource(String source)
          Sets the source file from which to load the animation data.
 void updateFromSource(EditorContext ctx, boolean force)
          Updates this implementation from its external source, if any.
 
Methods inherited from class com.threerings.opengl.model.config.ModelConfig.Implementation
getConfigManager, getOriginal, getUpdateReferences, invalidate
 
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
 

Field Detail

scale

@Editable(min=0.0,
          step=0.01,
          hgroup="s")
public float scale
The model scale.


boundsExpansion

@Editable(min=0.0,
          step=0.01,
          hgroup="s")
public float boundsExpansion
A fixed amount by which to expand the bounds (to account for skinning).


ignoreRootTransforms

@Editable(hgroup="i")
public boolean ignoreRootTransforms
If true, ignore the transforms of the top-level children.


generateTangents

@Editable(hgroup="i")
public boolean generateTangents
If true, generate tangent attributes for meshes.


influences

@Editable
public InfluenceFlagConfig influences
The influences allowed to affect this model.


materialMappings

@Editable(depends="source")
public ModelConfig.Imported.MaterialMapping[] materialMappings
The mappings from texture name to material.

Constructor Detail

ModelConfig.Imported

public ModelConfig.Imported()
Method Detail

setSource

@Editable(editor="resource",
          nullable=true)
@FileConstraints(description="m.exported_models",
                 extensions=".mxml",
                 directory="exported_model_dir")
public void setSource(String source)
Sets the source file from which to load the animation data.


getSource

@Editable
public String getSource()
Returns the source file.


updateFromSource

public void updateFromSource(EditorContext ctx,
                             boolean force)
Description copied from class: ModelConfig.Implementation
Updates this implementation from its external source, if any.

Overrides:
updateFromSource in class ModelConfig.Implementation
force - if true, reload the source data even if it has already been loaded.

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.

getParticleGeometry

public GeometryConfig getParticleGeometry(GlContext ctx)
Description copied from class: ModelConfig.Implementation
Returns the GeometryConfig to use when this model is selected for use within a particle system (or null if it cannot be used).

Overrides:
getParticleGeometry in class ModelConfig.Implementation

getParticleMaterial

public ConfigReference<MaterialConfig> getParticleMaterial(GlContext ctx)
Description copied from class: ModelConfig.Implementation
Returns a reference to the material to use when this model is selected for use within a particle system.

Overrides:
getParticleMaterial in class ModelConfig.Implementation


Copyright © 2011. All Rights Reserved.