37 Polygon(std::initializer_list<Vector> vertices);
44 Polygon(
const std::vector<Vector>& vertices);
51 explicit Polygon(
const std::vector<IntervalVector>& vertices);
74 explicit Polygon(
const IntervalVector& x);
81 const std::vector<Segment>&
edges()
const;
Represents a polygon (convex or non-convex) defined by its vertices enclosed in IntervalVectors.
Definition codac2_Polygon.h:29
Polygon()
Default protected constructor used internally.
std::vector< IntervalVector > sorted_vertices() const
Returns the list of vertices sorted in polygonal order.
const std::vector< Segment > _edges
Internal representation of the polygon as a list of edges.
Definition codac2_Polygon.h:143
Polygon(const std::vector< Vector > &vertices)
Constructs a Polygon from a vector of Vector vertices.
Polygon(const std::vector< Segment > &edges)
Constructs a Polygon from a vector of Segment edges.
bool is_empty() const
Checks whether the polygon is empty (has no vertex).
Polygon(const IntervalVector &x)
Constructs a box as a Polygon.
BoolInterval contains(const IntervalVector &p) const
Checks whether the polygon contains a given point.
Polygon(std::initializer_list< Segment > edges)
Constructs a Polygon from an initializer list of Segment edges.
Polygon(std::initializer_list< Vector > vertices)
Constructs a Polygon from an initializer list of Vector vertices.
bool operator==(const Polygon &p) const
Comparison operator.
const std::vector< Segment > & edges() const
Returns the list of edges of the polygon.
static Polygon empty()
Provides an empty polygon.
std::list< IntervalVector > unsorted_vertices() const
Returns the list of unique vertices in no particular order.
Polygon(const std::vector< IntervalVector > &vertices)
Constructs a Polygon from a vector of IntervalVector vertices.
std::ostream & operator<<(std::ostream &os, const BoolInterval &x)
Streams out a BoolInterval.
Definition codac2_BoolInterval.h:45
BoolInterval
Enumeration representing a boolean interval.
Definition codac2_BoolInterval.h:23