|
|
| Convex2 () |
| | Empty.
|
| | Convex2 (const Polygon2 &) |
| | Create a convex polygon.
|
| | 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 (const Pentagon2 &) |
| | Create a convex from a hexagon.
|
| | Convex2 (const Ellipse2 &, int) |
| | Create a convex from an ellipse.
|
| | Convex2 (const Circle2 &, int) |
| | Create a convex from an ellipse.
|
|
| ~Convex2 () |
| | Empty.
|
| double | Radius () const |
| | Return the radius of the convex polygon.
|
| 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.
|
| Convex2 | Transformed (const FrameScaled2 &) const |
| | Trasform the convex.
|
| Convex2 | Transformed (const Frame2 &) const |
| | Trasform the convex.
|
| bool | Intersect (const Convex2 &) const |
| | Test if two convex intersect.
|
| bool | Intersect (const Box2 &) const |
| | Check the intersection between a convex and a box.
|
| bool | Intersect (const Circle2 &) const |
| | Check the intersection between a convex and a circle.
|
| bool | Intersection (const Convex2 &, QVector< Vector2 > &) const |
| | Test if two convex intersect.
|
| bool | Intersection (const Convex2 &, Convex2 &) const |
| | Check if two polygons intersect, return the convex intersection if they do.
|
| Ia | AxisInterval (const Vector2 &) const |
| | Project a the vertexes of the convex onto an axis.
|
| Convex2 | Minkowski (const Convex2 &) const |
| | Straightforward implementation of the Minkowski sum of two convex.
|
| bool | Overlap (const Convex2 &) const |
| | Test if two convex overlap.
|
|
void | Reorder () |
| | Changer the order of the vertexes: the first vertex is the one with the lowest y value, and in case of tie, the one with the lowest x value.
|
|
| Polygon2 () |
| | Create an empty polygon.
|
| | 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.
|
| | 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.
|
| | Polygon2 (const Circle2 &, int=72) |
| | Create a polygon approximation of an circle.
|
| double | Hausdorff (const Polygon2 &, bool=false) const |
| | Compute the Hausdorff distance between two polygons.
|
| Box2 | GetBox () const |
| | Compute the bounding box of the polygon.
|
| OrientedBox2 | GetOrientedBox () const |
| | Compute the oriented bounding box of the polygon.
|
| Polygon2 | Scaled (const Vector2 &) const |
| | Return the scaled polygon.
|
| Polygon2 | Scaled (const double &) 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 | Rotated (const double &) const |
| | Rotate the polygon.
|
| Polygon2 | Transformed (const Frame2 &) const |
| | Trasform the polygon.
|
| Polygon2 | Transformed (const FrameScaled2 &) 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.
|
| void | Append (const Vector2 &, int) |
| | Add a vertex at the given id 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 | Cut (const Line2 &line, const Vector2 &insidePoint) |
| | Cut the polygon by a line.
|
| bool | Intersect (const Circle2 &) const |
| | Check the intersection between the boundaty of the polygon and a circle.
|
| bool | Intersect (const Triangle2 &) const |
| | Test if a triangle intersects the polygon.
|
| bool | Intersect (const Segment2 &) const |
| | Test if a segment intersects the polygon.
|
| int | Where (const Circle2 &) const |
| | Check the position of a circle againts the polygon.
|
| double | Area (bool=false) const |
| | Compute the (signed) 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.
|
| Vector2 | RandomOn (Random &=Random::R239) const |
| | Generate a random vector on the edge of the polygon.
|
| QVector< int > | EarClip () const |
| | Compute a simple polygon triangulation using a ear clipping method.
|
| void | RemoveColinear (const double &=1e-12) |
| | Remove colinear points from the polygon.
|
Convex polygons in the plane.
Drawing member function is inherited from Polygon2::Draw() const.