![]() |
Prusa Slicer 2.6.0
|
Subclass of _Item for regular rectangle items. More...
#include <src/libnest2d/include/libnest2d/nester.hpp>
Inheritance diagram for libnest2d::_Rectangle< Sh >:
Collaboration diagram for libnest2d::_Rectangle< Sh >:Public Types | |
| using | Unit = TCoord< Sh > |
| using | ShapeType = Sh |
| The type of the shape which was handed over as the template argument. | |
| using | Iterator = VertexConstIterator |
| Iterator type for the outer vertices. | |
Static Public Member Functions | |
| static BP2D_CONSTEXPR Orientation | orientation () |
| Get the orientation of the polygon. | |
| static bool | intersects (const _Item &sh1, const _Item &sh2) |
| static bool | touches (const _Item &sh1, const _Item &sh2) |
Private Types | |
| using | TO = Orientation |
| enum | Convexity |
| using | Coord = TCoord< TPoint< Sh > > |
| using | Vertex = TPoint< Sh > |
| using | Box = _Box< Vertex > |
| using | VertexConstIterator = typename TContour< Sh >::const_iterator |
Private Member Functions | |
| const Sh & | infaltedShape () const |
| void | invalidateCache () const BP2D_NOEXCEPT |
Static Private Member Functions | |
| static bool | vsort (const Vertex &v1, const Vertex &v2) |
Private Attributes | |
| Sh | sh_ |
| Vertex | translation_ |
| Radians | rotation_ |
| Coord | inflation_ |
| bool | has_rotation_ |
| bool | has_translation_ |
| bool | has_inflation_ |
| Sh | tr_cache_ |
| bool | tr_cache_valid_ |
| double | area_cache_ |
| bool | area_cache_valid_ |
| Sh | inflate_cache_ |
| bool | inflate_cache_valid_ |
| Convexity | convexity_ |
| VertexConstIterator | rmt_ |
| VertexConstIterator | lmb_ |
| bool | rmt_valid_ |
| bool | lmb_valid_ |
| struct libnest2d::_Item::BBCache | bb_cache_ |
| int | binid_ |
| int | priority_ |
| bool | fixed_ |
| std::function< void(_Item &)> | on_packed_ |
Subclass of _Item for regular rectangle items.
|
privateinherited |
|
privateinherited |
|
inherited |
Iterator type for the outer vertices.
Only const iterators can be used. The _Item type is not intended to modify the carried shapes from the outside. The main purpose of this type is to cache the calculation results from the various operators it supports. Giving out a non const iterator would make it impossible to perform correct cache invalidation.
|
inherited |
The type of the shape which was handed over as the template argument.
|
private |
| using libnest2d::_Rectangle< Sh >::Unit = TCoord<Sh> |
|
privateinherited |
|
privateinherited |
|
strongprivateinherited |
|
inline |
|
inlineinherited |
Calculate the shape area.
The method returns absolute value and does not reflect polygon orientation. The result is cached, subsequent calls will have very little cost.
|
inlineinherited |
|
inlineinherited |
Iterator tho the first contour vertex in the polygon.
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Alias to begin()
|
inlineinherited |
Alias to end()
|
inlineinherited |
Iterator to the last contour vertex.
|
inline |
References libnest2d::getY(), and libnest2d::_Item< Sh >::vertex().
Here is the call graph for this function:
|
inlineinherited |
|
inlineprivateinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineprivateinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
Get the orientation of the polygon.
The orientation have to be specified as a specialization of the OrientationType struct which has a Value constant.
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Modify a vertex.
Note that this method will invalidate every cached calculation result including polygon offset and transformations.
| idx | The index of the requested vertex. |
| v | The new vertex data. |
|
inlineinherited |
Convert the polygon to string representation. The format depends on the implementation of the polygon.
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get a copy of an outer vertex within the carried shape.
Note that the vertex considered here is taken from the original shape that this item is constructed from. This means that no transformation is applied to the shape in this call.
| idx | The index of the requested vertex. |
|
inlineinherited |
The number of the outer ring vertices.
|
inlinestaticprivateinherited |
|
inline |
References libnest2d::getX(), and libnest2d::_Item< Sh >::vertex().
Here is the call graph for this function:
|
mutableprivateinherited |
|
mutableprivateinherited |
|
privateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
|
privateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
|
privateinherited |