Struct splashsurf_lib::AxisAlignedBoundingBox[][src]

pub struct AxisAlignedBoundingBox<R: Real, const D: usize> { /* fields omitted */ }
Expand description

Type representing an axis aligned bounding box in arbitrary dimensions

Implementations

Constructs the smallest AABB fitting around all the given points, parallel version

Constructs a degenerate AABB with min and max set to zero

Constructs an AABB with the given min and max bounding points

Constructs a degenerate AABB with zero extents centered at the given point

Constructs the smallest AABB fitting around all the given points

Tries to convert the AABB from one real type to another real type, returns None if conversion fails

Returns the min coordinate of the bounding box

Returns the max coordinate of the bounding box

Returns whether the AABB is consistent, i.e. aabb.min()[i] <= aabb.max()[i] for all i

Returns whether the AABB is degenerate in any dimension, i.e. aabb.min()[i] == aabb.max()[i] for any i

Returns the extents of the bounding box (vector connecting min and max point of the box)

Returns the smallest scalar extent of the AABB over all of its dimensions

Returns the largest scalar extent of the AABB over all of its dimensions

Returns the geometric centroid of the AABB (mean of the corner points)

Checks if the given point is inside of the AABB, the AABB is considered to be half-open to its max coordinate

Translates the AABB by the given vector

Translates the AABB to center it at the coordinate origin (moves the centroid to the coordinate origin)

Multiplies a uniform, local scaling to the AABB (i.e. multiplying its extents as if it was centered at the origin)

Enlarges this AABB to the smallest AABB enclosing both itself and another AABB

Enlarges this AABB to the smallest AABB enclosing both itself and another point

Grows this AABB uniformly in all directions by the given scalar margin (i.e. adding the margin to min/max extents)

Returns the smallest cubical AABB with the same center that encloses this AABB

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

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)

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.