mariuszhermansdorfer / SandWorm

Augmented Reality Sandbox for Grasshopper & Rhino
MIT License
20 stars 11 forks source link

Integrate new slope analysis and re-re-restructure analysis methods #39

Closed philipbelesky closed 5 years ago

philipbelesky commented 5 years ago

This integrates the fast slope calculation from the performance/slope_parallel branch. In doing so it also restructures the analysis methods to each operate once (on the entire pixel array) rather than as part of the per-pixel loop. This also made implementing #30 at the same time easier.

The new analysis methods require a slightly less elegant set of switch/cases but this seems like a decent trade-off to keep the Analytics abstractions while working with the different method signatures needed for each analysis type.

Also bundled are a couple of code cleanups to the main SandwormComponent. First is a dedicated method for logging that cuts down the repeated use of the stopwatch/log blocks. Second is an error display for the lack of a kinectSensor or depthFrameData and a switch to those conditions triggering an early return which then allows most of SolveInstance to be de-indented.

Annotation 2019-09-27 153936

Performance on my machine for elevation coloring is 0ms and 0-1ms for slope coloring. I'm on a relatively fast machine though, and working with a a tightly-cropped model. Depending on when you get to this, I'll add some benchmarks for my new analysis wrappers to check how long they are actually taking and if there is any scope for optimization there.

philipbelesky commented 5 years ago

Thanks for the notes, all of those comments (aside from #38) should be resolved in the latest stream of commits.