pub struct BVT<T, BV> { /* private fields */ }
Expand description

A Bounding Volume Tree.

Implementations

👎 Deprecated:

please use from_partitioning instead

Builds a bounding volume tree using the specified partitioning function.

Builds a bounding volume tree using the specified partitioning function.

The set of leaves on this BVT.

Referenceto the i-th leaf of this BVT.

Reference to the bounding volume of the tree root.

Set the bounding volume of the i-th leaf.

If refit_now is true, the bounding volumes of all the ancestors of the modifiad leaf will be updated as well to enclose the new leaf bounding volume. If refit_now is false, no ancestor update will be performed until the .refit() method is called. This is useful to refit the tree only once after several leaf bounding volume modifications.

Refits the bounding volumes so that all node of the BVT have boundin volumes that enclose their children.

This must be called to ensure the BVT is in a valid state after several calls to .set_leaf_bounding_volume(_, _, false). Every bounding volume created during this update will be enlarged by a margin of margin. The larger this margin here, the looser will the resulting AABB will be, but the less frequent future updates will be necessary. Setting a margin equal to 0.0 is allowed.

Creates a balanced BVT.

Construction function for a kdree to be used with BVT::from_partitioning.

Construction function for a kdree to be used with BVT::from_partitioning.

Trait Implementations

Type of a node identifiers on this BVH.

The root of the BVH.

The number of children of the given node.

The i-th child of the given node.

The bounding volume and data contained by the given node.

Traverses this BVH using a visitor.

Visits the bounding volume test tree implicitly formed with other.

Performs a best-first-search on the BVH. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

Performs the conversion.

Casts the value.

OverflowingCasts the value.

Should always be Self

Casts the value.

Casts the value.

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.