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.MapactiontypesThe percept receiving component types.static java.lang.StringAPPEAREDThe appeared percept type.static java.lang.StringCREATEDThe created percept type.static java.lang.StringDESTROYEDThe destroyed percept type.static java.lang.StringDISAPPEAREDThe disappeared percept type.protected static ISpaceObject[]EMPTY_SPACEOBJECTSEmpty spaceobjects array.static java.lang.StringMOVEDThe moved percept type.static java.lang.StringPROPERTY_MAXRANGEThe maxrange property.static java.lang.StringPROPERTY_PERCEPTTYPESThe percept types property.static java.lang.StringPROPERTY_RANGEThe 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 voidcomponentAdded(IComponentDescription component, IEnvironmentSpace space)Called when an component was added to the space.voidcomponentRemoved(IComponentDescription component, IEnvironmentSpace space)Called when an component was remove from the space.voiddispatchEnvironmentEvent(EnvironmentEvent event)Dispatch an environment event to this listener.protected java.util.SetgetActionTypes(PerceptType pt)Get the action types for a percept.protected IVector1getDefaultRange()Get the default range.protected java.lang.StringgetPerceptType(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 IVector1getRange(ISpaceObject avatar)Get the range.protected java.lang.StringgetRangePropertyName()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:
componentAddedin 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:
componentRemovedin interfaceIPerceptGenerator- Parameters:
component- The component identifier.space- The space.
-
dispatchEnvironmentEvent
public void dispatchEnvironmentEvent(EnvironmentEvent event)
Dispatch an environment event to this listener.- Specified by:
dispatchEnvironmentEventin 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.
-
-