com.threerings.stage.client
Class SceneColorizer

java.lang.Object
  extended by com.threerings.stage.client.SceneColorizer
All Implemented Interfaces:
com.threerings.media.tile.TileSet.Colorizer

public class SceneColorizer
extends Object
implements com.threerings.media.tile.TileSet.Colorizer

Handles colorization of object tiles in a scene.


Field Summary
protected  com.threerings.media.tile.TileSet.Colorizer _aux
          An auxiliary colorizer which may temporarily return non-standard colorizations.
protected  Map<String,int[]> _cids
          Contains our colorization class information.
protected  com.threerings.media.image.ColorPository _cpos
          The entity from which we obtain colorization info.
protected  StageScene _scene
          The scene for which we're providing zations.
 
Constructor Summary
SceneColorizer(com.threerings.media.image.ColorPository cpos, StageScene scene)
          Creates a scene colorizer for the supplied scene.
 
Method Summary
 int getColorId(String zation)
          Get the colorId to use for the specified colorization.
 com.threerings.media.image.Colorization getColorization(int index, String zation)
           
 com.threerings.media.tile.TileSet.Colorizer getColorizer(com.threerings.miso.data.ObjectInfo oinfo)
          Obtains a colorizer for the supplied scene object.
 void setAuxiliary(com.threerings.media.tile.TileSet.Colorizer aux)
          Set an auxiliary colorizer that overrides our colorizations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_aux

protected com.threerings.media.tile.TileSet.Colorizer _aux
An auxiliary colorizer which may temporarily return non-standard colorizations.


_cpos

protected com.threerings.media.image.ColorPository _cpos
The entity from which we obtain colorization info.


_scene

protected StageScene _scene
The scene for which we're providing zations.


_cids

protected Map<String,int[]> _cids
Contains our colorization class information.

Constructor Detail

SceneColorizer

public SceneColorizer(com.threerings.media.image.ColorPository cpos,
                      StageScene scene)
Creates a scene colorizer for the supplied scene.

Method Detail

setAuxiliary

public void setAuxiliary(com.threerings.media.tile.TileSet.Colorizer aux)
Set an auxiliary colorizer that overrides our colorizations.


getColorizer

public com.threerings.media.tile.TileSet.Colorizer getColorizer(com.threerings.miso.data.ObjectInfo oinfo)
Obtains a colorizer for the supplied scene object.


getColorization

public com.threerings.media.image.Colorization getColorization(int index,
                                                               String zation)
Specified by:
getColorization in interface com.threerings.media.tile.TileSet.Colorizer

getColorId

public int getColorId(String zation)
Get the colorId to use for the specified colorization.