public void Populate() { var polygon = new Polygon ( new[] { new Vector3(0.0, 0.0), new Vector3(30.0, 0.0), new Vector3(25.0, 5.0), new Vector3(5.0, 5.0) } ); var roomRow = new RoomRow(polygon); roomRow.Populate(20.0, 4.0); roomRow.SetColor(Palette.Aqua); var model = new Model(); foreach (Room room in roomRow.Rooms) { model.AddElement(new Space(room.PerimeterAsProfile, room.Height, room.ColorAsMaterial)); } model.AddElement(new Space(new Profile(polygon), 0.2, new Material(Colors.Granite, 0.0, 0.0, false, null, false, Guid.NewGuid(), Guid.NewGuid().ToString()))); model.ToGlTF("../../../../RoomKitTest/output/RoomRowPopulate.glb"); Assert.Equal(7, roomRow.Rooms.Count); }
public void SetColor() { var roomRow = new RoomRow(Polygon.Rectangle(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.SetColor(Palette.Blue); foreach (Room room in roomRow.Rooms) { Assert.Equal(Palette.Blue, room.Color); } }
public void SetColor() { 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.SetColor(Palette.Blue); foreach (Room room in roomRow.Rooms) { Assert.Equal(Palette.Blue, room.Color); } }