public SearchNode(MapRoom currentRoom, mPoint currentPoint, MapEdge currentMapEdge, List <mPoint> listOfPoints, double distance) { Room = currentRoom; locationPoint = currentPoint; Edge = currentMapEdge; AddPointsToListOfPointInUV(listOfPoints); Distance = distance; }
//****************** Methods for Loading ****************** //adds edges to the map private void AddEdge(Connection nConnection) { mPoint uvPointA = new mPoint(nConnection.Room_U, nConnection.Room_V); mPoint uvPointB = new mPoint(nConnection.Other_Room_U, nConnection.Other_Room_V); //get the two rooms associated with the given points in uv MapRoom RoomA = GetRoomFromPointInUV(uvPointA); MapRoom RoomB = GetRoomFromPointInUV(uvPointB); //create a new edge add it to the Associated Rooms then add it to the map. MapEdge tmpEdge = new MapEdge(RoomA, uvPointA, RoomB, uvPointB, nConnection); RoomA.AddEdge(tmpEdge); RoomB.AddEdge(tmpEdge); EdgesInMap.Add(tmpEdge); }
public void AddEdge(MapEdge nEdge) { ListOfEdges.Add(nEdge); }