In 1108 improve cesium picking with non gpu buffer tree#4
Open
In 1108 improve cesium picking with non gpu buffer tree#4
Conversation
|
🔴 There was an error checking the CLA! If this is your first contribution, please send in a Contributor License Agreement. |
auchtopus
approved these changes
Aug 8, 2024
auchtopus
left a comment
There was a problem hiding this comment.
I think this looks pretty good! just two lines of dead code to remove and i think it'll be okay
however, don't merge just yet! We're sitting pretty with this branch, and we'll merge up to date cesium into this later (once I figure out how to upgrade cesium without crashing everything)
| box[3] = this._boxENU[3]; | ||
| box[4] = this._boxENU[4]; | ||
| box[5] = this._boxENU[5]; | ||
| // bfsPrint(indexedTree, positions, box); |
zachsussman
approved these changes
Sep 6, 2024
| const p = partition(positions, sortedPnts, 0, numberOfPoints - 1, 0); | ||
|
|
||
| quicksort(positions, sortedPnts, 0, p, numberOfPoints - 1, 1, tree); | ||
| return [tree, sortedPnts[p], boundingBox]; |
There was a problem hiding this comment.
I'd prefer this to be a ES4 Javascript object:
function Tree3D(positions) {
...
this._tree = tree;
this._startNode = sortedPnts[p];
this._boundingBox = boundingBox;
}
...
let tree = new Tree3D(...);
tree._tree; // etc
| * @param {Float64Array} v2, the second point as [x2, y2, z2] | ||
| * @returns {number} the distance between the two points | ||
| */ | ||
| function distance(v1, v2) { |
There was a problem hiding this comment.
| */ | ||
| function normalize(v) { | ||
| const newVector = new Float64Array(3); | ||
| const denom = Math.sqrt(v[0] ** 2 + v[1] ** 2 + v[2] ** 2); |
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue number and link
Testing plan
Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my change