Object2dDisplay -- Object2dDisplay displays 2d arrays of objects.
Object2dDisplay helps display 2d arrays of objects. Create a Object2dDisplay, give it a Raster widget to draw on, a Discrete2d, a message to call on each object, and (optionally) a collection of objects and it will dispatch the message to all objects with the Raster widget as an argument. In addition, Object2dDisplay can help you make probees.
Set the message to be sent to each object in the grid to make it draw itself.
Set the 2d array to draw.
Set the display widget to use for drawing.
(id <Zone>)aZone setDisplayWidget:
(id <Raster>)r setDiscrete2dToDisplay:
(id <GridData>)c setDisplayMessage:
Convenience constructor for Object2dDisplay
Make a probe for an object at a specific point.
Draw all objects in the array (or optionally, the collection) on the raster widget. All that happens here is the display message is sent to each object - it is the object's responsibility to render itself.
- setObjectCollection: objects
Set a collection of objects to be displayed. If this is not given, then Object2dDisplay loops through the 2d grid sending draw messages to all objects it finds there. Giving an explicit collection of objects to draw is more efficient if your grid is sparsely populated.