com.threerings.tudey.client.util
Class SceneMap

java.lang.Object
  extended by com.threerings.tudey.client.util.SceneMap
All Implemented Interfaces:
com.threerings.crowd.client.PlaceView, TudeySceneModel.Observer

public class SceneMap
extends Object
implements com.threerings.crowd.client.PlaceView, TudeySceneModel.Observer

Maintains a simple map of the scene than can be rendered to the UI.


Constructor Summary
SceneMap(TudeyContext ctx, TudeySceneView view)
          Creates a new scene map.
 
Method Summary
 void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
           
 void entryAdded(TudeySceneModel.Entry entry)
          Notes that an entry has been added to the scene.
 void entryRemoved(TudeySceneModel.Entry oentry)
          Notes that an entry has been removed from the scene.
 void entryUpdated(TudeySceneModel.Entry oentry, TudeySceneModel.Entry nentry)
          Notes that an entry has been updated within the scene.
 void render(float sx, float sy, float swidth, float sheight, int tx, int ty, int twidth, int theight, float alpha, Image mask)
          Renders a section of the map.
 void setColors(Color4f floor, Color4f wall)
          Sets the colors to use to represent floors and walls.
 void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneMap

public SceneMap(TudeyContext ctx,
                TudeySceneView view)
Creates a new scene map.

Method Detail

setColors

public void setColors(Color4f floor,
                      Color4f wall)
Sets the colors to use to represent floors and walls.


render

public void render(float sx,
                   float sy,
                   float swidth,
                   float sheight,
                   int tx,
                   int ty,
                   int twidth,
                   int theight,
                   float alpha,
                   Image mask)
Renders a section of the map.


willEnterPlace

public void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
Specified by:
willEnterPlace in interface com.threerings.crowd.client.PlaceView

didLeavePlace

public void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
Specified by:
didLeavePlace in interface com.threerings.crowd.client.PlaceView

entryAdded

public void entryAdded(TudeySceneModel.Entry entry)
Description copied from interface: TudeySceneModel.Observer
Notes that an entry has been added to the scene.

Specified by:
entryAdded in interface TudeySceneModel.Observer

entryUpdated

public void entryUpdated(TudeySceneModel.Entry oentry,
                         TudeySceneModel.Entry nentry)
Description copied from interface: TudeySceneModel.Observer
Notes that an entry has been updated within the scene.

Specified by:
entryUpdated in interface TudeySceneModel.Observer

entryRemoved

public void entryRemoved(TudeySceneModel.Entry oentry)
Description copied from interface: TudeySceneModel.Observer
Notes that an entry has been removed from the scene.

Specified by:
entryRemoved in interface TudeySceneModel.Observer


Copyright © 2011. All Rights Reserved.