See Release page.
-
planned (no specific order):
- Ellipse/line, ellipse/ellipse intersection (hard task...)
- add polygon union and intersection
- add non-convex polyline splitting into polygons
- extend runtime polymorphism capabilities
- add list-initialization with points to
PolylineBase_
class - cleanout the
Intersect()
family of functions, so that they always return the same type - add some feature to be able to print coordinates with desired precision at runtime
- add
Vector
type (defined by dx,dy)
-
current Work In Progress
- polygon minimization
-
current master branch
- heavy architectural change: runtime polymorphism is now achieved in a more modern way, using
std::variant
, see here. This was possible by moving to C++17. - removed requirement to pointer-based runtime polymorphism to import SVG file, by using
std::variant
. - generalization of bounding box of pair of objects
- SVG import: added reading of image size in file
- added
getMinMax()
of a pair ofPoint2d
- added SVG import of
path
element, see manual - bugfixes:
- added stream operator to draw parameters
- removed unneeded
HOMOG2D_SVG_CHECK_INIT
macro
- heavy architectural change: runtime polymorphism is now achieved in a more modern way, using
-
v2.11, released on 2023-12-26
- extended
translate()
member and free functions, addedmoveTo()
member and free functions. - added building a
CPolyline
as a Regular Convex Polygon (RCP), either through constructor or throughset()
function, see manual. - added helper function
genRandomColors()
- bufixes, fixed enclosing of Polyline objects (#10)
- added
dsize()
member and free function, see here - added
setAttrString()
toimg::DrawParams
(SVG only) - added preliminar Boost Geometry types bindings
- enabled
ttmath
types as default type (if used) - added computation of IoU ("Intersection over Union") of two rectangles, see here for details.
- templated the
set()
function forFRect_
- added full step rotation for
FRect_
- added Minimum Enclosing Circle (MEC) from a set of points, see showcase13.
- added
setParallelogram()
toPolylineBase_
, see showcase18. - added
getInscribedCircle()
toFRect
- extended
-
v2.10, released on 2023-02-19
- fixed normalization for points and lines
- added points at infinity tests
- added
findNearestPoint()
,findFarthestPoint()
,findNearestFarthestPoint()
and demo - added
getClosestPoints()
between two Polyline objects (see demo). - added
img::putText()
, to write text on backend image, and relatedimg::DrawParams::setFontSize()
- added
side( Point2d, Line2d )
- fixed intersection of
FRect
andLine2d
: now returns aIntersectM
type, because there can be only one intersection point (same forCircle
/Circle
) - added showcase16
- fixed issues occuring with msvc in c++17 mode with flag
/permissive-
(see #5) - fixed issues with inlining (thanks to @Djuego for pointing out!)
- added build symbol
HOMOG2D_NOWARNINGS
, see buid options. - added support for big math library ttmath (preliminar, see Numerical data types.).
- add
getOrthogPts()
andgetOrthogSegs()
to classSegment
. - added MSVC compiler to the Github Action CI automated tests
- added support for importing Boost::geometry polygons (preliminar), see an example here.
- breaking changes:
- replaced/renamed
getCvPt()
(Opencv binding) by a more genericgetPt()
that can work with multiple types, see bindings section. - same for
getCvPts()
replaced bygetPts()
- replaced/renamed
-
v2.9, released on 2022-11-23
- added SVG drawing
- added SVG import, see related manual section.
- enable runtime polymorphism (wip), through class
detail::Common
- added variable frame rate for showcase demos, see
misc/showcase/gif_duration.data
- added constructor for horizontal or vertical line using a point
- added bounding box for a container holding any primitive (see manual/misc. section)
- added
Frect
constructor using a pair of points - added SVG import for angled ellipses
- added code to get the extreme points (bottom, top, left,right) of a Polyline and a set of points (see here)
- breaking changes:
- renamed
Segment_::getMiddlePoint()
bySegment_::getCenter()
- renamed
FRect_::center()
byFRect_::getCenter()
- renamed
-
v2.8, released on 2022-08-02
- extended circle API, with building from 2 or 3 points, see manual
- added
areCollinear()
to check for colinearity of 3 points, see manual - added
getBisector()
to classSegment_
, return bisector line - added
area()
andlength()
to classCircle_
and classEllipse_
(member and free functions) - improved ellipse demo (Opencv-dependent)
- added
isInf()
to check if points are at infinity - added
type()
function to all primitives, will return aType
enum, that can be printed withgetString()
- added
getExtended()
to classSegment_
and classFRect_
- added
getOrthogSegment(Point2d_)
toLine2d_
- added
distTo()
between a point and a segment - added
split()
to segments - fixed
isInside()
member functions - added
getRotatedLine()
to class Line2d_ - added
getParallelSegs()
to classSegment_
- added
rotate()
to classPolyline_
-
v2.7, released on 2022-05-18
- added
translate()
toSegment
- added
img::write()
abstraction member function for image disk writing - added initializing
Segment
from astd::pair
of points (constructor andset()
member function) - added
convexHull()
and associate demo - added generic drawing function (for containers) with a
std::function
as third argument - added "Segments" demo
- added arguments to abstract
img::clear()
, and addedimg::Color
data type - moved base classes from main namespace to sub-namespace
- cleaned out segment/line, segment/segment, segment/circle intersection code
- added convexity test for
Polyline_
types.
- added
-
v2.6, released on 2021-12-21
- added threshold as default argument to
Ellipse::isCircle()
- fixed manual typos, added "dev" doc page
- added speed test, manual edits
- added missing intersection function (
FRect
/Polyline
) - added binding template constructor for points/lines (see
HOMOG2D_BIND_X
) - added centroid computation to
Polyline_
- added minimizing function to
Polyline_
- added generalized
getBB()
to get the bounding box of two arbitrary objects - added more tests
- added some missing free functions
- API changes: refactoring of
Polyline
class, now split in two classes,CPolyline
andOPolyline
(closed and open) - many bugfixes and improvments
- added precision tests, plots, and details on thresholds, see homog2d_thresholds.md.
- added lots of code demos and showcases as gif images, see homog2d_showcase.md.
- added threshold as default argument to
-
v2.5, released on 2021-07-31
- switch to C++14 (so we can use
auto
return types!) - added generalised
getBB()
andFRect::getBoundingCircle()
- added constructor to build horizontal of vertical lines
Polyline
: addedlength()
,area()
,isPolygon()
,getBB()
- added
FRect::intersection
, to get the intersection area - added
Ellipse
type, and associated homography (circle=>ellipse and ellipse=>ellipse) - added speed test to compare Ellipse code with and without memory/speed tradeoff (see build_options for details).
- renamed
CvDrawParams
=>DrawParams
(intent: planning multiple graphics back-end) - added
Frect
union and intersection areas:unionArea()
andintersectArea()
, associated operators and free functions - added normalization to closed
Polyline
so that they can be compared - classes
Point2d
,FRect
,Circle
,Polyline
andEllipse
now all have atranslate(dx,dy)
member function
- switch to C++14 (so we can use
-
v2.4, released on 2021-07-12
- Major release, some API changes
- renamed namespace to
h2d
(shorter) - added a template class
KeyboardLoop
to handle keyboard inputs and loop in Opencv demo - added some static "no build" checking for illegal code instanciation (see target
nobuild
in makefile) - added operator * to apply homography to all elements of a container holding points or lines
- added templated types
Circle_
,Polyline_
,FRect_
and associated code (intersection, isInside, ...) - added
type()
anddtype()
to root class (and associated enums), to be able to fetch underlyng type at runtime. - renamed
intersectsCircle()
andintersectsRectangle()
tointersects()
- changed enums for class enums
- deprecated
Root::addOffset()
- Homography now automatically inverted/transposed for lines, see here.
- solved numerical rounding issues
- renamed
Segment::get()
toSegment::getPts()
andFRect::get2Pts()
toFRect::getPts()
- enhanced
Polyline
class (intersection code, ...) - added
Polyline::isPolygon()
,Polyline::length()
and corresponding free functions - added
getBB()
(member function and free functions) toPolyline
,Segment
andCircle
-
v2.3, released on 2021-06-18
- switch to MPLv2 licence
- all computations are now done using default numerical type
HOMOG2D_INUMTYPE
- added
buildFrom4Points()
to Homography class - added templated conversion free functions and member function to Opencv point types
- added full testing with all three arithmetic types (
make testall
) - added segment type and associated features
- demo code heavy refactoring (requires Opencv)
-
v2.2, released on 2021-06-01
- added 2 constructors to
Homogr
- added
isParallelTo()
- API change:
- renamed
drawCvMat()
todraw()
(to make transition to other graphical backends easier) - matrices: renamed
setValue()
toset()
andgetValue()
toget()
- for OpenCv matrices, replaced
getFrom()
by assignment operator - replaced enums
En_OffsetDir
andEn_GivenCoord
with class enumsLineOffset
andGivenCoord
- renamed
- added
Segment
type and associated code - Licence change to MPLv2
- replaced
HOMOG2D_SAFE_MODE
withHOMOG2D_NOCHECKS
, so that checking is enabled by default.
- added 2 constructors to
-
v2.1, released on 2020-04-27.
- added
intersectsCircle()
, to get intersection with circles - intersection data structure name changed, now
Intersect
- the intersection points are now private, they must be fetched with
get()
: thisIntersect
member function will return astd::pair
holding the two intersection points. - added
getPoints()
- added single argument constructors
- renamed
distToPoints()
member function: nowdistTo()
, and can be used with lines as argument. - added new matrix type:
Hmatrix
, for point to line (or line to point) mapping. - renamed
clear()
toinit()
for matrices - added
getParallelLine()
- added
-
v2.0: fully templated.
-
v1.0: initial release, not templated by numerical data type. Same API, works fine. A bit lighter on template stuff.
(1) The rationale behind this interface is that if we had choosen to pass a point as argument, no guarantee would have been given that the point is effectively lying on the line. With this function signature, the function can compute the point itself.