Struct rstar::AABB[][src]

pub struct AABB<P> where
    P: Point
{ /* fields omitted */ }
Expand description

An n-dimensional axis aligned bounding box (AABB).

An object’s AABB is the smallest box totally encompassing an object while being aligned to the current coordinate system. Although these structures are commonly called bounding boxes, they exist in any dimension.

Note that AABBs cannot be inserted into r-trees. Use the Rectangle struct for this purpose.

Type arguments

P: The struct is generic over which point type is used. Using an n-dimensional point type will result in an n-dimensional bounding box.

Implementations

Returns the AABB encompassing a single point.

Returns the AABB’s lower corner.

This is the point contained within the AABB with the smallest coordinate value in each dimension.

Returns the AABB’s upper corner.

This is the point contained within the AABB with the largest coordinate value in each dimension.

Creates a new AABB encompassing two points.

Creates a new AABB encompassing a collection of points.

Returns the point within this AABB closest to a given point.

If point is contained within the AABB, point will be returned.

Returns the squared distance to the AABB’s min_point.

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

The envelope’s point type.

Creates a new, empty envelope that does not encompass any child.

Returns true if a point is contained within this envelope.

Returns true if another envelope is fully contained within self.

Extends self to contain another envelope.

Returns the minimal envelope containing self and another envelope.

Sets self to the intersection of self and another envelope.

Returns this envelope’s area. Must be at least 0.

Returns the euclidean distance to the envelope’s border.

Returns the squared min-max distance, a concept that helps to find nearest neighbors efficiently. Read more

Returns the envelope’s center point.

Returns the area of the intersection of self and another envelope.

Returns a value proportional to the envelope’s perimeter.

Sorts a given set of objects with envelopes along one of their axis.

Partitions objects with an envelopes along a certain axis. Read more

Performs the conversion.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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.

Performs the conversion.

Should always be Self

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.