[−][src]Struct collision::primitive::Rectangle
Rectangle primitive.
Have a cached set of corner points to speed up computation.
Methods
impl<S> Rectangle<S> where
S: BaseFloat,
[src]
impl<S> Rectangle<S> where
S: BaseFloat,
pub fn new(dim_x: S, dim_y: S) -> Self | [src] |
Create a new rectangle primitive from component dimensions
pub fn new_impl(dim: Vector2<S>) -> Self | [src] |
Create a new rectangle primitive from a vector of component dimensions
pub fn dim(&self) -> &Vector2<S> | [src] |
Get the dimensions of the Rectangle
pub fn half_dim(&self) -> &Vector2<S> | [src] |
Get the half dimensions of the Rectangle
Trait Implementations
impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
S: BaseFloat,
[src]
impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
S: BaseFloat,
type Result = Point2<S>
Result returned by the intersection test
fn intersection(&self, ray: &Ray2<S>) -> Option<Point2<S>> | [src] |
Ray must be in object space of the rectangle
impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
S: BaseFloat,
[src]
impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for Rectangle<S> where
S: BaseFloat,
fn intersects(&self, ray: &Ray2<S>) -> bool | [src] |
Ray must be in object space of the rectangle
impl<S> ComputeBound<Aabb2<S>> for Rectangle<S> where
S: BaseFloat,
[src]
impl<S> ComputeBound<Aabb2<S>> for Rectangle<S> where
S: BaseFloat,
fn compute_bound(&self) -> Aabb2<S> | [src] |
impl<S> Primitive for Rectangle<S> where
S: BaseFloat,
[src]
impl<S> Primitive for Rectangle<S> where
S: BaseFloat,
type Point = Point2<S>
Point type
fn support_point<T>(&self, direction: &Vector2<S>, transform: &T) -> Point2<S> where | [src] |
impl<S> From<Rectangle<S>> for Primitive2<S>
[src]
impl<S> From<Rectangle<S>> for Primitive2<S>
fn from(rectangle: Rectangle<S>) -> Primitive2<S> | [src] |
impl<S: Clone> Clone for Rectangle<S>
[src]
impl<S: Clone> Clone for Rectangle<S>
fn clone(&self) -> Rectangle<S> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<S: PartialEq> PartialEq<Rectangle<S>> for Rectangle<S>
[src]
impl<S: PartialEq> PartialEq<Rectangle<S>> for Rectangle<S>
impl<S: Debug> Debug for Rectangle<S>
[src]
impl<S: Debug> Debug for Rectangle<S>
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,