Struct rhusics_core::collide2d::Rectangle[][src]

pub struct Rectangle<S> { /* fields omitted */ }

Rectangle primitive.

Have a cached set of corner points to speed up computation.

Methods

impl<S> Rectangle<S> where
    S: BaseFloat
[src]

Create a new rectangle primitive from component dimensions

Create a new rectangle primitive from a vector of component dimensions

Get the dimensions of the Rectangle

Get the half dimensions of the Rectangle

Trait Implementations

impl<S> ComputeBound<Aabb2<S>> for Rectangle<S> where
    S: BaseFloat
[src]

Compute the bounding volume

impl<S> Clone for Rectangle<S> where
    S: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> Debug for Rectangle<S> where
    S: Debug
[src]

Formats the value using the given formatter. Read more

impl<S> Primitive for Rectangle<S> where
    S: BaseFloat
[src]

Point type

Get the support point on the shape in a given direction. Read more

impl<S> From<Rectangle<S>> for Primitive2<S>
[src]

Performs the conversion.

impl<S> Serialize for Rectangle<S> where
    S: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, S> Deserialize<'de> for Rectangle<S> where
    S: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
    S: BaseFloat
[src]

Ray must be in object space of the rectangle

impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
    S: BaseFloat
[src]

Result returned by the intersection test

Ray must be in object space of the rectangle

impl<S> PartialEq<Rectangle<S>> for Rectangle<S> where
    S: PartialEq<S>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<S> Volume<S, S> for Rectangle<S> where
    S: BaseFloat + Inertia
[src]

Compute the mass of the shape based on its material

Auto Trait Implementations

impl<S> Send for Rectangle<S> where
    S: Send

impl<S> Sync for Rectangle<S> where
    S: Sync