![]() |
Prusa Slicer 2.6.0
|
An abstraction of a directed line segment with two points. More...
#include <src/libnest2d/include/libnest2d/geometry_traits.hpp>
Inheritance diagram for libnest2d::_Segment< P >:
Collaboration diagram for libnest2d::_Segment< P >:Public Types | |
| using | PointType = P |
Public Member Functions | |
| _Segment ()=default | |
| _Segment (const P &p, const P &pp) | |
| const P & | first () const BP2D_NOEXCEPT |
| Get the first point. | |
| const P & | second () const BP2D_NOEXCEPT |
| The end point. | |
| void | first (const P &p) BP2D_NOEXCEPT |
| void | second (const P &p) BP2D_NOEXCEPT |
| Radians | angleToXaxis () const |
| Returns the angle measured to the X (horizontal) axis. | |
| template<class Unit = TCompute<P>> | |
| Unit | sqlength () const |
| The length of the segment in the measure of the coordinate system. | |
Private Attributes | |
| Radians | angletox_ = std::nan("") |
| P | p1 |
| P | p2 |
An abstraction of a directed line segment with two points.
| using libnest2d::_Segment< P >::PointType = P |
|
inlinedefault |
|
inline |
|
inline |
Returns the angle measured to the X (horizontal) axis.
References libnest2d::getX(), libnest2d::getY(), and libnest2d::Pi_2.
Here is the call graph for this function:
|
inline |
Get the first point.
References libnest2d::PointPair< P >::p1.
Referenced by boost::geometry::traits::indexed_access< bp2d::Segment, 0, 0 >::get(), boost::geometry::traits::indexed_access< bp2d::Segment, 0, 1 >::get(), libnest2d::pointlike::horizontalDistance(), boost::geometry::traits::indexed_access< bp2d::Segment, 0, 0 >::set(), boost::geometry::traits::indexed_access< bp2d::Segment, 0, 1 >::set(), and libnest2d::pointlike::verticalDistance().
Here is the caller graph for this function:
|
inline |
References libnest2d::_Segment< P >::angletox_, and libnest2d::PointPair< P >::p1.
|
inline |
The end point.
References libnest2d::PointPair< P >::p2.
Referenced by boost::geometry::traits::indexed_access< bp2d::Segment, 1, 0 >::get(), boost::geometry::traits::indexed_access< bp2d::Segment, 1, 1 >::get(), libnest2d::pointlike::horizontalDistance(), boost::geometry::traits::indexed_access< bp2d::Segment, 1, 0 >::set(), boost::geometry::traits::indexed_access< bp2d::Segment, 1, 1 >::set(), and libnest2d::pointlike::verticalDistance().
Here is the caller graph for this function:
|
inline |
References libnest2d::_Segment< P >::angletox_, and libnest2d::PointPair< P >::p2.
|
mutableprivate |
Referenced by libnest2d::_Segment< P >::first(), and libnest2d::_Segment< P >::second().
|
inherited |
|
inherited |