Struct AABB3D
Source pub struct AABB3D {
pub min: Vector3D,
pub max: Vector3D,
}
Expand description
A 3D axis-aligned bounding box defined by its minimum and maximum corners.
The minimum corner (smallest x, y, z).
The maximum corner (largest x, y, z).
Source§Implements broad-phase collision checking for AABB3D.
Performs a broad-phase check using 3D bounding boxes to quickly reject non-colliding pairs.
§Arguments
AABB3D - The first bounding box.
AABB3D - The second bounding box.
§Returns
bool - True if the bounding boxes overlap.
Source§Implements methods for AABB3D.
Creates an AABB from a center point and dimensions.
§Arguments
Vector3D - The center point.
f64 - The width.
f64 - The height.
f64 - The depth.
§Returns
AABB3D - The new bounding box.
Returns the center point of the bounding box.
§Returns
Vector3D - The center point.
Returns the dimensions of the bounding box as a vector.
§Returns
Vector3D - The size vector (width, height, depth).
Tests whether a point is inside this bounding box.
§Arguments
Vector3D - The point to test.
§Returns
bool - True if the point is inside.
Tests whether this bounding box intersects another.
§Arguments
AABB3D - The other bounding box.
§Returns
bool - True if they intersect.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
This method returns an ordering between
self and
other values if one exists.
Read more
Tests less than (for
self and
other) and is used by the
< operator.
Read more
Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more
Tests greater than (for
self and
other) and is used by the
>
operator.
Read more
Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
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.
Perform a zero-cost type-safe upcast to a wider ref type within the Wasm
bindgen generics type system.
Read more
Perform a zero-cost type-safe upcast to a wider type within the Wasm
bindgen generics type system.
Read more