crowdmodel.environment
Class Area

java.lang.Object
  extended by crowdmodel.environment.Area

public class Area
extends java.lang.Object

Describes certain scenario specific areas on a physical terrain in the world An area represents a set of cellObjects/gridCells that cover a part of the environmental space

Author:
Nanda Wijermans

Field Summary
(package private)  java.awt.Polygon d_areaPolygon
           
(package private)  repast.simphony.context.Context d_context
           
(package private)  java.lang.String d_name
           
(package private)  java.util.Vector<repast.simphony.space.continuous.NdPoint> d_pois
           
(package private)  boolean d_walkable
           
(package private)  int d_xmax
           
(package private)  int d_xmin
           
(package private)  int d_ymax
           
(package private)  int d_ymin
           
 
Constructor Summary
Area(repast.simphony.context.Context context, java.lang.String name, java.awt.Polygon areaPolygon, boolean walkable)
          Constructor of Area Area defines parts of the world with a specific attribute in terms of walkability and name (which has a semantic given a scenario) Festival scenario areas: stage, bar and toilet
 
Method Summary
 void addPoi(repast.simphony.space.continuous.NdPoint poi)
          Adds a point of interest (poi) to collection of pois for this specific type of area
 void createPois()
          Creates a bar of points of interest This is used for the festival scenario for the stage
 java.lang.String getName()
          Returns the name-label of this area
 java.util.Vector<repast.simphony.space.continuous.NdPoint> getPoi()
          Returns point(s) of interest (pois) of this area
 boolean getWalkable()
          Returns the walkability of this area
private  void setArea()
          setArea really sets a part of a grid as walkable or non-walkable changes those cells that are (festival) area cells.
 void setCell(CellObject cell)
          Sets every cell belonging to that Area by defining the name, walkability and value in valueLayer (for visualisation purposes)
 void setPOIs()
          Sets the point-of-interest (POIs) by changing the name of the cell object representing an environmenttype (type area (terrain, stage, toilet,bar and poi))
 void setWalkable(boolean walkable)
          Sets the walkability of this area
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d_context

repast.simphony.context.Context d_context

d_name

java.lang.String d_name

d_walkable

boolean d_walkable

d_areaPolygon

java.awt.Polygon d_areaPolygon

d_xmin

int d_xmin

d_ymin

int d_ymin

d_xmax

int d_xmax

d_ymax

int d_ymax

d_pois

java.util.Vector<repast.simphony.space.continuous.NdPoint> d_pois
Constructor Detail

Area

public Area(repast.simphony.context.Context context,
            java.lang.String name,
            java.awt.Polygon areaPolygon,
            boolean walkable)
Constructor of Area Area defines parts of the world with a specific attribute in terms of walkability and name (which has a semantic given a scenario) Festival scenario areas: stage, bar and toilet

Method Detail

setArea

private void setArea()
setArea really sets a part of a grid as walkable or non-walkable changes those cells that are (festival) area cells. This information is also used to update the valueLayer 'terrain' to visualise the terrain on the screen


setPOIs

public void setPOIs()
Sets the point-of-interest (POIs) by changing the name of the cell object representing an environmenttype (type area (terrain, stage, toilet,bar and poi))


setCell

public void setCell(CellObject cell)
Sets every cell belonging to that Area by defining the name, walkability and value in valueLayer (for visualisation purposes)


getName

public java.lang.String getName()
Returns the name-label of this area


setWalkable

public void setWalkable(boolean walkable)
Sets the walkability of this area


getWalkable

public boolean getWalkable()
Returns the walkability of this area


createPois

public void createPois()
Creates a bar of points of interest This is used for the festival scenario for the stage


addPoi

public void addPoi(repast.simphony.space.continuous.NdPoint poi)
Adds a point of interest (poi) to collection of pois for this specific type of area


getPoi

public java.util.Vector<repast.simphony.space.continuous.NdPoint> getPoi()
Returns point(s) of interest (pois) of this area