Struct mgf::Rectangle [−][src]
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]
impl Rectangle
Trait Implementations
impl BoundedBy<AABB> for Rectangle
[src]
impl BoundedBy<AABB> for Rectangle
impl BoundedBy<Sphere> for Rectangle
[src]
impl BoundedBy<Sphere> for Rectangle
impl Contacts<Moving<Component>> for Rectangle
[src]
impl Contacts<Moving<Component>> for Rectangle
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
[src]
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
Returns the last contact found, if one exists.
impl Contains<Point3<f32>> for Rectangle
[src]
impl Contains<Point3<f32>> for Rectangle
fn contains(&self, p: &Point3<f32>) -> bool
[src]
fn contains(&self, p: &Point3<f32>) -> bool
Returns true if the current object contains the argument.
impl Contacts<Rectangle> for Moving<Sphere>
[src]
impl Contacts<Rectangle> for Moving<Sphere>
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
Returns the last contact found, if one exists.
impl Contacts<Rectangle> for Moving<Capsule>
[src]
impl Contacts<Rectangle> for Moving<Capsule>
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
Returns the last contact found, if one exists.
impl Copy for Rectangle
[src]
impl Copy for Rectangle
impl Clone for Rectangle
[src]
impl Clone for Rectangle
fn clone(&self) -> Rectangle
[src]
fn clone(&self) -> Rectangle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Into<Plane> for Rectangle
[src]
impl Into<Plane> for Rectangle
impl Add<Vector3<f32>> for Rectangle
[src]
impl Add<Vector3<f32>> for Rectangle
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Self
[src]
fn add(self, v: Vector3<f32>) -> Self
Performs the +
operation.
impl Sub<Vector3<f32>> for Rectangle
[src]
impl Sub<Vector3<f32>> for Rectangle
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Self
[src]
fn sub(self, v: Vector3<f32>) -> Self
Performs the -
operation.
impl AddAssign<Vector3<f32>> for Rectangle
[src]
impl AddAssign<Vector3<f32>> for Rectangle
fn add_assign(&mut self, v: Vector3<f32>)
[src]
fn add_assign(&mut self, v: Vector3<f32>)
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Rectangle
[src]
impl SubAssign<Vector3<f32>> for Rectangle
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
Performs the -=
operation.
impl Shape for Rectangle
[src]
impl Shape for Rectangle
fn center(&self) -> Point3<f32>
[src]
fn center(&self) -> Point3<f32>
Returns the center of mass of the geometry, assuming a regular density.
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
Returns the closest point on the shape to the given point.
fn set_pos(&mut self, p: Point3<f32>)
[src]
fn set_pos(&mut self, p: Point3<f32>)
Sets the center of the shape to p.
impl Polygon for Rectangle
[src]
impl Polygon for Rectangle