Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sema
Class Map

    java.lang.Object
      sema.Map

public class Map
extends java.lang.Object

Map of the simulated world. It contains the rectangular matrix of boxes.

Field Summary
`Box[][]` | `boxes` Matrix of the boxes.
`float` | `boxLength` Length of a box.
`int` | `xBoxes` Number of boxes along the x-axis.
`float` | `xLength` xLenght of the map ( in simulated unit ).
`int` | `yBoxes` Length of map along the x-axis.
`float` | `yLength` Length of map along the y-axis.

Constructor Summary
`Map(int x_boxes, int y_boxes, float box_length, Box[][] boxes)` Constructs a Map from the number of boxes on the x and the y coordinate, from their length and the matrix of boxes.

Method Summary
`java.util.Vector` | `getCoveringBoxes(float x, float y, float x_length, float y_length)` Returns a vector containing the boxes covering the given rectangle ( given by it's top left corner and its dimensions )
`protected java.lang.String[][]` | `getProperties()` Returns the properties of the map.
`protected void` | `setProperties(java.lang.String property, java.lang.String value)` Try to sets the value to the property of the map.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### xBoxes

    public final int xBoxes

  Number of boxes along the x-axis.

### yBoxes

    public final int yBoxes

  Length of map along the x-axis.

### xLength

    public final float xLength

  xLenght of the map ( in simulated unit ).

### yLength

    public final float yLength

  Length of map along the y-axis.

### boxLength

    public final float boxLength

  Length of a box.

### boxes

    public final Box[][] boxes

  Matrix of the boxes.

Constructor Detail

### Map

    public Map(int x_boxes,
               int y_boxes,
               float box_length,
               Box[][] boxes)

  Constructs a Map from the number of boxes on the x and the y coordinate, from their length and the matrix of boxes.

Method Detail

### getCoveringBoxes

    public java.util.Vector getCoveringBoxes(float x,
                                             float y,
                                             float x_length,
                                             float y_length)

  Returns a vector containing the boxes covering the given rectangle ( given by it's top left corner and its dimensions )

### getProperties

    protected java.lang.String[][] getProperties()

  Returns the properties of the map.

  Returns:
    the element's properties.
  See Also:
    `Engine.getProperties()`

### setProperties

    protected void setProperties(java.lang.String property,
                                 java.lang.String value)

  Try to sets the value to the property of the map. The new value is ignored if the property is read_only or if the value isn't valid.

  Parameters:
    `property` - the property to change.
    `value` - the new value for the property.
  See Also:
    `Engine.setProperties(java.lang.String, java.lang.String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD