-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix octree bounds reducing #1532
Conversation
for some resolution/bounds ratio octree bounds can be unexpectedly reduced
Interesting, can you add a unit test with an example? @jkammerl can you have a look? |
of course bounds can be corrected in adoptBoundingBoxToPoint with treedepth=srcTreeDepth+2 (worst scenario), but I didn't use bounds correction for perfomance reasons and got points in invalid leaves. |
Can you put this into a unit test and add it to the pull request? That would be great :). |
for some testcases it can change tree depth and break tree deserialization
Nice catch. 👍
|
@SergioRAgostinho I guess they where computed and then later manually verified. If we don't change GFPFH in between, putting in the newly computed values should be fine. @pkuhto can you add that to the pull request as well? Thanks! |
LGTM 👍 Squash all the commits into a single one and this should be good to go. |
double min_x2, min_y2, min_z2, max_x2, max_y2, max_z2; | ||
tree.getBoundingBox (min_x2, min_y2, min_z2, max_x2, max_y2, max_z2); | ||
|
||
ASSERT_EQ( min_x2 == min_x, true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ASSERT_DOUBLE_EQ
to make assertions about floating-point numbers.
@SergioRAgostinho note that Github can do this. You will get an option to squash commits before merging when you press "Merge pull request" button. |
@taketwo Should we squash-merge this and then just submit a minor corrections to those asserts? |
Sure. Please merge and I'll make a correction PR. |
- fixed octree bounds reducing, for some resolution/bounds ratio octree bounds can be unexpectedly reduced - added unit test for octree bounds correction - fix tree bounds enlarge due to precision issues + unit test, for some testcases it can change tree depth and break tree deserialization
for some resolution/bounds ratio octree bounds can be unexpectedly reduced