Struct bismuth::cube::Partition
[−]
[src]
pub struct Partition { /* fields omitted */ }
A cubic spatial partition. Partition
s are represented as an origin and a
width.
Partition
s are associated with every Cube
in a tree.
Methods
impl Partition
[src]
fn at_point(point: &UPoint3, width: LogWidth) -> Self
Constructs a new Partition
at the given point in space with the given
width.
fn at_index(&self, index: usize) -> Option<Self>
Constructs the sub-Partition
at the given index. Returns None
if
there is no such Partition
, because the minimum width has been
exceeded.
Panics
Panics if index
is not within the range [0, 8).
fn origin(&self) -> &UPoint3
Gets the origin of the Partition
.
fn width(&self) -> LogWidth
Gets the width of the Partition
.
fn midpoint(&self) -> UPoint3
Gets the midpoint of the Partition
.
fn extent(&self) -> UVector3
fn aabb(&self) -> AABB
Gets the AABB
of the Partition
.
fn is_min_width(&self) -> bool
Returns true
if the Partition
has the minimum possible width.
Trait Implementations
impl Clone for Partition
[src]
fn clone(&self) -> Partition
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more