pub struct AABB { /* private fields */ }
Expand description

An axis-aligned bounding box. Represented by a cuboid defined by two points. As long as the set_* functions are used, the lower point will be less than or equal to the upper point for any axis.

Implementations

Constructs a new AABB of size zero.

Constructs a new AABB with the given points. This method does not ensure lower <= upper for all axes.

Returns the length of the AABB in the x dimension.

Returns the length of the AABB in the y dimension.

Returns the length of the AABB in the z dimension.

Returns the x coordinate of the lower point, representing the left side of the AABB.

Returns the x coordinate of the upper point, representing the right side of the AABB.

Returns the y coordinate of the lower point, representing the top side of the AABB.

Returns the y coordinate of the upper point, representing the bottom side of the AABB.

Returns the z coordinate of the lower point, representing the front side of the AABB.

Returns the z coordinate of the upper point, representing the back side of the AABB.

Updates the lower point. Rearranges the coordinates to assure that lower <= upper for all axes.

Updates the upper point. Rearranges the coordinates to assure that lower <= upper for all axes.

Updates the x coordinate of the lower point (the left side of the AABB). Ensures that lower <= upper for all axes.

Updates the x coordinate of the upper point (the right side of the AABB). Ensures that lower <= upper for all axes.

Updates the y coordinate of the lower point (the bottom side of the AABB). Ensures that lower <= upper for all axes.

Updates the y coordinate of the upper point (the top side of the AABB). Ensures that lower <= upper for all axes.

Updates the z coordinate of the lower point (the front side of the AABB). Ensures that lower <= upper for all axes.

Updates the z coordinate of the upper point (the back side of the AABB). Ensures that lower <= upper for all axes.

Trait Implementations

Returns the “default value” for a type. 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

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 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

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.