com.threerings.tudey.server.logic
Class RegionLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.RegionLogic
Direct Known Subclasses:
RegionLogic.Fixed, RegionLogic.Located

public abstract class RegionLogic
extends Logic

Handles the resolution of regions.


Nested Class Summary
static class RegionLogic.Default
          Handles a normal region.
static class RegionLogic.Fixed
          Handles a fixed (world space) region.
static class RegionLogic.Located
          Base class for located regions.
static class RegionLogic.Transformed
          Handles an explicit, transformed region.
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Field Summary
protected  RegionConfig _config
          The region configuration.
protected  Logic _source
          The action source.
 
Fields inherited from class com.threerings.tudey.server.logic.Logic
_scenemgr, _variables
 
Constructor Summary
RegionLogic()
           
 
Method Summary
protected  void didInit()
          Override to perform custom initialization.
 EntityKey getEntityKey()
          Returns the entity key for this logic, if any.
 float getRotation()
          Returns the rotation of this logic for the purpose of spawning actors, etc.
 Vector2f getTranslation()
          Returns the translation of this logic for the purpose of spawning actors, etc.
 void init(TudeySceneManager scenemgr, RegionConfig config, Logic source)
          Initializes the logic.
 boolean isActive()
          Determines whether this logic object is still active in the scene.
abstract  void resolve(Logic activator, Collection<Shape> results)
          Resolves the region into a collection of shapes.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, createAction, createCondition, createExpression, createHandler, createRegion, createTarget, getModel, getPatrolPath, getSceneManager, getShape, getTags, getTransform, getTransform, getVariable, init, isDefaultEntrance, isVisible, removeShapeObserver, request, resolveTarget, setVariable, signal, transfer
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_config

protected RegionConfig _config
The region configuration.


_source

protected Logic _source
The action source.

Constructor Detail

RegionLogic

public RegionLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 RegionConfig config,
                 Logic source)
Initializes the logic.


resolve

public abstract void resolve(Logic activator,
                             Collection<Shape> results)
Resolves the region into a collection of shapes.


isActive

public boolean isActive()
Description copied from class: Logic
Determines whether this logic object is still active in the scene.

Overrides:
isActive in class Logic

getEntityKey

public EntityKey getEntityKey()
Description copied from class: Logic
Returns the entity key for this logic, if any.

Overrides:
getEntityKey in class Logic

getTranslation

public Vector2f getTranslation()
Description copied from class: Logic
Returns the translation of this logic for the purpose of spawning actors, etc.

Overrides:
getTranslation in class Logic

getRotation

public float getRotation()
Description copied from class: Logic
Returns the rotation of this logic for the purpose of spawning actors, etc.

Overrides:
getRotation in class Logic

didInit

protected void didInit()
Override to perform custom initialization.