pub struct BspSplitter<A: Copy> { /* private fields */ }
Expand description

Binary Space Partitioning splitter, uses a BSP tree.

Implementations

Create a new BSP splitter.

Put the splitter back in it initial state.

Call this at the beginning of every frame when reusing the splitter.

Add a polygon to the plane splitter.

This is where most of the expensive computation happens.

Sort the added and split polygons against the view vector.

Call this towards the end of the frame after having added all polygons.

Process a set of polygons at once.

Build the draw order of this sub-tree into an out vector, so that the contained planes are sorted back to front according to the view vector defined as the base plane front direction.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. 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.

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.