Struct three_d::core::AxisAlignedBoundingBox[][src]

pub struct AxisAlignedBoundingBox { /* fields omitted */ }
Expand description

A bounding box that aligns with the x, y and z axes.

Implementations

An empty bounding box.

An infinitely large bounding box.

Constructs a new bounding box and expands it such that all of the given positions are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.

Constructs a new bounding box and expands it such that all of the given positions transformed with the given transformation are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.

Returns true if the bounding box is empty (ie. constructed by AxisAlignedBoundingBox::EMPTY).

Returns true if the bounding box is infinitely large (ie. constructed by AxisAlignedBoundingBox::INFINITE).

Get the minimum coordinate of the bounding box.

Get the maximum coordinate of the bounding box.

Get the center of the bounding box.

Get the size of the bounding box.

Expands the bounding box such that all of the given positions are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.

Expands the bounding box such that all of the given positions transformed with the given transformation are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.

Expand the bounding box such that it also contains the given other bounding box.

Transforms the bounding box by the given transformation.

Note: Use new_with_transformed_positions instead of new_with_positions followed by this method to create a more tight bounding box.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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)

recently added

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more