Class DefaultVisionGenerator
- java.lang.Object
-
- jadex.commons.SimplePropertyObject
-
- jadex.extension.envsupport.environment.space3d.DefaultVisionGenerator
-
- All Implemented Interfaces:
IPropertyObject
,IEnvironmentListener
,IPerceptGenerator
public class DefaultVisionGenerator extends SimplePropertyObject implements IPerceptGenerator
Percept generator for moving components.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map
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.-
Fields inherited from class jadex.commons.SimplePropertyObject
pcs, properties
-
-
Constructor Summary
Constructors Constructor Description DefaultVisionGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
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.-
Methods inherited from class jadex.commons.SimplePropertyObject
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
-
-
-
-
Field Detail
-
PROPERTY_MAXRANGE
public static final java.lang.String PROPERTY_MAXRANGE
The maxrange property.- See Also:
- Constant Field Values
-
PROPERTY_RANGE
public static final java.lang.String PROPERTY_RANGE
The maxrange property.- See Also:
- Constant Field Values
-
PROPERTY_PERCEPTTYPES
public static final java.lang.String PROPERTY_PERCEPTTYPES
The percept types property.- See Also:
- Constant Field Values
-
APPEARED
public static final java.lang.String APPEARED
The appeared percept type.- See Also:
- Constant Field Values
-
DISAPPEARED
public static final java.lang.String DISAPPEARED
The disappeared percept type.- See Also:
- Constant Field Values
-
CREATED
public static final java.lang.String CREATED
The created percept type.- See Also:
- Constant Field Values
-
DESTROYED
public static final java.lang.String DESTROYED
The destroyed percept type.- See Also:
- Constant Field Values
-
MOVED
public static final java.lang.String MOVED
The moved percept type.- See Also:
- Constant Field Values
-
EMPTY_SPACEOBJECTS
protected static final ISpaceObject[] EMPTY_SPACEOBJECTS
Empty spaceobjects array.
-
actiontypes
protected java.util.Map actiontypes
The percept receiving component types.
-
-
Method Detail
-
componentAdded
public void componentAdded(IComponentDescription component, IEnvironmentSpace space)
Called when an component was added to the space.- Specified by:
componentAdded
in interfaceIPerceptGenerator
- Parameters:
component
- The component identifier.space
- The space.
-
componentRemoved
public void componentRemoved(IComponentDescription component, IEnvironmentSpace space)
Called when an component was remove from the space.- Specified by:
componentRemoved
in interfaceIPerceptGenerator
- Parameters:
component
- The component identifier.space
- The space.
-
dispatchEnvironmentEvent
public void dispatchEnvironmentEvent(EnvironmentEvent event)
Dispatch an environment event to this listener.- Specified by:
dispatchEnvironmentEvent
in interfaceIEnvironmentListener
- Parameters:
event
- The event.
-
getPerceptType
protected java.lang.String getPerceptType(IEnvironmentSpace space, java.lang.String componenttype, java.lang.String objecttype, java.lang.String actiontype)
Get the percept type.- Parameters:
space
- The space.componenttype
- The component type.objecttype
- The object type.actiontype
- The action type.- Returns:
- The matching percept.
-
getActionTypes
protected java.util.Set getActionTypes(PerceptType pt)
Get the action types for a percept.- Parameters:
pt
- The percept type.
-
getPerceptTypes
protected java.lang.Object[] getPerceptTypes()
Get the percept types defined for this generator.- Returns:
- The percept types.
-
getRange
protected IVector1 getRange(ISpaceObject avatar)
Get the range.- Returns:
- The range.
-
getDefaultRange
protected IVector1 getDefaultRange()
Get the default range.- Returns:
- The range.
-
getRangePropertyName
protected java.lang.String getRangePropertyName()
Get the range property name.- Returns:
- The range property name.
-
-