|
| void | draw (img::Image< cv::Mat > &, img::DrawParams dp=img::DrawParams()) const |
| |
| void | draw (img::Image< img::SvgImage > &, img::DrawParams dp=img::DrawParams()) const |
| |
| template<typename T > |
| std::pair< SegVec< SV, FPT >, SegVec< SV, FPT > > | getParallelSegs (T dist) const |
| | Returns two parallel segments to the current one in a pair. More...
|
| |
| template<typename T > |
| PointSide | getPointSide (const Point2d_< T > &pt) const |
| | Return side of point pt relatively to the segment (Oriented only) More...
|
| |
| template<typename T > |
| std::pair< OSegment_< FPT >, OSegment_< FPT > > | split (T dist) const |
| | Returns a pair of segments/vectors split by point at arbitrary distance. More...
|
| |
| Type | type () const |
| |
|
| | SegVec () |
| | Default constructor: initializes segment to (0,0)–(1,1) More...
|
| |
| template<typename FP1 , typename FP2 > |
| | SegVec (Point2d_< FP1 > p1, Point2d_< FP2 > p2) |
| | Constructor 2: build segment from two points, can hold different FP types. More...
|
| |
| template<typename FP1 , typename FP2 , typename FP3 , typename FP4 > |
| | SegVec (FP1 x1, FP2 y1, FP3 x2, FP4 y2) |
| | Constructor 3: build segment from two points coordinates, calls constructor 2. More...
|
| |
| template<typename FP1 , typename FP2 > |
| | SegVec (const PointPair2_< FP1, FP2 > &ppts) |
| | Constructor 4: build segment from pair of points. More...
|
| |
| template<typename SV2 , typename FPT2 > |
| | SegVec (const SegVec< SV2, FPT2 > &other) |
| | Copy-Constructor, behavior depends on concrete types. More...
|
| |
|
| SegVec< SV, FPT > | operator- () |
| | Reverse oriented segment. More...
|
| |
| template<typename FP1 , typename FP2 > |
| void | set (const Point2d_< FP1 > &p1, const Point2d_< FP2 > &p2) |
| | Setter. More...
|
| |
| template<typename FP1 , typename FP2 > |
| void | set (const PointPair2_< FP1, FP2 > &ppts) |
| | Setter from a std::pair. More...
|
| |
| template<typename FP1 , typename FP2 , typename FP3 , typename FP4 > |
| void | set (FP1 x1, FP2 y1, FP3 x2, FP4 y2) |
| | Setter from 4 raw point coordinates. More...
|
| |
| template<typename T1 , typename T2 > |
| void | translate (T1 dx, T2 dy) |
| | Translate Segment. More...
|
| |
| template<typename T1 , typename T2 > |
| void | translate (const std::pair< T1, T2 > &pa) |
| | Translate Segment, using pair of values. More...
|
| |
| template<typename TX , typename TY > |
| void | moveTo (TX x, TY y) |
| | Move Segment to other location. More...
|
| |
| template<typename T1 > |
| void | moveTo (const Point2d_< T1 > &pt) |
| | Move Segment to other location, given by pt. More...
|
| |
|
| FRect_< HOMOG2D_INUMTYPE > | getBB () const |
| | Get Bounding Box of segment, always throws but needed so the function getBB(T1,T2) builds, whatever the types and because of variant (. More...
|
| |
| constexpr size_t | size () const |
| | Returns 2. More...
|
| |
| HOMOG2D_INUMTYPE | length () const |
| | Get segment length. More...
|
| |
| constexpr HOMOG2D_INUMTYPE | area () const |
| | A segment always has a null area. More...
|
| |
| std::pair< HOMOG2D_INUMTYPE, HOMOG2D_INUMTYPE > | getVector () const |
| | Get vector of Oriented segment as a pair of values. More...
|
| |
| template<typename SV2 , typename FPT2 > |
| HOMOG2D_INUMTYPE | getAngle (const SegVec< SV2, FPT2 > &other) const |
| | Get angle between segment and other segment. More...
|
| |
| template<typename LP , typename FPT2 > |
| HOMOG2D_INUMTYPE | getAngle (const base::LPBase< LP, FPT2 > &other) const |
| | Get angle between segment and line. More...
|
| |
|
| bool | operator== (const SegVec &s2) const |
| |
| bool | operator!= (const SegVec &s2) const |
| |
| bool | operator< (const SegVec &other) const |
| |
|
| template<typename FPT2 > |
| bool | isInside (const Circle_< FPT2 > &shape) const |
| | Segment is inside Circle. More...
|
| |
| template<typename FPT2 > |
| bool | isInside (const FRect_< FPT2 > &shape) const |
| | Segment is inside FRect. More...
|
| |
| template<typename FPT2 > |
| bool | isInside (const Ellipse_< FPT2 > &shape) const |
| | Segment is inside Ellipse. More...
|
| |
| template<typename FPT2 > |
| constexpr bool | isInside (const OPolyline_< FPT2 > &) const |
| | Segment is inside OPolyline_. More...
|
| |
| template<typename FPT2 > |
| bool | isInside (const CPolyline_< FPT2 > &cpoly) const |
| | Segment is inside CPolyline_. More...
|
| |
|
| template<typename SV2 , typename FPT2 > |
| detail::Intersect< detail::Inters_1, FPT > | intersects (const SegVec< SV2, FPT2 > &) const |
| | Segment/Segment intersection. More...
|
| |
| template<typename FPT2 > |
| detail::Intersect< detail::Inters_1, FPT > | intersects (const Line2d_< FPT2 > &) const |
| | Segment/Line intersection. More...
|
| |
| template<typename FPT2 > |
| detail::IntersectM< FPT > | intersects (const Circle_< FPT2 > &) const |
| | Segment/Circle intersection. More...
|
| |
| template<typename FPT2 > |
| detail::IntersectM< FPT > | intersects (const FRect_< FPT2 > &r) const |
| | Segment/FRect intersection. More...
|
| |
| template<typename PLT , typename FPT2 > |
| detail::IntersectM< FPT > | intersects (const base::PolylineBase< PLT, FPT2 > &other) const |
| | Segment/Polyline intersection. More...
|
| |
| std::pair< int, int > | dsize () const |
| | Get data size expressed as number of bits for, respectively, mantissa and exponent. More...
|
| |
| Dtype | dtype () const |
| | Get numerical data type as a Dtype value, can be stringified with h2d::getString(Dtype) More...
|
| |
| template<typename T > |
| constexpr bool | isInside (const Common< T > &) const |
| | This function is a fallback for all sub-classes that do not provide such a method. More...
|
| |
| size_t | size () const |
| |
| virtual | ~Root () |
| |
|
| PointPair_< FPT > | getPts () const |
| | Returns the points of segment as a std::pair. More...
|
| |
| template<typename T > |
| std::pair< SegVec, SegVec > | getParallelSegs (T dist) const |
| |
| template<typename FPT2 > |
| Point2d_< HOMOG2D_INUMTYPE > | getPointAt (FPT2 dist) const |
| | Returns the point at a distance dist from starting point of oriented vector. More...
|
| |
| std::array< Point2d_< FPT >, 4 > | getOrthogPts () const |
| | Returns the 4 points orthogonal to the segment/vector. More...
|
| |
| std::array< Segment_< FPT >, 4 > | getOrthogSegs () const |
| | Returns the 4 segments/vectors orthogonal to the segment. More...
|
| |
| auto | getLine () const |
| | Returns supporting line. More...
|
| |
| template<typename FPT2 > |
| PointSide | getPointSide (const Point2d_< FPT2 > &pt) const |
| |
| std::pair< SegVec< SV, FPT >, SegVec< SV, FPT > > | split () const |
| | Returns a pair of segments/vectors split by the middle. More...
|
| |
| template<typename T > |
| std::pair< SegVec< typ::IsOSeg, FPT >, SegVec< typ::IsOSeg, FPT > > | split (T dist) const |
| |
| template<typename FPT2 > |
| HOMOG2D_INUMTYPE | distTo (const Point2d_< FPT2 > &, int *segDistCase=0) const |
| | Distance from point to segment. More...
|
| |
| template<typename T > |
| constexpr bool | isParallelTo (const T &other) const |
| |
| auto | getCenter () const |
| | Returns point at middle distance between p1 and p2. More...
|
| |
| SegVec< SV, FPT > | getExtended () const |
| | Returns a segment with same support line but tripled length. More...
|
| |
| auto | getBisector () const |
| | Returns the bisector line of the segment. More...
|
| |
template<typename SV, typename FPT>
class h2d::base::SegVec< SV, FPT >
A line segment, oriented (OSegment_) or not (Segment_). Holds the two points.
This will get instanciated as Segment_ or OSegment_
The difference between theses two types is that with Segment_, the "smallest" point is always stored as first element (see constructor).