fr.lifl.jedi.model.halo
Class CircularPhysicalHalo
java.lang.Object
fr.lifl.jedi.model.halo.CircularPhysicalHalo
- All Implemented Interfaces:
- PhysicalHalo
public class CircularPhysicalHalo
- extends java.lang.Object
- implements PhysicalHalo
This class represents the physical halo of an agent (a ground surface in which other agents are perceived),
where agents are perceived under a particular distance.
This class is separated from the PhysicalHaloBasedOnArea class for efficiency reasons.
- Version:
| JEDI V 2.3 |
| Created the 10 juin 2009 |
- Author:
|
Constructor Summary |
CircularPhysicalHalo(double distance)
Constructor of the physical halo of an agent (a ground surface in which other agents are perceived),
where agents are perceived under a particular distance. |
|
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 |
CircularPhysicalHalo
public CircularPhysicalHalo(double distance)
- Constructor of the physical halo of an agent (a ground surface in which other agents are perceived),
where agents are perceived under a particular distance.
- Parameters:
distance - the distance under which other agents are considered as perceived.
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(Environment, Agent, 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)