View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Team Us M5 Class Descriptions

Building - data representation of a buiding on the map. Simply a data class for a particular building

name - name of the building
address - adress of the building
picture - relative path to image file of this building
position - position of the building in the data model representation, this is generic and relative to all
the other buildings in the map. Position can be scaled to display building in different display representations.
street - street that the building is on.

BuidlingNode - a special node that represents a building's place in the map's graph structure.
Is composed of a Building class that represents the data detail for the node.

building - the building that this BuildingNode represents.

ImageRectangle - subclass of rectangle that is used to create a represenation of the clickable image of a building that is being displayed on the map. The image rectangle is checked to see if the mouse click occured within it. If the click was inside, the building is able to be accessed by the owner.

building - the building that this rectangle is a checking clicks for.

IntersectionNode - a special node that represents the intersection of two streets in the structure
of the map's graph. Corresponds to the Street objects data representation.

street1 - the first street in the intersection
street2 - the second street in the intersection

Map - the core of the 'business logic' of the system. the map contains a collection of Nodes or graph composed of Nodes (either intersection or building nodes) that it can traverse to find routes from one building to another. The traversal algorithm it uses is breadth-first, ensuring the shortest distance between two points. However, this shortest distance will be the route with the fewest number of intersections and buildings not simply the shortest statute distance. Given two endpoints (buildings) the Map will traverse its graph to find a route and then create a Route to represent the sequence of streets needed to make the traversal in the graphical representation. In addition to containing the graph representation of the the map components, the Map contains the coupled presentation data (but no presentation logic - that is handled by Display Related classes) that complements the logical graph representation. The Map also contains all created Tours and Routes that can be used by presentation logic to move the user through a virtual tour of the campus (respectively in 2D and 3D).

streets - a collection of streets in the data model of the system.
buildings - a collection of the buildings that are in the data model of the system.
display - the display that is responsible for the graphical representation of the map (MapMorph in 2D).
nodes - a collection of nodes in the graph. these nodes compose the graph due to their interrelated references.
route - the route currently being displayed as a Route object.

MapMorph - the 2D rep of the Map. Extends SketchMorph Composed of BuildingMorphs and lines drawn by a pen onto the morph to represent a flat view of the map. Handles user interaction such as mouse clicks for zooms or selection of buildings for route finding. Relyies on Map for the data representation of what it is responsible for displaying as well as for finding routes between buildings. Handles zoom functions, since these are very specific to a 2D display (but relies on Map for data rep of this). Also, handles display of a route between two buildings in the 2D environment.

map - the data model that the MapMorph is displaying
pen - the pen that draws on the MapMorph's form
mapForm - the form that makes up the graphical display for the MapMorph
currentZoomLevel - the current level of zoom in the display. either 1, 2, or 3
popWin - reference to the system popup window that is created to display building info
centerPoint - centerpoint in the data model's representation of the location the map is currently centered on
subMorph - a reference to the MapMorph itself used when placeing the MapMorph inside of other morphs
winWidth - width of the MapMorph
winHeight - height of the MapMorph
menu - reference to the popup menu created when the user right clicks on the MapMorph
rectangles - a collection of the clickable areas of the buildings (see note in ImageRectangle) in the current graphic display
startBuilding - the start building used by routing
endBuilding - the end building used by routing
routeMorph - reference to the popup morph used for route finding

Node - a generalization or superclass for the two types of nodes that exist in the sytem.
It can provide a list of adjacent nodes for use in traversals/searches.

adjacentcies - a collection of nodes that are adjacent to this node. the primary way to traverse the graph.
color - representation of whether or not the node has been visited. Color code is:
white = has not been visited, gray = has been visisted. black = has finished visiting.
position - position of the node in the data model's generic (relative) representation of the map.
parent - the node that was visited previously to this node in the search of the map's graph.

Route - the data representation of the transition from one building (location) to another via the data rep of the streets with turns. This is represented with a collection of points that correspond to locations in the data model of the map.

points - a collection of points that comprise this route.

Street - data rep of a street on the map. Contains info necessary for describing a street in the system.

name - name of the street
endpoint1 - data model representation of the first (north western most) point
endpoint2 - data model representation of the second (south eastern most) point
vert - true or false. does this street go N/S or E/W
intersections - a collection of the intersections with other streets in which this street is a part

Link to this Page