Skip to content

Commit

Permalink
deprecate unused function, doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skramm committed Dec 24, 2023
1 parent 470f93e commit b6c7c0f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/homog2d_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,10 @@ CPolyline plo;
OPolyline plc;
// ... set points
std::cout << pls.isConvex() ? "is convex\n" : "is NOT convex\n"; // or free function: isConvex(plc)
assert( !plo.isConvex() ); // open is not a polygon, so it can't be convex
assert( !plo.isConvex() ); // open is not a Simple Polygon, so it can't be convex
```
#### 3.4.7 - Comparison of Polyline objects
#### 3.4.8 - Comparison of Polyline objects
Polyline objects can be compared, however the behavior differs whether it is closed or not.
Consider these two sets of points:
Expand Down Expand Up @@ -969,7 +969,7 @@ B: `(0,0)-(0,3)-(1,3)-(0,0)-(3,0)-(3,1)`
For more details, see [homog2d_Polyline.md](homog2d_Polyline.md).
#### 3.4.8 - Rotation/mirroring
#### 3.4.9 - Rotation/mirroring
<a name="polyline_rotate"></a>
All the primitives can be rotated using a homography (see following section), but in some situations you may only need "quarter-circle" rotations (mutiples of 90°).
Expand Down Expand Up @@ -1003,7 +1003,7 @@ poly.rotate( Rotate::CW, org ); // or free function: rotate( poly, Rotate::CW, o
```
#### 3.4.9 - Building a Parallelogram
#### 3.4.10 - Building a Parallelogram
<a name="build_parallelo"></a>
The member function `setParallelogram()` takes 3 points (may be of different floating-point types) and builds the corresponding parallelogram by computing the missing 4th point.
Expand All @@ -1014,7 +1014,7 @@ Is only available for "closed" type.
[(source)](../misc/showcase/showcase18.cpp)
#### 3.4.9 - Building a Regular Convex Polygon (RCP)
#### 3.4.11 - Building a Regular Convex Polygon (RCP)
<a name="set_RCP"></a>
The member function `set( dist, nb )` will build a Regular Convex Polygon of `nb` points, that will be at a distance `dist` from center.
Expand All @@ -1032,7 +1032,7 @@ The minimum value for `nb` is 3, the function will throw if less.
[source](../misc/figures_src/src/polyline_rcp_1.cpp)
#### 3.4.11 - Importing from boost::geometry
#### 3.4.12 - Importing from boost::geometry
<a name="boost_geom_1"></a>
If the symbol `HOMOG2D_USE_BOOSTGEOM` is defined (see [build options](#build_options)), you can import a Polyline from a boost Polygon type.
Expand Down
16 changes: 9 additions & 7 deletions homog2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6239,12 +6239,12 @@ Two tasks:
#ifdef HOMOG2D_USE_OPENCV
void draw( img::Image<cv::Mat>&, img::DrawParams dp=img::DrawParams() ) const;

template<typename T>
void impl_draw_pl( img::Image<T>& ) const;
#else
template<typename T>
void impl_draw_pl( img::Image<T>& ) const // this one does nothing
{}
// template<typename T>
// void impl_draw_pl( img::Image<T>& ) const;
//#else
// template<typename T>
// void impl_draw_pl( img::Image<T>& ) const // this one does nothing
// {}
#endif

}; // class PolylineBase
Expand Down Expand Up @@ -10576,6 +10576,8 @@ base::LPBase<LP,FPT>::impl_draw_LP(
/////////////////////////////////////////////////////////////////////////////

#ifdef HOMOG2D_USE_OPENCV
#if 0
// DEPRECATED (???)
//------------------------------------------------------------------
/// Extension to PolylineBase<PLT,FPT>::draw(), to draw point indexes
/**
Expand All @@ -10600,7 +10602,7 @@ base::PolylineBase<PLT,FPT>::impl_draw_pl( img::Image<T>& im ) const
);
}
}

#endif
//------------------------------------------------------------------
/// Draw \c FRect (Opencv implementation)
template<typename FPT>
Expand Down

0 comments on commit b6c7c0f

Please sign in to comment.