-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f053ef7
commit 776541a
Showing
10 changed files
with
221 additions
and
606 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
use crate::Vec3WithIndex; | ||
|
||
use std::vec::Vec; | ||
|
||
pub mod point_octree; | ||
mod octree_node; | ||
use octree_node::*; | ||
|
||
use crate::linalg::{Vec3, BoundingBox}; | ||
|
||
pub struct PointOctree { | ||
root: OctreeNode | ||
} | ||
|
||
impl PointOctree { | ||
pub fn new(points: Vec<Vec3WithIndex>, bounding_box: BoundingBox) -> PointOctree { | ||
PointOctree { | ||
root: OctreeNode::new(points, bounding_box) | ||
} | ||
} | ||
|
||
pub fn get_points_in_box(&self, bounding_box: &BoundingBox) -> Vec<Vec3WithIndex> { | ||
let mut v: Vec<Vec3WithIndex> = Vec::new(); | ||
|
||
self.root.get_points_in_box(bounding_box, &mut v); | ||
|
||
v | ||
} | ||
} | ||
pub use point_octree::*; |
Oops, something went wrong.