23 #ifndef LSST_SPHGEOM_CONVEXPOLYGON_H_ 24 #define LSST_SPHGEOM_CONVEXPOLYGON_H_ 92 _vertices{v0, v1, v2, v3}
173 #endif // LSST_SPHGEOM_CONVEXPOLYGON_H_ bool isDisjointFrom(Region const &r) const
bool operator==(ConvexPolygon const &p) const
Two convex polygons are equal iff they contain the same points.
std::ostream & operator<<(std::ostream &, Angle const &)
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.
bool isWithin(Region const &r) const
Box represents a rectangle in spherical coordinate space that contains its boundary.
UnitVector3d getCentroid() const
The centroid of a polygon is its center of mass projected onto S², assuming a uniform mass distributi...
Circle getBoundingCircle() const override
getBoundingCircle returns a bounding-circle for this region.
This file declares a class for representing unit vectors in ℝ³.
Ellipse is an elliptical region on the sphere.
bool intersects(Region const &r) const
Relationship relate(Region const &r) const override
A base class for image defects.
std::vector< UnitVector3d > const & getVertices() const
This file defines an interface for spherical regions.
static ConvexPolygon convexHull(std::vector< UnitVector3d > const &points)
convexHull returns the convex hull of the given set of points if it exists and throws an exception ot...
Region is a minimal interface for 2-dimensional regions on the unit sphere.
std::unique_ptr< Region > clone() const override
clone returns a deep copy of this region.
virtual Relationship relate(Region const &) const =0
Circle is a circular region on the unit sphere that contains its boundary.
ConvexPolygon is a closed convex polygon on the unit sphere.
bool contains(UnitVector3d const &v) const override
Box getBoundingBox() const override
getBoundingBox returns a bounding-box for this region.
ConvexPolygon(UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2)
This constructor creates a triangle with the given vertices.
bool operator!=(ConvexPolygon const &p) const
static constexpr uint8_t TYPE_CODE
Box3d represents a box in ℝ³.
ConvexPolygon(UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2, UnitVector3d const &v3)
This constructor creates a quadrilateral with the given vertices.
std::vector< uint8_t > encode() const override
encode serializes this region into an opaque byte string.
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
static std::unique_ptr< ConvexPolygon > decode(std::vector< uint8_t > const &s)
Box3d getBoundingBox3d() const override
getBoundingBox3d returns a 3-dimensional bounding-box for this region.