public float CalculateHeight(IFloorplan floorplan) { FloorplanRuntime interior = floorplan as FloorplanRuntime; if (interior == null) { return(-1); } return(CalculateHeight(_interiorFloorplans.IndexOf(interior))); }
public int Floor(IFloorplan interior) { FloorplanRuntime floorplan = interior as FloorplanRuntime; if (floorplan == null) { return(-1); } return(_interiorFloorplans.IndexOf(floorplan)); }
public void Initialise(List <VolumePoint> points, int newFloorCount = 1, float newFloorHeight = 3) { HUtils.log(); _points.Clear(); _points.AddRange(points); _floors = newFloorCount; _floorHeight = newFloorHeight; _interiorFloorplans.Clear(); for (int f = 0; f < newFloorCount; f++) { FloorplanRuntime floorplan = new FloorplanRuntime(); floorplan.SetDefaultName(f); _interiorFloorplans.Add(floorplan); } }
private void CheckInternalFloorplans() { if (!_building.generateInteriors) { return; } int currentPlanCount = _interiorFloorplans.Count; if (currentPlanCount != _floors) { while (currentPlanCount < _floors) { _interiorFloorplans.Add(null); currentPlanCount++; } while (currentPlanCount > _floors) { FloorplanRuntime floorplan = _interiorFloorplans[currentPlanCount - 1]; _interiorFloorplans.Remove(floorplan); if (floorplan != null) { Clear(); } currentPlanCount--; } } for (int i = 0; i < currentPlanCount; i++) { if (_interiorFloorplans[i] == null) { FloorplanRuntime floorplan = new FloorplanRuntime(); floorplan.SetDefaultName(i + 1); _interiorFloorplans[i] = floorplan; } } }