public class DefaultVisionGenerator extends SimplePropertyObject implements IPerceptGenerator
Modifier and Type | Field and Description |
---|---|
protected MultiCollection<java.lang.String,java.lang.String> |
actiontypes
The percept receiving component types.
|
static java.lang.String |
APPEARED
The appeared percept type.
|
static java.lang.String |
CREATED
The created percept type.
|
static java.lang.String |
DESTROYED
The destroyed percept type.
|
static java.lang.String |
DISAPPEARED
The disappeared percept type.
|
protected static ISpaceObject[] |
EMPTY_SPACEOBJECTS
Empty spaceobjects array.
|
static java.lang.String |
MOVED
The moved percept type.
|
static java.lang.String |
PROPERTY_MAXRANGE
The maxrange property.
|
static java.lang.String |
PROPERTY_PERCEPTTYPES
The percept types property.
|
static java.lang.String |
PROPERTY_RANGE
The maxrange property.
|
pcs, properties
Constructor and Description |
---|
DefaultVisionGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
componentAdded(IComponentDescription component,
IEnvironmentSpace space)
Called when an component was added to the space.
|
void |
componentRemoved(IComponentDescription component,
IEnvironmentSpace space)
Called when an component was remove from the space.
|
void |
dispatchEnvironmentEvent(EnvironmentEvent event)
Dispatch an environment event to this listener.
|
protected java.util.Set<java.lang.String> |
getActionTypes(PerceptType pt)
Get the action types for a percept.
|
protected IVector1 |
getDefaultRange()
Get the default range.
|
protected java.lang.String |
getPerceptType(IEnvironmentSpace space,
java.lang.String componenttype,
java.lang.String objecttype,
java.lang.String actiontype)
Get the percept type.
|
protected java.lang.Object[] |
getPerceptTypes()
Get the percept types defined for this generator.
|
protected IVector1 |
getRange(ISpaceObject avatar)
Get the range.
|
protected java.lang.String |
getRangePropertyName()
Get the range property name.
|
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProperty, getPropertyNames, hasProperty, setProperty
public static final java.lang.String PROPERTY_MAXRANGE
public static final java.lang.String PROPERTY_RANGE
public static final java.lang.String PROPERTY_PERCEPTTYPES
public static final java.lang.String APPEARED
public static final java.lang.String DISAPPEARED
public static final java.lang.String CREATED
public static final java.lang.String DESTROYED
public static final java.lang.String MOVED
protected static final ISpaceObject[] EMPTY_SPACEOBJECTS
protected MultiCollection<java.lang.String,java.lang.String> actiontypes
public void componentAdded(IComponentDescription component, IEnvironmentSpace space)
componentAdded
in interface IPerceptGenerator
component
- The component identifier.space
- The space.public void componentRemoved(IComponentDescription component, IEnvironmentSpace space)
componentRemoved
in interface IPerceptGenerator
component
- The component identifier.space
- The space.public void dispatchEnvironmentEvent(EnvironmentEvent event)
dispatchEnvironmentEvent
in interface IEnvironmentListener
event
- The event.protected java.lang.String getPerceptType(IEnvironmentSpace space, java.lang.String componenttype, java.lang.String objecttype, java.lang.String actiontype)
space
- The space.componenttype
- The component type.objecttype
- The object type.actiontype
- The action type.protected java.util.Set<java.lang.String> getActionTypes(PerceptType pt)
pt
- The percept type.protected java.lang.Object[] getPerceptTypes()
protected IVector1 getRange(ISpaceObject avatar)
protected IVector1 getDefaultRange()
protected java.lang.String getRangePropertyName()