com.threerings.stage.data
Class StageMisoSceneModel

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.miso.data.MisoSceneModel
          extended by com.threerings.miso.data.SparseMisoSceneModel
              extended by com.threerings.stage.data.StageMisoSceneModel
All Implemented Interfaces:
Streamable, AuxModel, Cloneable

public class StageMisoSceneModel
extends com.threerings.miso.data.SparseMisoSceneModel
implements AuxModel

Extends the SparseMisoSceneModel with the necessary interface to wire it up to the Whirled auxiliary model system.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.miso.data.SparseMisoSceneModel
com.threerings.miso.data.SparseMisoSceneModel.ObjectVisitor, com.threerings.miso.data.SparseMisoSceneModel.Section
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
static int SECTION_HEIGHT
          The height (in tiles) of a scene section.
static int SECTION_WIDTH
          The width (in tiles) of a scene section.
 
Fields inherited from class com.threerings.miso.data.SparseMisoSceneModel
_sections, defTileSet, sheight, swidth
 
Constructor Summary
StageMisoSceneModel()
          Creates a completely uninitialized scene model.
 
Method Summary
 StageMisoSceneModel clone()
          Creates a clone of this auxiliary model.
static StageMisoSceneModel getSceneModel(SceneModel model)
          Locates and returns the StageMisoSceneModel among the auxiliary scene models associated with the supplied scene model.
 com.threerings.miso.data.SparseMisoSceneModel.Section getSection(int key)
          Returns the section identified by the specified key, or null if no section exists for that key.
 int getSectionKey(int x, int y)
          Returns the section key for the specified tile coordinate.
 
Methods inherited from class com.threerings.miso.data.SparseMisoSceneModel
addObject, getAllObjects, getBaseTileId, getDefaultBaseTileSet, getInterestingObjects, getObjects, getSection, getSections, key, readField__sections, removeObject, setBaseTile, setDefaultBaseTileSet, setSection, toString, updateObject, visitObjects, visitObjects, writeField__sections
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECTION_WIDTH

public static final int SECTION_WIDTH
The width (in tiles) of a scene section.

See Also:
Constant Field Values

SECTION_HEIGHT

public static final int SECTION_HEIGHT
The height (in tiles) of a scene section.

See Also:
Constant Field Values
Constructor Detail

StageMisoSceneModel

public StageMisoSceneModel()
Creates a completely uninitialized scene model.

Method Detail

getSceneModel

public static StageMisoSceneModel getSceneModel(SceneModel model)
Locates and returns the StageMisoSceneModel among the auxiliary scene models associated with the supplied scene model. null is returned if no miso scene model could be found.


getSectionKey

public int getSectionKey(int x,
                         int y)
Returns the section key for the specified tile coordinate.


getSection

public com.threerings.miso.data.SparseMisoSceneModel.Section getSection(int key)
Returns the section identified by the specified key, or null if no section exists for that key.


clone

public StageMisoSceneModel clone()
Description copied from interface: AuxModel
Creates a clone of this auxiliary model.

Specified by:
clone in interface AuxModel
Overrides:
clone in class com.threerings.miso.data.SparseMisoSceneModel