-
Notifications
You must be signed in to change notification settings - Fork 16
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
Code refactoring: Replace Sphere by ShellEnvelope, Shape3D heritage, and move everything under geometryObjects #40
Conversation
… Add license header for spatialPartitioning/Octree*.scala.
… a val, so cannot be nulled afterwards
…e modified anymore once initialized (test modified accordingly)! Add two methods to easily define a Sphere from the Shell
…od with Shell and Box envelopes
…ese routines must be updated later on to include the possibility to load Shells as well
…d anynore: replaced by ShellEnvelope everywhere.
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 98.87% 98.99% +0.11%
==========================================
Files 19 18 -1
Lines 713 697 -16
Branches 179 176 -3
==========================================
- Hits 705 690 -15
+ Misses 8 7 -1
Continue to review full report at Codecov.
|
Before merging, I still need to update notebooks. |
Notebooks are fine -- nothing changed. Merging and bumping the version. |
The code looks much cleaner now :) |
Three major things in this PR:
ShellEnvelope
,BoxEnvelope
ingeometryObjects
sub-folderShellEnvelope
andBoxEnvelope
herit fromShape3D
and no longerEnvelope
. By doing so, all geometrical objects come fromShape3D
Sphere
by sub-case ofShellEnvelope
(innerRadius=0.0
), and completely remove theSphere
class.There are also minor changes:
Shape3D
has been simplified. All subclasses have been modified accordingly.ShellEnvelope
andBoxEnvelope
I changed the declaration of thecenter
: it is now aval
, so cannot be changed or nulled afterwards (tests also modified accordingly).ShellEnvelope
to easily define a Sphere from the Shellintersect
method ofPoint3D
with Shell and Box envelopesspatialPartitioning/Octree*.scala
.From the user point of view, nothing really change (loading the data from SphereRDD is unchanged).
However I think it would be a good idea later on to include the possibility to load Shells as well. We could even have only one routine to load Point3D (3 args), Sphere (4 args), and Shells (5 args)... TBD.