fr.lifl.jedi.model.halo
Class PhysicalHaloBasedOnArea

java.lang.Object
  extended by fr.lifl.jedi.model.halo.PhysicalHaloBasedOnArea
All Implemented Interfaces:
PhysicalHalo

public class PhysicalHaloBasedOnArea
extends java.lang.Object
implements PhysicalHalo

This class represents the physical halo of an agent (a ground surface in which other agents are perceived) based on the Area java class.

Version:
JEDI V 2.3
Created the 10 juin 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Constructor Summary
PhysicalHaloBasedOnArea(java.awt.geom.Area a)
          Constructor of the physical halo of an agent (a ground surface in which other agents are perceived), where the surface is represented by an instance of the Area java class.
 
Method Summary
 void perceive(Environment env, Agent source, java.util.Set<Agent> perceivedAgents)
          This method retrieves from the environment all agents that lie in the ground surface represented by this class.
 void rotate(double angle)
          This method rotates the perceived ground surface according to the direction of the halo's owner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhysicalHaloBasedOnArea

public PhysicalHaloBasedOnArea(java.awt.geom.Area a)
Constructor of the physical halo of an agent (a ground surface in which other agents are perceived), where the surface is represented by an instance of the Area java class.

Parameters:
a - The object that represents the ground surface.
Method Detail

perceive

public void perceive(Environment env,
                     Agent source,
                     java.util.Set<Agent> perceivedAgents)
Description copied from interface: PhysicalHalo
This method retrieves from the environment all agents that lie in the ground surface represented by this class.

Specified by:
perceive in interface PhysicalHalo
Parameters:
env - The environment where agents are perceived.
source - The agent that perceives thanks to this halo.
perceivedAgents - The list where perceived agents are added.
See Also:
PhysicalHalo.perceive(fr.lifl.jedi.model.Environment, fr.lifl.jedi.model.Agent, java.util.Set)

rotate

public void rotate(double angle)
Description copied from interface: PhysicalHalo
This method rotates the perceived ground surface according to the direction of the halo's owner.

Specified by:
rotate in interface PhysicalHalo
Parameters:
angle - The angle from which the owner of the halo turns.
See Also:
PhysicalHalo.rotate(double)