com.threerings.stage.data
Class StageSceneModel

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.whirled.data.SceneModel
          extended by com.threerings.stage.data.StageSceneModel
All Implemented Interfaces:
Streamable, Cloneable

public class StageSceneModel
extends SceneModel

Extends the basic scene model with the notion of a scene type and incorporates the necessary auxiliary models used by the Stage system.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 StreamableHashMap<Integer,Integer> defaultColors
          If non-null, contains default colorizations to use for objects that do not have colorizations defined.
 String type
          This scene's type which is a string identifier used to later construct a specific controller to handle this scene.
static String WORLD
          A scene type code.
 int zoneId
          The zone id to which this scene belongs.
 
Fields inherited from class com.threerings.whirled.data.SceneModel
auxModels, name, sceneId, version
 
Constructor Summary
StageSceneModel()
           
 
Method Summary
static StageSceneModel blankStageSceneModel()
          Creates and returns a blank scene model.
 int getDefaultColor(int classId)
          Get the default color to use for the specified colorization classId, or -1 if no default is set for that colorization.
protected static void populateBlankStageSceneModel(StageSceneModel model)
          Populates a blank scene model with blank values.
 void setDefaultColor(int classId, int colorId)
          Set the default colorId to use for a specified colorization classId, or -1 to clear the default for that colorization.
 
Methods inherited from class com.threerings.whirled.data.SceneModel
addAuxModel, blankSceneModel, clone, populateBlankSceneModel
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WORLD

public static final String WORLD
A scene type code.

See Also:
Constant Field Values

type

public String type
This scene's type which is a string identifier used to later construct a specific controller to handle this scene.


zoneId

public int zoneId
The zone id to which this scene belongs.


defaultColors

public StreamableHashMap<Integer,Integer> defaultColors
If non-null, contains default colorizations to use for objects that do not have colorizations defined.

Constructor Detail

StageSceneModel

public StageSceneModel()
Method Detail

getDefaultColor

public int getDefaultColor(int classId)
Get the default color to use for the specified colorization classId, or -1 if no default is set for that colorization.


setDefaultColor

public void setDefaultColor(int classId,
                            int colorId)
Set the default colorId to use for a specified colorization classId, or -1 to clear the default for that colorization.


blankStageSceneModel

public static StageSceneModel blankStageSceneModel()
Creates and returns a blank scene model.


populateBlankStageSceneModel

protected static void populateBlankStageSceneModel(StageSceneModel model)
Populates a blank scene model with blank values.