|
| Convex2 () |
| Empty.
|
|
| Convex2 (Vector2 *, int) |
| Create a convex polygon from an array of points. More...
|
|
| Convex2 (const Vector2 &, const Vector2 &, const Vector2 &) |
| Create a convex polygon from three points. More...
|
|
| Convex2 (const QVector< Vector > &) |
| Create a convex polygon. More...
|
|
| Convex2 (const QVector< Vector2 > &) |
| Create a convex polygon. More...
|
|
| Convex2 (const Box2 &) |
| Create a convex from a box. More...
|
|
| Convex2 (const Hexagon2 &) |
| Create a convex from a hexagon. More...
|
|
| ~Convex2 () |
| Empty.
|
|
bool | Cut (const Line2 &) |
| Cut the convex polygon by a line. More...
|
|
bool | addIntersectionBy (const Segment2 &) |
| Compute the intersection between the convex polygon and a segment. More...
|
|
double | R (const Vector2 &) const |
| Compute the squared distance between a point and a convex polygon. More...
|
|
Vector2 | Normal (const Vector2 &) const |
| Compute the normal vector between a point and a convex polygon. More...
|
|
bool | Inside (const Convex2 &) const |
| Test if a convex is inside another one. More...
|
|
Convex2 | Minkowski (const Convex2 &) const |
| Straightforward implementation of the Minkowski sum of two convex. More...
|
|
| Polygon2 () |
| Create an empty polygon.
|
|
| Polygon2 (Vector2 *, int) |
| Create a polygon given an array of points. More...
|
|
| Polygon2 (const Vector2 &, const Vector2 &, const Vector2 &) |
| Create a triangle. More...
|
|
| Polygon2 (const Vector2 &, const Vector2 &, const Vector2 &, const Vector2 &) |
| Create a quadrangle. More...
|
|
| Polygon2 (const QVector< Vector > &) |
| Create a polygon. More...
|
|
| Polygon2 (const QVector< Vector2 > &) |
| Create a polygon. More...
|
|
| Polygon2 (const Triangle2 &) |
| Create a triangle. More...
|
|
| Polygon2 (const Box2 &) |
| Create a polygon from a box. More...
|
|
| Polygon2 (const Hexagon2 &) |
| Create a hexagon. More...
|
|
| Polygon2 (const Pentagon2 &) |
| Create a pentagon. More...
|
|
| Polygon2 (const Quadrangle2 &) |
| Create a quadrangle. More...
|
|
| Polygon2 (const Polygonal &) |
| Create a planar polygon for a polygon. More...
|
|
Box2 | GetBox () const |
| Compute the bounding box of the polygon. More...
|
|
void | Translate (const Vector2 &) |
| Translate the polygon by a given vector. More...
|
|
void | Scale (const double &) |
| Scale the polygon by a given factor. More...
|
|
void | Rotate (const Matrix2 &) |
| Rotate the polygon. More...
|
|
void | Append (const Vector2 &) |
| Add a vertex to the polygon. More...
|
|
Vector2 & | Vertex (int) |
| Read write access to the i-th point. More...
|
|
Vector2 | Vertex (int) const |
| Read only access to the i-th point. More...
|
|
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. More...
|
|
int | Size () const |
| Return the number of vertices of the polygon.
|
|
double | Length () const |
| Compute the perimeter 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. More...
|
|
Vector2 | NormalAtLength (const double &) const |
| Return the normal at the position of the point on the polygon. More...
|
|
bool | Inside (const Vector2 &) const |
| Check if a point is inside or outside of the polygon. More...
|
|
double | R (const Vector2 &) const |
| Compute the squared distance between a point and a polygon. More...
|
|
double | RC (const Vector2 &) const |
| Compute the squared distance between a point and the contour of the polygon. More...
|
|
double | R (const Line2 &) const |
| Compute the distance from a polygon to a line. More...
|
|
double | Signed (const Vector2 &) const |
| Compute the signed distance between a point and a polygon. More...
|
|
bool | IntersectSegment (const Segment2 &) const |
| Test if a segment intersects the polygon. More...
|
|
double | Area () const |
| Compute the area of the polygon.
|
|
Vector2 | Centroid () const |
| Compute the centroid of the polygon. More...
|
|
Vector2 | Center () const |
| Compute the barycenter of the polygon. More...
|
|
void | Subdivide (int, QVector< Vector2 > &, QVector< int > &) const |
| Create an n-adic subdivision of a polygon. More...
|
|
void | Expand (const double &) |
| Expand the polygon by a given distance. More...
|
|
void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| Draw a polygon. More...
|
|
Polygon2 | Resampled (const double &) const |
| Resample the edges of the polygon. More...
|
|
QVector< int > | EarClip () const |
| Compute a simple polygon triangulation using a ear clipping method. More...
|
|
Convex polygons in the plane.