Struct cgmath::Aabb2
[−]
[src]
pub struct Aabb2<S> { pub min: Point2<S>, pub max: Point2<S>, }
A two-dimensional AABB, aka a rectangle.
Fields
min | |
max |
Methods
impl<S: BaseNum> Aabb2<S>
fn new(p1: Point2<S>, p2: Point2<S>) -> Aabb2<S>
Construct a new axis-aligned bounding box from two points.
fn to_corners(&self) -> [Point2<S>; 4]
Compute corners.