예제 #1
0
        public void MoveFromTo()
        {
            var roomRow = new RoomRow(Polygon.Rectangle(Vector3.Origin, new Vector3(9.0, 3.0)));

            for (int i = 0; i < 3; i++)
            {
                Assert.True(roomRow.AddRoom(new Room(new Vector3(3.0, 3.0, 3.0))));
            }
            roomRow.MoveFromTo(Vector3.Origin, new Vector3(20.0, 20.0, 20.0));
            Assert.Equal(20.0, roomRow.Row.Start.X);
            Assert.Equal(20.0, roomRow.Row.Start.Y);
            Assert.Equal(0.0, roomRow.Row.Start.Z);
        }
예제 #2
0
        public void MoveFromTo()
        {
            var roomRow = new RoomRow(Vector3.Origin, new Vector3(10.0, 0.0));

            for (int i = 0; i < 3; i++)
            {
                Assert.True(roomRow.AddRoom(new Room()
                {
                    DesignArea = 9.0
                }));
            }
            roomRow.MoveFromTo(Vector3.Origin, new Vector3(20.0, 20.0, 20.0));
            Assert.Equal(20.0, roomRow.Elevation);
            Assert.Equal(20.0, roomRow.Row.Start.X);
            Assert.Equal(20.0, roomRow.Row.Start.Y);
            Assert.Equal(0.0, roomRow.Row.Start.Z);

            Assert.Equal(30.0, roomRow.Row.End.X);
            Assert.Equal(20.0, roomRow.Row.Start.Y);
            Assert.Equal(0.0, roomRow.Row.Start.Z);
        }