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

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

public static class PathSprite.Original
extends PathSprite.Implementation

An original implementation.


Field Summary
protected  ColorState _colorState
          The shared color state.
protected  TudeyContext _ctx
          The renderer context.
protected  Model[] _edges
          The models representing the edges.
protected  ShapeSceneElement _footprint
          The footprint.
protected  Scene _scene
          The scene to which we add our models/footprint.
protected  Model[] _vertices
          The models representing the vertices.
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
PathSprite.Original(TudeyContext ctx, Scope parentScope, PathConfig.Original config)
          Creates a new implementation.
 
Method Summary
 void dispose()
          Releases the resources associated with this scope.
 int getEdgeIndex(Model model)
          Returns the index of the specified model within the list of edge models, or -1 if it is not an edge.
 int getVertexIndex(Model model)
          Returns the index of the specified model within the list of vertex models, or -1 if it is not a vertex.
 void setConfig(PathConfig.Original config)
          (Re)configures the implementation.
 void setVisible(boolean visible)
          Update the visibility.
 void update(TudeySceneModel.PathEntry entry)
          Updates the implementation to match the path state.
 
Methods inherited from class com.threerings.tudey.client.sprite.PathSprite.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.


_vertices

protected Model[] _vertices
The models representing the vertices.


_edges

protected Model[] _edges
The models representing the edges.


_colorState

protected ColorState _colorState
The shared color state.


_footprint

protected ShapeSceneElement _footprint
The footprint.


_scene

@Bound
protected Scene _scene
The scene to which we add our models/footprint.

Constructor Detail

PathSprite.Original

public PathSprite.Original(TudeyContext ctx,
                           Scope parentScope,
                           PathConfig.Original config)
Creates a new implementation.

Method Detail

setConfig

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


getVertexIndex

public int getVertexIndex(Model model)
Description copied from class: PathSprite.Implementation
Returns the index of the specified model within the list of vertex models, or -1 if it is not a vertex.

Overrides:
getVertexIndex in class PathSprite.Implementation

getEdgeIndex

public int getEdgeIndex(Model model)
Description copied from class: PathSprite.Implementation
Returns the index of the specified model within the list of edge models, or -1 if it is not an edge.

Overrides:
getEdgeIndex in class PathSprite.Implementation

update

public void update(TudeySceneModel.PathEntry entry)
Description copied from class: PathSprite.Implementation
Updates the implementation to match the path state.

Overrides:
update in class PathSprite.Implementation

setVisible

public void setVisible(boolean visible)
Description copied from class: PathSprite.Implementation
Update the visibility.

Overrides:
setVisible in class PathSprite.Implementation

dispose

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

Overrides:
dispose in class SimpleScope