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