25 #if !defined(LSST_AFW_GEOM_POLYGON_POLYGON_H) 26 #define LSST_AFW_GEOM_POLYGON_POLYGON_H 145 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
virtual bool isPersistable() const
Whether Polygon is persistable which is always true.
std::vector< Point >::const_iterator begin() const
Iterator for vertices.
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 &)
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.
virtual std::string getPersistenceName() const
Whether Polygon is persistable which is always true.
An object passed to Persistable::write to allow it to persist itself.
Polygon(Box const &box)
Construct a rectangular Polygon whose vertices are the corners of a box.
double calculateArea() const
ItemVariant const * other
An integer coordinate rectangle.
std::vector< std::shared_ptr< Polygon > > symDifference(Polygon const &other) const
Return the symmetric difference of two polygons.
A base class for objects that can be persisted via afw::table::io Archive classes.
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.
virtual void write(OutputArchiveHandle &handle) const
Whether Polygon is persistable which is always true.
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::vector< std::shared_ptr< Polygon > > union_(Polygon const &other) const
Returns the union of two polygons.
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.
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::ostream & operator<<(std::ostream &os, Polygon const &poly)
Stream polygon.
std::vector< Point >::const_iterator end() const
Iterator for vertices.
std::shared_ptr< afw::image::Image< float > > createImage(Extent2I const &extent) const
Create image of polygon.
A floating-point coordinate rectangle geometry.
std::shared_ptr< afw::image::Image< float > > createImage(Box2I const &bbox) const
Create image of polygon.
void swap(Polygon &other)
Swap two polygons.
#define LSST_EXCEPTION_TYPE(t, b, c)
A CRTP facade class for subclasses of Persistable.
bool contains(Point const &point) const
Returns whether the polygon contains the point.
std::shared_ptr< Polygon > transform(TransformPoint2ToPoint2 const &transform) const
Transform the polygon.
afw::table::PointKey< double > vertices
double calculatePerimeter() const