Beispiel #1
0
 private static void PaintPlate(DrawingContext dc, Plate plate, Pen pen)
 {
     if (plate != null)
     {
         dc.DrawLine(pen, RoomPointToObservePoint(plate.A), RoomPointToObservePoint(plate.B));
         dc.DrawLine(pen, RoomPointToObservePoint(plate.B), RoomPointToObservePoint(plate.C));
         dc.DrawLine(pen, RoomPointToObservePoint(plate.C), RoomPointToObservePoint(plate.D));
         dc.DrawLine(pen, RoomPointToObservePoint(plate.D), RoomPointToObservePoint(plate.A));
     }
 }
Beispiel #2
0
        public static void SetPlates()
        {
            roomPlates[0] = new Plate(new SpacePoint(0, 3000, 1000), new SpacePoint(0, 3210, 1000),
                                      new SpacePoint(0, 3210, 1297), new SpacePoint(0, 3000, 1297));

            roomPlates[1] = new Plate(new SpacePoint(2000, 2000, roomHeight), new SpacePoint(2000, 2300, roomHeight),
                                      new SpacePoint(2300, 2300, roomHeight), new SpacePoint(2300, 2000, roomHeight));

            roomPlates[2] = new Plate(new SpacePoint(1500, roomWidth, 1500), new SpacePoint(1500, roomWidth, 1800),
                                      new SpacePoint(1800, roomWidth, 1800), new SpacePoint(1800, roomWidth, 1500));

            roomPlates[3] = new Plate(new SpacePoint(2000, 2000, 0), new SpacePoint(2000, 2300, 0),
                                      new SpacePoint(2300, 2300, 0), new SpacePoint(2300, 2000, 0));

            roomPlates[4] = new Plate(new SpacePoint(2000, 0, 2000), new SpacePoint(2000, 0, 2300),
                                      new SpacePoint(2300, 0, 2300), new SpacePoint(2300, 0, 2000));


            //  正面
            roomPlates[5] = new Plate(new SpacePoint(0, 0, 0), new SpacePoint(0, roomWidth, 0),
                                      new SpacePoint(0, roomWidth, roomHeight), new SpacePoint(0, 0, roomHeight));

            //  地板
            roomPlates[6] = new Plate(new SpacePoint(0, 0, 0), new SpacePoint(0, roomWidth, 0),
                                      new SpacePoint(roomLength, roomWidth, 0), new SpacePoint(roomLength, 0, 0));

            //  左边墙
            roomPlates[7] = new Plate(new SpacePoint(0, 0, 0), new SpacePoint(roomLength, 0, 0),
                                      new SpacePoint(roomLength, 0, roomHeight), new SpacePoint(0, 0, roomHeight));

            //  右边墙
            roomPlates[8] = new Plate(new SpacePoint(0, roomWidth, 0), new SpacePoint(roomLength, roomWidth, 0),
                                      new SpacePoint(roomLength, roomWidth, roomHeight), new SpacePoint(0, roomWidth, roomHeight));

            //  天花板
            roomPlates[9] = new Plate(new SpacePoint(0, 0, roomHeight), new SpacePoint(0, roomWidth, roomHeight),
                                      new SpacePoint(roomLength, roomWidth, roomHeight), new SpacePoint(roomLength, 0, roomHeight));

            roomPlates[10] = new Plate(new SpacePoint(0, 1000, 2300), new SpacePoint(0, 1500, 2300),
                                       new SpacePoint(0, 1500, 2800), new SpacePoint(0, 1000, 2800));
        }