homog2d library
|
See Release page.
PolylineBase_
classIntersect()
family of functions, so that they always return the same type(NIL)
size()
member and free functions: now all of these return the number of points that the primitive has, as a size_t
type, see details here.OSegment
(code shared with Segment
), enabling getting side of point relatively to vector with member function getPointSide()
, see TODO: ADD LINK TO MANUALCpolyline
: renaming isPolygon()
is now isSimple()
getOffsetPoly()
to get a polygon "offsetted", see showcase22 (preliminar).-
and getVector()
to OSegment
. The latter member function returns the associated displacement as a pair of numerical values.getAngle()
for segments: now returns the full range [-PI:+PI] if both are oriented.getBisectorLines()
for polyline objectsgetOSegment()
to Polyline class (oriented segment)getLmPoint()
and associated functions now return a std::pair
, so user can fetch its position in the container. The downside is that it is now not possible to use a std::list
as input container. See details here.getOrthogonalLine()
to getOrthogLine()
so it's similar to getOrthogSegment()
getPointAt()
to class OSegment
std::variant
, see here. This was possible by moving to C++17, which is now a requirement.std::variant
.getMinMax()
of a pair of Point2d
path
element, see manualHOMOG2D_SVG_CHECK_INIT
macrofindNearestPoint()
, added checking, and wont return query point if it is inside the containerdraw()
free function can now draw container holding variant type:
translate()
member and free functions, added moveTo()
member and free functions.CPolyline
as a Regular Convex Polygon (RCP), either through constructor or through set()
function, see manual.genRandomColors()
dsize()
member and free function, see heresetAttrString()
to img::DrawParams
(SVG only)ttmath
types as default type (if used)set()
function for FRect_
FRect_
setParallelogram()
to PolylineBase_
, see showcase18.getInscribedCircle()
to FRect
findNearestPoint()
, findFarthestPoint()
, findNearestFarthestPoint()
and demogetClosestPoints()
between two Polyline objects (see demo).img::putText()
, to write text on backend image, and related img::DrawParams::setFontSize()
side( Point2d, Line2d )
FRect
and Line2d
: now returns a IntersectM
type, because there can be only one intersection point (same for Circle
/Circle
)/permissive-
(see https://github.com/skramm/homog2d/issues/5)HOMOG2D_NOWARNINGS
, see buid options.getOrthogPts()
and getOrthogSegs()
to class Segment
.getCvPt()
(Opencv binding) by a more generic getPt()
that can work with multiple types, see bindings section.getCvPts()
replaced by getPts()
detail::Common
misc/showcase/gif_duration.data
Frect
constructor using a pair of pointsSegment_::getMiddlePoint()
by Segment_::getCenter()
FRect_::center()
by FRect_::getCenter()
areCollinear()
to check for colinearity of 3 points, see manualgetBisector()
to class Segment_
, return bisector linearea()
and length()
to class Circle_
and class Ellipse_
(member and free functions)isInf()
to check if points are at infinitytype()
function to all primitives, will return a Type
enum, that can be printed with getString()
getExtended()
to class Segment_
and class FRect_
getOrthogSegment(Point2d_)
to Line2d_
distTo()
between a point and a segmentsplit()
to segmentsisInside()
member functionsgetRotatedLine()
to class Line2d_getParallelSegs()
to class Segment_
rotate()
to class Polyline_
translate()
to Segment
img::write()
abstraction member function for image disk writingSegment
from a std::pair
of points (constructor and set()
member function)convexHull()
and associate demostd::function
as third argumentimg::clear()
, and added img::Color
data typePolyline_
types.Ellipse::isCircle()
FRect
/Polyline
)HOMOG2D_BIND_X
)Polyline_
Polyline_
getBB()
to get the bounding box of two arbitrary objectsPolyline
class, now split in two classes, CPolyline
and OPolyline
(closed and open)auto
return types!)getBB()
and FRect::getBoundingCircle()
Polyline
: added length()
, area()
, isPolygon()
, getBB()
FRect::intersection
, to get the intersection areaEllipse
type, and associated homography (circle=>ellipse and ellipse=>ellipse)CvDrawParams
=> DrawParams
(intent: planning multiple graphics back-end)Frect
union and intersection areas: unionArea()
and intersectArea()
, associated operators and free functionsPolyline
so that they can be comparedPoint2d
, FRect
, Circle
, Polyline
and Ellipse
now all have a translate(dx,dy)
member functionh2d
(shorter)KeyboardLoop
to handle keyboard inputs and loop in Opencv demonobuild
in makefile)Circle_
, Polyline_
, FRect_
and associated code (intersection, isInside, ...)type()
and dtype()
to root class (and associated enums), to be able to fetch underlyng type at runtime.intersectsCircle()
and intersectsRectangle()
to intersects()
Root::addOffset()
Segment::get()
to Segment::getPts()
and FRect::get2Pts()
to FRect::getPts()
Polyline
class (intersection code, ...)Polyline::isPolygon()
, Polyline::length()
and corresponding free functionsgetBB()
(member function and free functions) to Polyline
, Segment
and Circle
HOMOG2D_INUMTYPE
buildFrom4Points()
to Homography classmake testall
)Homogr
isParallelTo()
Segment
type and associated codeHOMOG2D_SAFE_MODE
with HOMOG2D_NOCHECKS
, so that checking is enabled by default.intersectsCircle()
, to get intersection with circlesIntersect
get()
: this Intersect
member function will return a std::pair
holding the two intersection points.getPoints()
distToPoints()
member function: now distTo()
, and can be used with lines as argument.Hmatrix
, for point to line (or line to point) mapping.clear()
to init()
for matricesgetParallelLine()
(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.