Skip to content

Commit

Permalink
pre 2.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
skramm committed Aug 2, 2022
1 parent 003055b commit bb7a790
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
9 changes: 6 additions & 3 deletions docs/homog2d_history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

See [Release page](https://github.com/skramm/homog2d/releases).

- planned:
- add inversion of a 8x8 Matrix using Gauss-Jordan Elimination, to remove dependency for computing H from 2x4 points
- planned (no specific order):
- Ellipse/line, ellipse/ellipse intersection (hard task...)
- provide clear interface to extend drawing capabilities using other back-ends
- add (optional) common root class, to be able to store heterogeneous objects in container
- add polygon union and intersection
- add SVG I/O

- current master branch
- ...

- [v2.8](https://github.com/skramm/homog2d/releases/tag/v2.8), released on 2022-08-02
- extended circle API, with building from 2 or 3 points, see [manual](homog2d_manual.md#p_circle)
- added `isColinear()` to check for colinearity of 3 points, see [manual](homog2d_manual.md#misc)
- added `getBisector()` to class `Segment_`, return bisector line
Expand All @@ -21,7 +24,7 @@ See [Release page](https://github.com/skramm/homog2d/releases).
- added `type()` function to all primitives, will return a `Type` enum, that can be printed with `getString()`
- added `getExtended()` to class `Segment_` and class `FRect_`
- added `getOrthogSegment(Point2d_)` to `Line2d_`
- added `distTo()` between a point and a segment
- added `distTo()` between a point and a segment
- added `split()` to segments
- fixed `isInside()` member functions
- added `getRotatedLine()` to class Line2d_
Expand Down
12 changes: 12 additions & 0 deletions docs/homog2d_qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ A: I don't see any reason why that would not be the case, as long as you are abl
However, all the additional stuff here (Opencv graphical demo, test files, ...) will probably not build "out of the box", and will require some build tweaking.
</dd>

<dt>
Q: How do I know the version that I have installed on my machine?
</dt>
<dd>
A: easy, add this in your app (of check for that symbol in the file).
<pre>
std::cout << "version: " << HOMOG2D_VERSION << '\n';
</pre>
</dd>

<a name="assert_trigger"></a>
<dt>
Q: I have an unexpected assert that gets triggered when I use this library in my code.
Expand Down Expand Up @@ -67,6 +77,8 @@ Besides the fact that I have already used it with other projects, it also has th
This doesn't seem to be the case for, say, [SDL2](https://www.libsdl.org/) or other backends.
<br>
But writing a binding for other libraries shouldn't be too difficult, assuming they have these.
<br>
<b>Note (2022-08-02): future releases will include SVG I/O !</b>
</dd>

<dt>
Expand Down
2 changes: 1 addition & 1 deletion homog2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ See https://github.com/skramm/homog2d
#include <Eigen/Dense>
#endif

#define HOMOG2D_VERSION 2.71
#define HOMOG2D_VERSION 2.8

#ifdef HOMOG2D_USE_OPENCV
#include "opencv2/imgproc.hpp"
Expand Down
13 changes: 12 additions & 1 deletion misc/homog2d_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@ TEST_CASE( "Segment", "[seg1]" )
Segment_<NUMTYPE> s1( Point2d(0,0), Point2d(2,2) );
Segment_<NUMTYPE> s2( Point2d(2,0), Point2d(0,2) );
auto bis = s1.getBisector();
CHECK( bis == s2.getLine() );
CHECK( bis == s2.getLine() );
}
{ // test that points on a line at equal distance from a point, when
// transformed in a segment, we get back as middle point the same one.
Expand All @@ -2204,6 +2204,17 @@ TEST_CASE( "Segment", "[seg1]" )
}
}

TEST_CASE( "Segment-split", "[seg-split]" )
{
Segment_<NUMTYPE> s1( Point2d(0,0), Point2d(2,0) );
auto psegs1 = s1.split();
auto psegs2 = split(s1);
CHECK( psegs1 == psegs2 );

CHECK( psegs1.first == Segment( Point2d(0,0), Point2d(1,0) ) );
CHECK( psegs1.second == Segment( Point2d(1,0), Point2d(2,0) ) );
}

TEST_CASE( "Segment 2", "[seg2]" )
{
{
Expand Down

0 comments on commit bb7a790

Please sign in to comment.