com.threerings.tudey.client.sprite
Class TileSprite.Original

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.tudey.client.sprite.TileSprite.Implementation
          extended by com.threerings.tudey.client.sprite.TileSprite.Original
All Implemented Interfaces:
Scope, ScopeUpdateListener
Enclosing class:
TileSprite

public static class TileSprite.Original
extends TileSprite.Implementation

An original implementation.


Field Summary
protected  TileConfig.Original _config
          The tile configuration.
protected  TudeyContext _ctx
          The renderer context.
protected  RectangleElement _footprint
          The tile footprint.
protected  Transform3D _mergeTransform
          The transform under which we merged, if any.
protected  Model _model
          The model.
protected  Scene _scene
          The scene to which we add our model.
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
TileSprite.Original(TudeyContext ctx, Scope parentScope, TileConfig.Original config)
          Creates a new implementation.
 
Method Summary
 void dispose()
          Releases the resources associated with this scope.
 int getFloorFlags()
          Returns the sprite's floor flags.
 Model getModel()
          Returns the model for this implementation, or null for none.
protected  boolean maybeMerge()
          Merges the model if appropriate.
protected  boolean maybeUnmerge()
          Unmerges the model if previously merged.
 void setConfig(TileConfig.Original config)
          (Re)configures the implementation.
 void update(TudeySceneModel.TileEntry entry)
          Updates the implementation to match the tile state.
protected  void updateModel(TudeySceneModel.TileEntry entry)
          Ensures that the model is added to the scene and up-to-date.
 
Methods inherited from class com.threerings.tudey.client.sprite.TileSprite.Implementation
getScopeName
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected TudeyContext _ctx
The renderer context.


_config

protected TileConfig.Original _config
The tile configuration.


_model

protected Model _model
The model.


_footprint

protected RectangleElement _footprint
The tile footprint.


_mergeTransform

protected Transform3D _mergeTransform
The transform under which we merged, if any.


_scene

@Bound
protected Scene _scene
The scene to which we add our model.

Constructor Detail

TileSprite.Original

public TileSprite.Original(TudeyContext ctx,
                           Scope parentScope,
                           TileConfig.Original config)
Creates a new implementation.

Method Detail

setConfig

public void setConfig(TileConfig.Original config)
(Re)configures the implementation.


getModel

public Model getModel()
Description copied from class: TileSprite.Implementation
Returns the model for this implementation, or null for none.

Overrides:
getModel in class TileSprite.Implementation

getFloorFlags

public int getFloorFlags()
Description copied from class: TileSprite.Implementation
Returns the sprite's floor flags.

Overrides:
getFloorFlags in class TileSprite.Implementation

update

public void update(TudeySceneModel.TileEntry entry)
Description copied from class: TileSprite.Implementation
Updates the implementation to match the tile state.

Overrides:
update in class TileSprite.Implementation

dispose

public void dispose()
Description copied from class: SimpleScope
Releases the resources associated with this scope.

Overrides:
dispose in class SimpleScope

updateModel

protected void updateModel(TudeySceneModel.TileEntry entry)
Ensures that the model is added to the scene and up-to-date.


maybeMerge

protected boolean maybeMerge()
Merges the model if appropriate.


maybeUnmerge

protected boolean maybeUnmerge()
Unmerges the model if previously merged.