コード例 #1
0
ファイル: MapSearch.cs プロジェクト: justin-hubbard/Capstone
 public SearchNode(MapRoom currentRoom, mPoint currentPoint, MapEdge currentMapEdge, List <mPoint> listOfPoints, double distance)
 {
     Room          = currentRoom;
     locationPoint = currentPoint;
     Edge          = currentMapEdge;
     AddPointsToListOfPointInUV(listOfPoints);
     Distance = distance;
 }
コード例 #2
0
        //****************** 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);
        }
コード例 #3
0
ファイル: MapRoom.cs プロジェクト: justin-hubbard/Capstone
 public void AddEdge(MapEdge nEdge)
 {
     ListOfEdges.Add(nEdge);
 }