#include <Polygon.h>
◆ Polygon() [1/8]
Nice::Polygon::Polygon |
( |
| ) |
|
Default ctor.
This defines a polygon without points.
- Since
- 2017-03-31
◆ Polygon() [2/8]
Nice::Polygon::Polygon |
( |
size_t |
size | ) |
|
|
inline |
◆ Polygon() [3/8]
◆ Polygon() [4/8]
construct the polyogn from a sequence of consecutive lines.
- Parameters
-
linetrain | The line segments that define the polygon. The ctor assumes that the end point of each segment is equal to the start point of the next segment, without checking this assumption. |
- Since
- 2017-03-31
◆ Polygon() [5/8]
Nice::Polygon::Polygon |
( |
| ) |
|
◆ Polygon() [6/8]
Nice::Polygon::Polygon |
( |
size_t |
size | ) |
|
|
inline |
◆ Polygon() [7/8]
◆ Polygon() [8/8]
◆ append() [1/2]
extend the polygon by adding a point at the end.
- Parameters
-
pt | The additional point to be appended. |
- Since
- 2017-03-31
◆ append() [2/2]
◆ boundingRect() [1/2]
Returns the bounding rectangle of the polygon, or Nice::Rect(0,0,0,0) if the polygon is empty.
- See also
- QVector::isEmpty()
◆ boundingRect() [2/2]
Rect Nice::Polygon::boundingRect |
( |
| ) |
const |
◆ close() [1/2]
void Nice::Polygon::close |
( |
void |
| ) |
|
Close the polygon by adding a line from the last to the first point.
- Since
- 2017-03-31
◆ close() [2/2]
void Nice::Polygon::close |
( |
| ) |
|
◆ containsPoint() [1/2]
- Since
- 4.3
Returns true if the given point is inside the polygon according to the specified fillRule; otherwise returns false.
◆ containsPoint() [2/2]
◆ intersect() [1/2]
Check whether any of the line segments intersects with another polygon.
All line segments of this are checked for intersection with the line segments of the other polygon.
- Parameters
-
- Returns
- NoIntersection if no lines intersect, BoundedIntersection if some touch. Note that NoIntersection is also returned if one polygon is entirely within another.
- Since
- 2017-03-30
◆ intersect() [2/2]
◆ isClosed() [1/2]
bool Nice::Polygon::isClosed |
( |
| ) |
const |
|
inline |
◆ isClosed() [2/2]
bool Nice::Polygon::isClosed |
( |
| ) |
const |
|
inline |
◆ lineSeg() [1/2]
Nice::Line Nice::Polygon::lineSeg |
( |
size_t |
idx | ) |
const |
retrieve the idx-th line segment.
- Parameters
-
idx | The 0-based line segment |
- Returns
- The line starting at point idx. If the idx is outside the range of known points, a null line (as defined by Nice, whatever that might be) is returned
- Since
- 2017-03-30
◆ lineSeg() [2/2]
Nice::Line Nice::Polygon::lineSeg |
( |
size_t |
idx | ) |
const |
◆ translate() [1/4]
void Nice::Polygon::translate |
( |
double |
dx, |
|
|
double |
dy |
|
) |
| |
|
inline |
◆ translate() [2/4]
void Nice::Polygon::translate |
( |
double |
dx, |
|
|
double |
dy |
|
) |
| |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Translates all points in the polygon by ({dx}, {dy}).
- See also
- translated()
◆ translate() [3/4]
void Nice::Polygon::translate |
( |
const Point & |
offset | ) |
|
◆ translate() [4/4]
void Nice::Polygon::translate |
( |
const Point & |
offset | ) |
|
Translate all points in the polygon by the given offset.
- See also
- translated()
◆ translated() [1/4]
Polygon Nice::Polygon::translated |
( |
double |
dx, |
|
|
double |
dy |
|
) |
| const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Since
- 4.6
Returns a copy of the polygon that is translated by ({dx}, {dy}).
- See also
- translate()
◆ translated() [2/4]
Polygon Nice::Polygon::translated |
( |
double |
dx, |
|
|
double |
dy |
|
) |
| const |
|
inline |
◆ translated() [3/4]
◆ translated() [4/4]
Returns a copy of the polygon that is translated by the given offset.
- Since
- 4.6
- See also
- translate()
The documentation for this class was generated from the following files:
- /home/nirva/insroot/include/Nice/Map/Polygon.h
- TwiceAsNice/nice/src/libNice/Nice/Map/Polygon.cc