[][src]Struct mgf::Rectangle

pub struct Rectangle {
    pub c: Point3<f32>,
    pub u: [Vector3<f32>; 2],
    pub e: [f32; 2],
}

A center point, two directions, and two half widths.

Fields

c: Point3<f32>

The center of the rectangle.

u: [Vector3<f32>; 2]

The directions of the rectangle. Must be normalized.

e: [f32; 2]

Half the lengths of each side of the rectangle.

Methods

impl Rectangle[src]

pub fn new(center: Point3<f32>, axis: [Vector3<f32>; 2]) -> Self[src]

Create a new rectangle.

Trait Implementations

impl Add<Vector3<f32>> for Rectangle[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Vector3<f32>> for Rectangle[src]

impl BoundedBy<AABB> for Rectangle[src]

impl BoundedBy<Sphere> for Rectangle[src]

impl Clone for Rectangle[src]

impl Contacts<Moving<Component>> for Rectangle[src]

impl Contacts<Rectangle> for Moving<Sphere>[src]

impl Contacts<Rectangle> for Moving<Capsule>[src]

impl Contains<Point3<f32>> for Rectangle[src]

impl Copy for Rectangle[src]

impl<'de> Deserialize<'de> for Rectangle[src]

impl Into<Plane> for Rectangle[src]

impl Polygon for Rectangle[src]

impl Serialize for Rectangle[src]

impl Shape for Rectangle[src]

impl Sub<Vector3<f32>> for Rectangle[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector3<f32>> for Rectangle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.