[][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 BoundedBy<AABB> for Rectangle[src]

impl BoundedBy<Sphere> for Rectangle[src]

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

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

fn last_contact(&self, rhs: &RHS) -> Option<Contact>[src]

Returns the last contact found, if one exists.

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

fn last_contact(&self, rhs: &RHS) -> Option<Contact>[src]

Returns the last contact found, if one exists.

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

fn last_contact(&self, rhs: &RHS) -> Option<Contact>[src]

Returns the last contact found, if one exists.

impl Shape for Rectangle[src]

fn set_pos(&mut self, p: Point3<f32>)[src]

Sets the center of the shape to p.

impl Polygon for Rectangle[src]

impl Clone for Rectangle[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Into<Plane> for Rectangle[src]

impl Copy for Rectangle[src]

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

type Output = Self

The resulting type after applying the + operator.

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

type Output = Self

The resulting type after applying the - operator.

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

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

Auto Trait Implementations

impl Send for Rectangle

impl Sync for Rectangle

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.