Struct building_blocks_storage::octree::set::OctreeSet [−][src]
pub struct OctreeSet { /* fields omitted */ }
Expand description
A sparse set of voxel coordinates (3D integer points). Supports spatial queries.
The octree is a cube shape and the edge lengths can only be a power of 2, at most 64.
Implementations
Make an empty set in the universe (domain) of extent
.
Constructs an OctreeSet
which contains all of the points in extent
which are not empty (as defined by the IsEmpty
trait). extent
must be cube-shaped with edge length being a power of 2. For power P
where edge length is 2^P
, we
must have 0 < P <= 6
, because there is a maximum fixed depth of the octree.
The length of any edge of the root octant.
pub fn visit_branches_and_fat_leaves_for_extent_in_preorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_branches_and_fat_leaves_for_extent_in_preorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Same as visit_branches_and_fat_leaves_in_preorder
, but visit only the octants that overlap extent
.
pub fn visit_branches_and_fat_leaves_for_extent_in_postorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_branches_and_fat_leaves_for_extent_in_postorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Same as visit_branches_and_fat_leaves_in_postorder
, but visit only the octants that overlap extent
.
Same as visit_branches_and_fat_leaves_in_preorder
, but descendants of fat leaves are also visited.
pub fn visit_all_octants_in_postorder(
&self,
predicate: &impl Fn(&OctreeNode) -> bool,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_all_octants_in_postorder(
&self,
predicate: &impl Fn(&OctreeNode) -> bool,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Same as visit_branches_and_fat_leaves_in_postorder
, but descendants of fat leaves are also visited.
pub fn visit_all_octants_for_extent_in_preorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_all_octants_for_extent_in_preorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Same as visit_all_octants_in_preorder
, but only for octants overlapping extent
.
pub fn visit_all_octants_for_extent_in_postorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_all_octants_for_extent_in_postorder(
&self,
extent: &Extent3i,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Same as visit_all_octants_in_postorder
, but only for octants overlapping extent
.
pub fn visit_branches_and_fat_leaves_in_preorder(
&self,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_branches_and_fat_leaves_in_preorder(
&self,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Visit every branch and fat leaf in the octree. This is a pre-order traversal.
pub fn visit_branches_and_fat_leaves_in_postorder(
&self,
predicate: &impl Fn(&OctreeNode) -> bool,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]
pub fn visit_branches_and_fat_leaves_in_postorder(
&self,
predicate: &impl Fn(&OctreeNode) -> bool,
visitor: &mut impl OctreeVisitor
) -> VisitStatus
[src]Visit every branch and fat leaf in the octree. This is a post-order traversal.
The OctreeNode
of the root, if it exists.
Returns the child OctreeNode
of parent
at the given child_index
, where 0 < child_octant < 8
.
Add all points from extent
to the set.
Subtract all points from extent
from the set.
Get all of the points in this set collected into a Vec
.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for OctreeSet
impl UnwindSafe for OctreeSet
Blanket Implementations
Mutably borrows from an owned value. Read more