pub trait BoundingBox {
type Scalar: Scalar;
// Required methods
fn bounding_range_x(&self) -> (Self::Scalar, Self::Scalar);
fn bounding_range_y(&self) -> (Self::Scalar, Self::Scalar);
fn fast_bounding_range_x(&self) -> (Self::Scalar, Self::Scalar);
fn fast_bounding_range_y(&self) -> (Self::Scalar, Self::Scalar);
// Provided methods
fn bounding_box(&self) -> Box2D<Self::Scalar> { ... }
fn fast_bounding_box(&self) -> Box2D<Self::Scalar> { ... }
}
Required Associated Types§
Required Methods§
sourcefn bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)
fn bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)
Returns a range of x values that contains the curve.
sourcefn bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)
fn bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)
Returns a range of y values that contains the curve.
sourcefn fast_bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)
fn fast_bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)
Returns a range of x values that contains the curve.
sourcefn fast_bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)
fn fast_bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)
Returns a range of y values that contains the curve.
Provided Methods§
sourcefn bounding_box(&self) -> Box2D<Self::Scalar>
fn bounding_box(&self) -> Box2D<Self::Scalar>
Returns the smallest rectangle that contains the curve.
sourcefn fast_bounding_box(&self) -> Box2D<Self::Scalar>
fn fast_bounding_box(&self) -> Box2D<Self::Scalar>
Returns a conservative rectangle that contains the curve.
This does not necessarily return the smallest possible bounding rectangle.