doyubkim / fluid-engine-dev

Fluid simulation engine for computer graphics applications
https://fluidenginedevelopment.org/
MIT License
1.88k stars 263 forks source link

Adding isInside to the surface classes #232

Closed doyubkim closed 5 years ago

doyubkim commented 5 years ago

This revision adds isInside function to the surface classes. This enables the sub-classes for Surface2 and 3 to implement inside/outside check so that Collider2 and 3 can use the best possible inside/outside tests. For instance, if we know a surface is a signed-distance field, we can simply check its sign to perform the test. This will fix Issue #230 since the root cause of #230 is the approximated far-field SDF making inaccurate gradient descent for closest point query which was originally used for inside/outside testing from colliders.

codecov-io commented 5 years ago

Codecov Report

Merging #232 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
+ Coverage    88.1%   88.17%   +0.06%     
==========================================
  Files         547      547              
  Lines       36685    36781      +96     
==========================================
+ Hits        32322    32432     +110     
+ Misses       4363     4349      -14
Impacted Files Coverage Δ
include/jet/implicit_surface_set3.h 100% <ø> (ø) :arrow_up:
include/jet/implicit_surface_set2.h 100% <ø> (ø) :arrow_up:
include/jet/surface2.h 100% <ø> (ø) :arrow_up:
include/jet/surface3.h 100% <ø> (ø) :arrow_up:
src/jet/surface_set2.cpp 82.11% <100%> (+0.75%) :arrow_up:
...c/tests/unit_tests/implicit_surface_set2_tests.cpp 100% <100%> (ø) :arrow_up:
src/jet/collider2.cpp 79.16% <100%> (-0.43%) :arrow_down:
include/jet/surface_set3.h 100% <100%> (ø) :arrow_up:
src/jet/surface3.cpp 91.89% <100%> (+0.98%) :arrow_up:
src/jet/implicit_surface3.cpp 81.81% <100%> (+4.04%) :arrow_up:
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6e2623a...ba7173c. Read the comment docs.

doyubkim commented 5 years ago

@utilForever It's passing the CI now. Shall we merge?

utilForever commented 5 years ago

@doyubkim I was busy yesterday. Can I review it today? :)

doyubkim commented 5 years ago

@utilForever sure no problem!