Package | Description |
---|---|
simkit.smdx |
Contains basic classes to represent the entities in a combat simulation.
|
simkit.smdx.animate | |
simkit.smdx.test |
Modifier and Type | Class and Description |
---|---|
class |
CookieCutterSensor
Models a Cookie Cutter Sensor.
|
Modifier and Type | Field and Description |
---|---|
private java.util.WeakHashMap<java.lang.Class<? extends Sensor>,java.util.Map<java.lang.Class<? extends Moveable>,SensorTargetMediator>> |
SensorTargetMediatorFactory.cache
Holds the Mediators that have been added to this factory, key by Sensor
and Moveable (target)
|
protected java.util.Map<Sensor,java.util.Map<Mover,java.lang.Boolean>> |
SensorTargetReferee.inRangeMap
Indicates whether the Mover is in range of the Sensor.
|
protected java.util.Set<Sensor> |
SensorTargetReferee.sensors
Holds the Sensors registered with this referee.
|
protected MediatorFactory<Sensor,Moveable,SensorTargetMediator> |
SensorTargetReferee.sensorTargetMediatorFactory
Holds the instance of the SensorTargetMediatorFactory.
|
Modifier and Type | Method and Description |
---|---|
static MediatorFactory<Sensor,Moveable,SensorTargetMediator> |
SensorTargetMediatorFactory.getInstance() |
java.util.Map<java.lang.Class<? extends Sensor>,java.util.Map<java.lang.Class<? extends Moveable>,SensorTargetMediator>> |
SensorTargetMediatorFactory.getMediators()
Returns a copy of the HashMap of Mediators that have been added to this
MediatorFactory.
|
java.util.Set<Sensor> |
SensorTargetReferee.getSensors() |
Modifier and Type | Method and Description |
---|---|
void |
SensorTargetMediatorFactory.addMediatorFor(Sensor sensor,
Moveable target,
SensorTargetMediator mediatorInstance) |
void |
SensorTargetReferee.doEndMove(Sensor sensor)
Does nothing.
|
void |
CookieCutterMediator.doEnterRange(Sensor sensor,
Mover target)
When this event is heard, schedules a Detection event for the Sensor
immediately using a
Contact object supplied by the subclass. |
void |
SensorTargetMediator.doEnterRange(Sensor sensor,
Mover target)
When this event is heard, schedules a Detection event for the Sensor
based on the detection algorithm of the implementing class.
|
void |
SensorTargetReferee.doEnterRange(Sensor sensor,
Mover target)
Schedules ExitRange for when the Mover leaves the detection volume of the
Sensor.
|
void |
CookieCutterMediator.doExitRange(Sensor sensor,
Mover target)
When the range is exited schedules the Undetection event for the
Sensor immediately.
|
void |
SensorTargetMediator.doExitRange(Sensor sensor,
Mover target)
When this event is heard, schedules an Undetection event for the Sensor
based on the detection algorithm of the implementing class.
|
void |
SensorTargetReferee.doExitRange(Sensor sensor,
Mover target)
Sets the in range state of the pair to false.
|
void |
SensorTargetReferee.doStartMove(Sensor sensor)
Does nothing.
|
double |
SensorTargetReferee.findIntersectionTime(Sensor sensor,
Mover target)
Finds the next time the Mover intersects the detection volume of the
Sensor.
|
protected Contact |
CookieCutterMediator.getContactForEnterRangeEvent(Sensor sensor,
Mover target)
This hook method must be implemented by subclasses to return a
Contact object for the given sensor-target pairing. |
Mediator |
SensorTargetMediatorFactory.getMeditorFor(Sensor first,
Moveable second)
Gets the Mediator for the given Sensor and Moveable (target)
|
protected void |
SensorTargetReferee.processSensor(Sensor sensor)
Recalculates the detection windows for the given Sensor.
|
protected void |
CookieCutterMediator.targetIsEnteringSensorRange(Sensor sensor,
Mover target)
Optional hook method that is invoked upon hearing a
EnterRange
event. |
protected void |
CookieCutterMediator.targetIsExitingSensorRange(Sensor sensor,
Mover target)
Optional hook method that is invoked upon hearing a
ExitRange
event. |
Modifier and Type | Method and Description |
---|---|
static void |
SensorTargetMediatorFactory.addMediator(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Moveable> targetClass,
java.lang.Class<? extends SensorTargetMediator> mediatorClass)
Constructs and adds a Mediator to the MediatorFactory.
|
static void |
SensorTargetMediatorFactory.addMediator(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Moveable> targetClass,
SensorTargetMediator mediatorInstance) |
void |
SensorTargetMediatorFactory.addMediatorFor(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Moveable> targetClass,
java.lang.Class<? extends SensorTargetMediator> mediatorClass)
Constructs and adds a Mediator to this MediatorFactory.
|
<S extends SensorTargetMediator> |
SensorTargetMediatorFactory.addMediatorFor(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Moveable> targetClass,
S mediatorInstance) |
static Mediator |
SensorTargetMediatorFactory.getMediator(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Mover> targetClass) |
Mediator |
SensorTargetMediatorFactory.getMediatorFor(java.lang.Class<? extends Sensor> sensorClass,
java.lang.Class<? extends Moveable> targetClass)
Gets the Mediator for the given Sensor Class and Moveable Class.
|
Modifier and Type | Field and Description |
---|---|
private Sensor |
SensorIcon.sensor |
Modifier and Type | Method and Description |
---|---|
Sensor |
SensorIcon.getSensor() |
Modifier and Type | Method and Description |
---|---|
void |
SandboxFrame.addSensor(Sensor sensor) |
void |
SandboxFrame.addSensor(Sensor sensor,
java.awt.Color color) |
void |
SensorIcon.setSensor(Sensor s) |
Constructor and Description |
---|
SensorIcon(Sensor sensor)
Creates a new instance of SensorIcon
|
SensorIcon(Sensor sensor,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
protected Contact |
TestSensorTargetReferee.TestMediator.getContactForEnterRangeEvent(Sensor sensor,
Mover target) |
protected void |
TestSensorTargetReferee.TestMediator.targetIsEnteringSensorRange(Sensor sensor,
Mover target) |
protected void |
TestSensorTargetReferee.TestMediator.targetIsExitingSensorRange(Sensor sensor,
Mover target) |