Struct mgf::Moving
[−]
[src]
pub struct Moving<T: Shape>(pub T, pub Vector3<f32>);
A geometry swept accross a given path of motion.
Methods
impl<T: Copy + Clone + Shape> Moving<T>
[src]
fn sweep(obj: T, vel: Vector3<f32>) -> Self
[src]
Create a moving object with velocity of vel
fn vel(&self) -> Vector3<f32>
[src]
Return the velocity of the object.
Trait Implementations
impl<B: Bound, T: Copy + Clone + Shape + BoundedBy<B>> BoundedBy<B> for Moving<T>
[src]
fn bounds(&self) -> B
[src]
The bounds for a swept object is the bounds extended in the direction and magnitude of the velocity.
impl<RHS> Contacts<RHS> for Moving<Component> where
RHS: Contacts<Moving<Sphere>> + Contacts<Moving<Capsule>>,
[src]
RHS: Contacts<Moving<Sphere>> + Contacts<Moving<Capsule>>,
fn contacts<F: FnMut(Contact)>(&self, rhs: &RHS, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Plane> for Moving<Sphere>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Plane, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Plane> for Moving<Capsule>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Plane, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Triangle> for Moving<Sphere>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Triangle, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Rectangle> for Moving<Sphere>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Triangle> for Moving<Capsule>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Triangle, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl Contacts<Rectangle> for Moving<Capsule>
[src]
fn contacts<F: FnMut(Contact)>(&self, rhs: &Rectangle, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl<Recv, Arg> Contacts<Arg> for Moving<Recv> where
Arg: Shape + Copy,
Recv: Contacts<Moving<Arg>> + Shape + Copy,
[src]
Arg: Shape + Copy,
Recv: Contacts<Moving<Arg>> + Shape + Copy,
fn contacts<F: FnMut(Contact)>(&self, rhs: &Arg, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl<Recv, Arg> Contacts<Moving<Arg>> for Moving<Recv> where
Recv: Contacts<Moving<Arg>> + Shape + Copy,
Arg: Shape + Copy,
[src]
Recv: Contacts<Moving<Arg>> + Shape + Copy,
Arg: Shape + Copy,
Any two moving object collision can be reduced to a one moving one static object collision. This is done by finding the relative velocity between the two objects.
fn contacts<F: FnMut(Contact)>(&self, rhs: &Moving<Arg>, callback: F) -> bool
[src]
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]
Returns the last contact found, if one exists.
impl<Recv, Arg> LocalContacts<Arg> for Moving<Recv> where
Recv: Shape + Copy,
Arg: Contacts<Moving<Recv>> + Shape + Copy,
[src]
Recv: Shape + Copy,
Arg: Contacts<Moving<Recv>> + Shape + Copy,
fn local_contacts<F: FnMut(LocalContact)>(&self, rhs: &Arg, callback: F) -> bool
[src]
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>
[src]
Returns the last contact found, if one exists.
impl<Recv, Arg> LocalContacts<Moving<Arg>> for Moving<Recv> where
Recv: Contacts<Moving<Arg>> + Shape + Copy,
Arg: Shape + Copy,
[src]
Recv: Contacts<Moving<Arg>> + Shape + Copy,
Arg: Shape + Copy,
fn local_contacts<F: FnMut(LocalContact)>(
&self,
rhs: &Moving<Arg>,
callback: F
) -> bool
[src]
&self,
rhs: &Moving<Arg>,
callback: F
) -> bool
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>
[src]
Returns the last contact found, if one exists.
impl<T: Copy + Shape> Copy for Moving<T>
[src]
impl<T: Clone + Shape> Clone for Moving<T>
[src]
fn clone(&self) -> Moving<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more