boundingBoxCached property
BoundingBox
get
boundingBoxCached
Implementation
BoundingBox get boundingBoxCached {
if (_boundingBox != null) return _boundingBox!;
assert(_closedOuters.isNotEmpty || _openOuters.isNotEmpty || _master != null, "No bounding box available for ${this.toStringWithoutNames()}");
_boundingBox = _master != null
? _master!.boundingBox
: _closedOuters.isNotEmpty
? _closedOuters.first.boundingBox
: _openOuters.first.boundingBox;
_closedOuters.forEach((action) => _boundingBox = _boundingBox!.extendBoundingBox(action.boundingBox));
_openOuters.forEach((action) => _boundingBox = _boundingBox!.extendBoundingBox(action.boundingBox));
return _boundingBox!;
}