25 #if !defined(LSST_AFW_GEOM_POLYGON_POLYGON_H)
26 #define LSST_AFW_GEOM_POLYGON_POLYGON_H
#define LSST_EXCEPTION_TYPE(t, b, c)
Macro used to define new types of exceptions without additional data.
afw::table::PointKey< double > vertices
lsst::geom::Point2D Point
std::shared_ptr< Polygon > unionSingle(Polygon const &other) const
Returns the union of two polygons.
std::vector< Point >::const_iterator begin() const
Iterator for vertices.
bool operator!=(Polygon const &other) const
bool overlaps(Polygon const &other) const
Returns whether the polygons overlap each other.
Box getBBox() const
Return bounding box.
std::shared_ptr< Polygon > convexHull() const
Produce a polygon from the convex hull.
std::vector< std::pair< Point, Point > > getEdges() const
Get vector of edges.
std::shared_ptr< Polygon > intersectionSingle(Polygon const &other) const
Returns the intersection of two polygons.
std::shared_ptr< afw::image::Image< float > > createImage(lsst::geom::Box2I const &bbox) const
Create image of polygon.
Polygon(Box const &box)
Construct a rectangular Polygon whose vertices are the corners of a box.
std::shared_ptr< Polygon > subSample(size_t num) const
Sub-sample each edge.
std::vector< std::shared_ptr< Polygon > > intersection(Polygon const &other) const
Returns the intersection of two polygons.
std::vector< std::shared_ptr< Polygon > > operator^(Polygon const &rhs) const
Point calculateCenter() const
size_t getNumEdges() const
Return number of edges.
std::vector< std::shared_ptr< Polygon > > operator^(Box const &rhs) const
std::shared_ptr< afw::image::Image< float > > createImage(lsst::geom::Extent2I const &extent) const
std::shared_ptr< Polygon > transform(TransformPoint2ToPoint2 const &transform) const
Transform the polygon.
std::vector< std::shared_ptr< Polygon > > operator|(Polygon const &rhs) const
double calculateArea() const
std::shared_ptr< typehandling::Storable > cloneStorable() const override
Create a new Polygon that is a copy of this one.
std::vector< Point > getVertices() const
Get vector of vertices.
std::vector< std::shared_ptr< Polygon > > operator|(Box const &rhs) const
std::shared_ptr< Polygon > simplify(double const distance) const
Return a simplified polygon.
bool operator==(Polygon const &other) const
std::string toString() const override
Create a string representation of this object.
bool isPersistable() const noexcept override
Whether Polygon is persistable which is always true.
std::vector< std::shared_ptr< Polygon > > union_(Polygon const &other) const
Returns the union of two polygons.
std::size_t hash_value() const noexcept override
Return a hash of this object.
std::vector< std::shared_ptr< Polygon > > symDifference(Polygon const &other) const
Return the symmetric difference of two polygons.
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
std::vector< std::shared_ptr< Polygon > > operator&(Box const &rhs) const
bool contains(Point const &point) const
Returns whether the polygon contains the point.
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
void swap(Polygon &other) noexcept
Swap two polygons.
Polygon & operator=(Polygon const &)
Polygon & operator=(Polygon &&)
std::vector< Point >::const_iterator end() const
bool equals(typehandling::Storable const &other) const noexcept override
Compare this object to another Storable.
double calculatePerimeter() const
An exception that indicates the single-polygon assumption has been violated.
A CRTP facade class for subclasses of Persistable.
io::OutputArchiveHandle OutputArchiveHandle
Interface supporting iteration over heterogenous containers.
A floating-point coordinate rectangle geometry.
An integer coordinate rectangle.
Reports errors that are due to events beyond the control of the program.
std::ostream & operator<<(std::ostream &os, Polygon const &poly)
Stream polygon.
class[[deprecated("Removed with no replacement (but see lsst::afw::image::TransmissionCurve). Will be " "removed after v22.")]] FilterProperty final
Describe the properties of a Filter (e.g.
Low-level polynomials (including special polynomials) in C++.
Point< double, 2 > Point2D
A base class for image defects.
size_t operator()(argument_type const &obj) const noexcept