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

## sim.portrayal.network
Class SpatialNetwork2D

    java.lang.Object
      sim.portrayal.network.SpatialNetwork2D

    public class SpatialNetwork2D

extends java.lang.Object

A wrapper used by NetworkPortrayal2D to hold a Network and EITHER a Continuous2D OR a SparseGrid2D (or some other SparseField2D). The Continuous2D/SparseGrid2D specifies the spatial location of the nodes; the Network specifies the edges connecting those nodes.

SpatialNetwork2D can also hold an additional location (another Continuous2D/SparseGrid2D) which might hold the nodes if the first location does not. This allows you to (for example) have the FROM nodes in one field and the TO nodes in another field. You can set this location with setAuxillaryField. Note that this will only work properly if the fields have exactly the same dimensions with respect to how their field portrayals draw them onscreen. As a sanity check: you shouldn't have one field be a Continuous2D and the other be a SparseGrid2D.

Field Summary
`SparseField2D` | `field`
`SparseField2D` | `field2`
`Network` | `network`

Constructor Summary
`SpatialNetwork2D(SparseField2D field, Network network)`

Method Summary
`Double2D` | `getDimensions()`
`double` | `getHeight()` Deprecated. use getDimensions() instead
`Double2D` | `getObjectLocation(java.lang.Object node)`
`double` | `getWidth()` Deprecated. use getDimensions() instead
`void` | `setAuxillaryField(SparseField2D f)`

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

Field Detail

### field

    public SparseField2D field

### field2

    public SparseField2D field2

### network

    public Network network

Constructor Detail

### SpatialNetwork2D

    public SpatialNetwork2D(SparseField2D field,
                            Network network)

Method Detail

### setAuxillaryField

    public void setAuxillaryField(SparseField2D f)

### getObjectLocation

    public Double2D getObjectLocation(java.lang.Object node)

### getDimensions

    public Double2D getDimensions()

### getWidth

    public double getWidth()

  Deprecated. use getDimensions() instead

### getHeight

    public double getHeight()

  Deprecated. use getDimensions() instead

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