Struct cgmath::Aabb3 [] [src]

pub struct Aabb3<S> {
    pub min: Point3<S>,
    pub max: Point3<S>,
}

A three-dimensional AABB, aka a rectangular prism.

Fields

min
max

Methods

impl<S: BaseNum> Aabb3<S>

fn new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>

Construct a new axis-aligned bounding box from two points.

fn to_corners(&self) -> [Point3<S>; 8]

Compute corners.

Trait Implementations

impl<S: BaseNum> Aabb<S, Vector3<S>, Point3<S>> for Aabb3<S>

fn new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>

fn min<'a>(&'a self) -> &'a Point3<S>

fn max<'a>(&'a self) -> &'a Point3<S>

fn contains(&self, p: &Point3<S>) -> bool

fn dim(&self) -> V

fn volume(&self) -> S

fn center(&self) -> P

fn grow(&self, p: &P) -> Self

fn add_v(&self, v: &V) -> Self

fn mul_s(&self, s: S) -> Self

fn mul_v(&self, v: &V) -> Self

impl<S: BaseNum> Debug for Aabb3<S>

fn fmt(&self, f: &mut Formatter) -> Result

impl<S: BaseFloat + 'static> Bound<S> for Aabb3<S>

fn relate_plane(&self, plane: &Plane<S>) -> Relation

fn relate_clip_space(&self, projection: &Matrix4<S>) -> Relation

Derived Implementations

impl<S: Decodable> Decodable for Aabb3<S>

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Aabb3<S>, __D::Error>

impl<S: Encodable> Encodable for Aabb3<S>

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl<S: PartialEq> PartialEq for Aabb3<S>

fn eq(&self, __arg_0: &Aabb3<S>) -> bool

fn ne(&self, __arg_0: &Aabb3<S>) -> bool

impl<S: Clone> Clone for Aabb3<S>

fn clone(&self) -> Aabb3<S>

fn clone_from(&mut self, source: &Self)

impl<S: Copy> Copy for Aabb3<S>