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