|
|
| Convex2 () |
| | Empty.
|
| |
| | Convex2 (const Polygon2 &) |
| | Create a convex polygon.
|
| |
| | Convex2 (Vector2 *, int) |
| | Create a convex polygon from an array of points.
|
| |
| | Convex2 (const Vector2 &, const Vector2 &, const Vector2 &) |
| | Create a convex polygon from three points.
|
| |
| | Convex2 (const QVector< Vector > &) |
| | Create a convex polygon.
|
| |
| | Convex2 (const QVector< Vector2 > &) |
| | Create a convex polygon.
|
| |
| | Convex2 (const Box2 &) |
| | Create a convex from a box.
|
| |
| | Convex2 (const Hexagon2 &) |
| | Create a convex from a hexagon.
|
| |
| | Convex2 (const Triangle2 &) |
| | Create a convex from a triangle.
|
| |
| | Convex2 (const Quadrangle2 &) |
| | Create a convex from a quadrangle.
|
| |
|
| ~Convex2 () |
| | Empty.
|
| |
| bool | Cut (const Line2 &) |
| | Cut the convex polygon by a line.
|
| |
| bool | AddIntersection (const Segment2 &) |
| | Check the intersection between the convex and a segment, if intersection occurs, add the points to the convex.
|
| |
| double | R (const Vector2 &) const |
| | Compute the squared distance between a point and a convex polygon.
|
| |
| double | Signed (const Vector2 &) const |
| | Compute the signed Euclidean distance between a point and a convex polygon.
|
| |
| Vector2 | Normal (const Vector2 &) const |
| | Compute the normal vector between a point and a convex polygon.
|
| |
| bool | Inside (const Convex2 &) const |
| | Test if a convex is inside another one.
|
| |
| bool | Inside (const Vector2 &) const |
| | Test if a point is inside the convex.
|
| |
| Convex2 | Scaled (const double &) const |
| | Return the scaled polygon.
|
| |
| Convex2 | Scaled (const Vector2 &) const |
| | Return the scaled polygon.
|
| |
| Convex2 | Translated (const Vector2 &) const |
| | Translate the polygon by a given vector.
|
| |
| Convex2 | Rotated (const Matrix2 &) const |
| | Rotate the polygon.
|
| |
| bool | Intersect (const Convex2 &) const |
| | Test if two convex intersect.
|
| |
| bool | Intersection (const Convex2 &, QVector< Vector2 > &) const |
| | Test if two convex intersect and yield the set of intersection points.
|
| |
| Convex2 | Minkowski (const Convex2 &) const |
| | Straightforward implementation of the Minkowski sum of two convex.
|
| |
|
| Polygon2 () |
| | Create an empty polygon.
|
| |
| | Polygon2 (Vector2 *, int) |
| | Create a polygon given an array of points.
|
| |
| | Polygon2 (const Vector2 &, const Vector2 &, const Vector2 &) |
| | Create a triangle.
|
| |
| | Polygon2 (const Vector2 &, const Vector2 &, const Vector2 &, const Vector2 &) |
| | Create a quadrangle.
|
| |
| | Polygon2 (const QVector< Vector > &) |
| | Create a polygon.
|
| |
| | Polygon2 (const QVector< Vector2 > &) |
| | Create a polygon.
|
| |
| | Polygon2 (const QVector< Vector2 > &, const QVector< int > &) |
| | Create a polygon from a set of vertexes and a subset of indexes.
|
| |
| | Polygon2 (const Triangle2 &) |
| | Create a triangle.
|
| |
| | Polygon2 (const Box2 &) |
| | Create a polygon from a box.
|
| |
| | Polygon2 (const Hexagon2 &) |
| | Create a hexagon.
|
| |
| | Polygon2 (const Pentagon2 &) |
| | Create a pentagon.
|
| |
| | Polygon2 (const Quadrangle2 &) |
| | Create a quadrangle.
|
| |
| | Polygon2 (const Polygonal &) |
| | Create a planar polygon for a polygon.
|
| |
| | Polygon2 (const Octogon2 &) |
| | Create an octogon.
|
| |
| | Polygon2 (const IrregularOctogon2 &) |
| | Create an irregular octogon.
|
| |
| | Polygon2 (const Ellipse2 &, int=72) |
| | Create a polygon approximation of an ellipse.
|
| |
| double | Hausdorff (const Polygon2 &, bool=false) const |
| | Compute the Hausdorff distance between two polygons.
|
| |
| Box2 | GetBox () const |
| | Compute the bounding box of the polygon.
|
| |
| Polygon2 | Scaled (const Vector2 &) const |
| | Return the scaled polygon.
|
| |
| Polygon2 | Translated (const Vector2 &) const |
| | Translate the polygon by a given vector.
|
| |
| Polygon2 | Rotated (const Matrix2 &) const |
| | Rotate the polygon.
|
| |
| Polygon2 | Transformed (const Frame2 &) const |
| | Trasform the polygon.
|
| |
| void | Translate (const Vector2 &) |
| | Translate the polygon by a given vector.
|
| |
| void | Scale (const double &) |
| | Scale the polygon by a given factor.
|
| |
| void | Rotate (const Matrix2 &) |
| | Rotate the polygon.
|
| |
| void | Append (const Vector2 &) |
| | Add a vertex to the polygon.
|
| |
| Vector2 & | Vertex (int) |
| | Read write access to the i-th point.
|
| |
| Vector2 | Vertex (int) const |
| | Read only access to the i-th point.
|
| |
|
QVector< Vector2 > | Vertices () |
| | Get the array of vertices.
|
| |
|
const QVector< Vector2 > & | Vertices () const |
| | Get the array of vertices.
|
| |
| Vector2 | Edge (int) const |
| | Return the i-th edge, starting from the i-th vertex.
|
| |
|
int | Size () const |
| | Return the number of vertices of the polygon.
|
| |
|
bool | IsConvex () const |
| | Check whether the polygon is convex.
|
| |
| Vector2 | PointAtLength (const double &) const |
| | Return the position of the point on the polygon at a given length from the starting point.
|
| |
| Vector2 | NormalAtLength (const double &) const |
| | Return the normal at the position of the point on the polygon.
|
| |
| bool | Inside (const Vector2 &) const |
| | Check if a point is inside or outside of the polygon.
|
| |
| double | R (const Vector2 &) const |
| | Compute the squared distance between a point and a polygon.
|
| |
| double | R (const Line2 &) const |
| | Compute the distance from a polygon to a line.
|
| |
| double | Signed (const Vector2 &) const |
| | Compute the signed distance between a point and a polygon.
|
| |
| bool | Intersect (const Circle2 &) const |
| | Check the intersection between the boundaty of the polygon and a circle.
|
| |
| int | Where (const Circle2 &) const |
| | Check the position of a circle againts the polygon.
|
| |
| bool | IntersectSegment (const Segment2 &) const |
| | Test if a segment intersects the polygon.
|
| |
|
double | Area () const |
| | Compute the area of the polygon.
|
| |
|
double | Length () const |
| | Compute the perimeter of the polygon.
|
| |
| Vector2 | Centroid () const |
| | Compute the centroid of the polygon.
|
| |
| Vector2 | Center () const |
| | Compute the barycenter of the polygon.
|
| |
| void | Subdivide (int, QVector< Vector2 > &, QVector< int > &) const |
| | Create an n-adic subdivision of a polygon.
|
| |
| void | Expand (const double &) |
| | Expand the polygon by a given distance.
|
| |
|
QPolygonF | GetQt () const |
| | Convert the rectangle into a Qt polygon.
|
| |
| void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draw a polygon.
|
| |
| Polygon2 | Resampled (const double &) const |
| | Resample the edges of the polygon.
|
| |
| Polygon2 | Collapsed (const double &) const |
| | Remove the edges of the polygon whose length is below a given distance threshold.
|
| |
| QVector< Vector2 > | Poisson (const double &, int, bool=false, Random &=Random::R239) const |
| | Compute a Poisson sphere distribution inside a polygon.
|
| |
| Vector2 | RandomInside (Random &=Random::R239) const |
| | Generate a random vector inside the box.
|
| |
| QVector< int > | EarClip () const |
| | Compute a simple polygon triangulation using a ear clipping method.
|
| |
Convex polygons in the plane.
Drawing member function is inherited from Polygon2::Draw() const.