Skip to content

In 1108 improve cesium picking with non gpu buffer tree#4

Open
danielpm9 wants to merge 16 commits intomainfrom
in-1108-improve-cesium-picking-with-non-gpu-buffer-tree
Open

In 1108 improve cesium picking with non gpu buffer tree#4
danielpm9 wants to merge 16 commits intomainfrom
in-1108-improve-cesium-picking-with-non-gpu-buffer-tree

Conversation

@danielpm9
Copy link
Copy Markdown

Description

Issue number and link

Testing plan

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 7, 2024

🔴 There was an error checking the CLA! If this is your first contribution, please send in a Contributor License Agreement.

    TypeError: key must be a string, a buffer or an object

Copy link
Copy Markdown

@auchtopus auchtopus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this dead code

const p = partition(positions, sortedPnts, 0, numberOfPoints - 1, 0);

quicksort(positions, sortedPnts, 0, p, numberOfPoints - 1, 1, tree);
return [tree, sortedPnts[p], boundingBox];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
function normalize(v) {
const newVector = new Float64Array(3);
const denom = Math.sqrt(v[0] ** 2 + v[1] ** 2 + v[2] ** 2);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants