com.threerings.tudey.server.logic
Class TargetLogic.DistanceSubset

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.TargetLogic
              extended by com.threerings.tudey.server.logic.TargetLogic.Subset
                  extended by com.threerings.tudey.server.logic.TargetLogic.DistanceSubset
All Implemented Interfaces:
Comparator<Logic>
Direct Known Subclasses:
TargetLogic.FarthestSubset, TargetLogic.NearestSubset
Enclosing class:
TargetLogic

public abstract static class TargetLogic.DistanceSubset
extends TargetLogic.Subset
implements Comparator<Logic>

Superclass of the distance-based subsets.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.TargetLogic
TargetLogic.Activator, TargetLogic.ActivatorOf, TargetLogic.Behavior, TargetLogic.Compound, TargetLogic.Conditional, TargetLogic.DistanceSubset, TargetLogic.Excluding, TargetLogic.FarthestSubset, TargetLogic.InstanceOf, TargetLogic.Intersecting, TargetLogic.NearestSubset, TargetLogic.Randomized, TargetLogic.RandomSubset, TargetLogic.Source, TargetLogic.Subset, TargetLogic.Tagged
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Field Summary
protected  TargetLogic _location
          The reference location.
protected  ArrayList<Logic> _locations
          Holds the locations during processing.
protected  Vector2f _reference
          Holds the reference point.
 
Fields inherited from class com.threerings.tudey.server.logic.TargetLogic.Subset
_target, _targets
 
Fields inherited from class com.threerings.tudey.server.logic.TargetLogic
_config, _source
 
Fields inherited from class com.threerings.tudey.server.logic.Logic
_scenemgr, _variables
 
Constructor Summary
TargetLogic.DistanceSubset()
           
 
Method Summary
protected  void didInit()
          Override to perform custom initialization.
protected  void selectSubset(int size, Logic activator, Collection<Logic> results)
          Selects a subset of the specified size and places the objects in the results.
 void transfer(Logic source, Map<Object,Object> refs)
          Transfers state from the specified source logic.
 
Methods inherited from class com.threerings.tudey.server.logic.TargetLogic.Subset
resolve
 
Methods inherited from class com.threerings.tudey.server.logic.TargetLogic
getEntityKey, getRotation, getTranslation, init, isActive
 
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
 
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
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Field Detail

_location

protected TargetLogic _location
The reference location.


_locations

protected ArrayList<Logic> _locations
Holds the locations during processing.


_reference

protected Vector2f _reference
Holds the reference point.

Constructor Detail

TargetLogic.DistanceSubset

public TargetLogic.DistanceSubset()
Method Detail

didInit

protected void didInit()
Description copied from class: TargetLogic
Override to perform custom initialization.

Overrides:
didInit in class TargetLogic.Subset

transfer

public void transfer(Logic source,
                     Map<Object,Object> refs)
Description copied from class: Logic
Transfers state from the specified source logic. Where relevant, this also takes the place of addition/startup notification.

Overrides:
transfer in class TargetLogic.Subset

selectSubset

protected void selectSubset(int size,
                            Logic activator,
                            Collection<Logic> results)
Description copied from class: TargetLogic.Subset
Selects a subset of the specified size and places the objects in the results.

Specified by:
selectSubset in class TargetLogic.Subset