com.threerings.tudey.data
Class TudeySceneModel.Entry

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.data.TudeySceneModel.Entry
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
TudeySceneModel.IdEntry, TudeySceneModel.TileEntry
Enclosing class:
TudeySceneModel

public abstract static class TudeySceneModel.Entry
extends DeepObject
implements Exportable

An entry in the scene.


Constructor Summary
TudeySceneModel.Entry()
           
 
Method Summary
 EntryCursor createCursor(TudeyContext ctx, TudeySceneView view)
          Creates a cursor for this entry (or returns null for none).
 SpaceElement createElement(ConfigManager cfgmgr)
          Creates the space element for this entry (or returns null for none).
 Vector2f[] createPatrolPath(Shape shape)
          Creates the patrol path for this entry, or returns null for none.
 Shape createShape(ConfigManager cfgmgr)
          Creates the shape for this entry, or returns null for none.
abstract  EntrySprite createSprite(TudeyContext ctx, TudeySceneView view)
          Creates a sprite for this entry.
 void getBounds(ConfigManager cfgmgr, Rect result)
          Finds the bounds of the entry.
 int getCollisionFlags(ConfigManager cfgmgr)
          Returns the entry's collision flags.
 int getElevation()
          Returns the elevation of the entry, or Integer.MIN_VALUE for none.
abstract  HandlerConfig[] getHandlers(ConfigManager cfgmgr)
          Returns the entry's handler configs, if any.
abstract  Object getKey()
          Returns the key for this entry.
abstract  String getLogicClassName(ConfigManager cfgmgr)
          Returns the name of the server-side logic class to use for the entry, or null for none.
 ConfigReference<ModelConfig> getModel(ConfigManager cfgmgr)
          Returns a reference to the model associated with the entry, if any.
abstract  void getPreloads(ConfigManager cfgmgr, PreloadableSet preloads)
          Adds the resources to preload for this entry to the supplied set.
abstract  ConfigReference getReference()
          Returns a reference to this entry's config reference.
 float getRotation(ConfigManager cfgmgr)
          Returns the entry's approximate rotation.
abstract  String[] getTags(ConfigManager cfgmgr)
          Returns the entry's tags, if any.
 Vector2f getTranslation(ConfigManager cfgmgr)
          Returns the entry's approximate translation.
 boolean isDefaultEntrance(ConfigManager cfgmgr)
          Determines whether the entry represents a default entrance.
abstract  boolean isValid(ConfigManager cfgmgr)
          Determines whether this entry has a valid configuration.
abstract  void setReference(ConfigReference reference)
          Sets this entry's config reference.
 void transform(ConfigManager cfgmgr, Transform3D xform)
          Transforms the entry.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TudeySceneModel.Entry

public TudeySceneModel.Entry()
Method Detail

getKey

public abstract Object getKey()
Returns the key for this entry.


setReference

public abstract void setReference(ConfigReference reference)
Sets this entry's config reference.


getReference

public abstract ConfigReference getReference()
Returns a reference to this entry's config reference.


isValid

public abstract boolean isValid(ConfigManager cfgmgr)
Determines whether this entry has a valid configuration.


getElevation

public int getElevation()
Returns the elevation of the entry, or Integer.MIN_VALUE for none.


getBounds

public void getBounds(ConfigManager cfgmgr,
                      Rect result)
Finds the bounds of the entry.


getCollisionFlags

public int getCollisionFlags(ConfigManager cfgmgr)
Returns the entry's collision flags.


getLogicClassName

public abstract String getLogicClassName(ConfigManager cfgmgr)
Returns the name of the server-side logic class to use for the entry, or null for none.


getTags

public abstract String[] getTags(ConfigManager cfgmgr)
Returns the entry's tags, if any.


getHandlers

public abstract HandlerConfig[] getHandlers(ConfigManager cfgmgr)
Returns the entry's handler configs, if any.


isDefaultEntrance

public boolean isDefaultEntrance(ConfigManager cfgmgr)
Determines whether the entry represents a default entrance.


getTranslation

public Vector2f getTranslation(ConfigManager cfgmgr)
Returns the entry's approximate translation.


getRotation

public float getRotation(ConfigManager cfgmgr)
Returns the entry's approximate rotation.


getModel

public ConfigReference<ModelConfig> getModel(ConfigManager cfgmgr)
Returns a reference to the model associated with the entry, if any.


createShape

public Shape createShape(ConfigManager cfgmgr)
Creates the shape for this entry, or returns null for none.


createPatrolPath

public Vector2f[] createPatrolPath(Shape shape)
Creates the patrol path for this entry, or returns null for none.


transform

public void transform(ConfigManager cfgmgr,
                      Transform3D xform)
Transforms the entry.


getPreloads

public abstract void getPreloads(ConfigManager cfgmgr,
                                 PreloadableSet preloads)
Adds the resources to preload for this entry to the supplied set.


createElement

public SpaceElement createElement(ConfigManager cfgmgr)
Creates the space element for this entry (or returns null for none).


createCursor

public EntryCursor createCursor(TudeyContext ctx,
                                TudeySceneView view)
Creates a cursor for this entry (or returns null for none).


createSprite

public abstract EntrySprite createSprite(TudeyContext ctx,
                                         TudeySceneView view)
Creates a sprite for this entry.



Copyright © 2011. All Rights Reserved.