OZBoundary FAISectorZone::GetBoundary() const { OZBoundary boundary; boundary.push_front(GetSectorEnd()); boundary.push_front(GetSectorStart()); boundary.push_front(GetReference()); return boundary; }
OZBoundary SectorZone::GetBoundary() const { OZBoundary boundary; boundary.push_front(GetReference()); boundary.push_front(GetSectorStart()); boundary.push_front(GetSectorEnd()); boundary.GenerateArcExcluding(GetReference(), GetRadius(), GetStartRadial(), GetEndRadial()); return boundary; }
OZBoundary KeyholeZone::GetBoundary() const { OZBoundary boundary; boundary.push_front(GetSectorStart()); boundary.push_front(GetSectorEnd()); boundary.GenerateArcExcluding(GetReference(), GetRadius(), GetStartRadial(), GetEndRadial()); const fixed small_radius = GetInnerRadius(); GeoVector small_vector(small_radius, GetStartRadial()); boundary.push_front(small_vector.EndPoint(GetReference())); small_vector.bearing = GetEndRadial(); boundary.push_front(small_vector.EndPoint(GetReference())); boundary.GenerateArcExcluding(GetReference(), small_radius, GetEndRadial(), GetStartRadial()); return std::move(boundary); }
OZBoundary AnnularSectorZone::GetBoundary() const { OZBoundary boundary; const unsigned steps = 20; const Angle delta = Angle::FullCircle() / steps; const Angle start = GetStartRadial().AsBearing(); Angle end = GetEndRadial().AsBearing(); if (end <= start + Angle::FullCircle() / 512) end += Angle::FullCircle(); const GeoPoint inner_start = GeoVector(GetInnerRadius(), GetStartRadial()).EndPoint(GetReference()); const GeoPoint inner_end = GeoVector(GetInnerRadius(), GetEndRadial()).EndPoint(GetReference()); GeoVector inner_vector(GetInnerRadius(), start + delta); for (; inner_vector.bearing < end; inner_vector.bearing += delta) boundary.push_front(inner_vector.EndPoint(GetReference())); boundary.push_front(inner_end); boundary.push_front(inner_start); GeoVector vector(GetRadius(), start + delta); for (; vector.bearing < end; vector.bearing += delta) boundary.push_front(vector.EndPoint(GetReference())); boundary.push_front(GetSectorEnd()); boundary.push_front(GetSectorStart()); return boundary; }
OZBoundary CylinderZone::GetBoundary() const { OZBoundary boundary; const unsigned steps = 20; const Angle delta = Angle::FullCircle() / steps; GeoVector vector(GetRadius(), Angle::Zero()); for (unsigned i = 0; i < steps; ++i, vector.bearing += delta) boundary.push_front(vector.EndPoint(GetReference())); return boundary; }