コード例 #1
0
        public void Rotate()
        {
            var roomRow = new RoomRow(Polygon.Rectangle(Vector3.Origin, new Vector3(9.0, 3.0)));

            for (int i = 0; i < 3; i++)
            {
                var room = new Room(new Vector3(3.0, 3.0, 3.0))
                {
                    Color = Palette.Aqua
                };
                Assert.True(roomRow.AddRoom(room));
            }
            var model = new Model();

            foreach (Room room in roomRow.Rooms)
            {
                model.AddElement(new Space(room.PerimeterAsProfile, room.Height, room.ColorAsMaterial));
            }
            roomRow.Rotate(Vector3.Origin, 180);
            foreach (Room room in roomRow.Rooms)
            {
                model.AddElement(new Space(room.PerimeterAsProfile, room.Height, room.ColorAsMaterial));
            }
            model.ToGlTF("../../../../RoomKitTest/output/RoomRowRotate.glb");
        }
コード例 #2
0
        public void Rotate()
        {
            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
                }));
            }
            var model = new Model();

            foreach (Room room in roomRow.Rooms)
            {
                model.AddElement(room.AsSpace);
            }
            roomRow.Rotate(Vector3.Origin, 180);
            foreach (Room room in roomRow.Rooms)
            {
                model.AddElement(room.AsSpace);
            }
            model.SaveGlb("../../../../RoomRowRotate.glb");
        }