cz.cuni.amis.pogamut.defcon.communication.worldview.modules.grid.basic
Class BasicGrid<AGENT extends DefConAgent>

Package class diagram package BasicGrid
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensorModule<AGENT>
          extended by cz.cuni.amis.pogamut.defcon.communication.worldview.modules.grid.basic.BasicGrid<AGENT>
Type Parameters:
AGENT -
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.component.IComponent, IGrid<SymmetricGridCell,SymmetricGridCellId,BasicGridIterator>

public class BasicGrid<AGENT extends DefConAgent>
extends cz.cuni.amis.pogamut.base.agent.module.SensorModule<AGENT>
implements IGrid<SymmetricGridCell,SymmetricGridCellId,BasicGridIterator>

Experimental grid implementation.

Author:
Radek 'Black_Hand' Pibil

Nested Class Summary
 class BasicGrid.CellIndices
          Assigns cell to a given cell position.
 
Field Summary
protected  float gridStep
           
protected  int gridXCellCount
           
protected  float gridXStart
           
protected  int gridYCellCount
           
protected  float gridYStart
           
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule
worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
BasicGrid(AGENT agent, float gridStep, int gridXCellCount, int gridYCellCount, int gridXStart, int gridYStart)
           
BasicGrid(DefConAgent agent, float gridStep, int gridXCellCount, int gridYCellCount, int gridXStart, int gridYStart, Logger log)
           
 
Method Summary
 SymmetricGridCell getCell(float x, float y)
           
 SymmetricGridCell getCell(SymmetricGridCellId cellId)
           
 BasicGrid.CellIndices getCellIndices(SymmetricGridCellId cellId)
           
 float getGridStep()
           
 BasicGridIterator getIterator(SymmetricGridCellId cellId)
           
 float getLowerXBound()
           
 float getLowerYBound()
           
 float getUpperXBound()
           
 float getUpperYBound()
           
 DefConWorldView getWorldView()
           
 int getXCount()
           
 int getYCount()
           
protected  void initGrid(float gridStep, int gridXCellCount, int gridYCellCount, float gridXStart, float gridYStart)
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gridXStart

protected float gridXStart

gridYStart

protected float gridYStart

gridStep

protected float gridStep

gridXCellCount

protected int gridXCellCount

gridYCellCount

protected int gridYCellCount
Constructor Detail

BasicGrid

public BasicGrid(AGENT agent,
                 float gridStep,
                 int gridXCellCount,
                 int gridYCellCount,
                 int gridXStart,
                 int gridYStart)

BasicGrid

public BasicGrid(DefConAgent agent,
                 float gridStep,
                 int gridXCellCount,
                 int gridYCellCount,
                 int gridXStart,
                 int gridYStart,
                 Logger log)
Method Detail

initGrid

protected void initGrid(float gridStep,
                        int gridXCellCount,
                        int gridYCellCount,
                        float gridXStart,
                        float gridYStart)

getCell

public SymmetricGridCell getCell(SymmetricGridCellId cellId)
Specified by:
getCell in interface IGrid<SymmetricGridCell,SymmetricGridCellId,BasicGridIterator>

getCellIndices

public BasicGrid.CellIndices getCellIndices(SymmetricGridCellId cellId)

getWorldView

public DefConWorldView getWorldView()
Specified by:
getWorldView in interface IGrid<SymmetricGridCell,SymmetricGridCellId,BasicGridIterator>

getLowerXBound

public float getLowerXBound()

getUpperXBound

public float getUpperXBound()

getLowerYBound

public float getLowerYBound()

getUpperYBound

public float getUpperYBound()

getGridStep

public float getGridStep()

getXCount

public int getXCount()

getYCount

public int getYCount()

getCell

public SymmetricGridCell getCell(float x,
                                 float y)

getIterator

public BasicGridIterator getIterator(SymmetricGridCellId cellId)
Specified by:
getIterator in interface IGrid<SymmetricGridCell,SymmetricGridCellId,BasicGridIterator>


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.