Struct mgf::StaticBody [] [src]

pub struct StaticBody<'a, S: Shape + 'a> {
    pub friction: f32,
    pub shape: &'a S,
}

A physical object that cannot move. Can be constructed from any shape. Only parameter required is a value for friction. A StaticBody is not a Shape and cannot be moved. StaticBodies contain a reference to the Shape they mimic and thus should not live very long.

Fields

Methods

impl<'a, S: Shape + 'a> StaticBody<'a, S>
[src]

[src]

Construct a new StaticBody from a Shape.

Trait Implementations

impl<'a, S, B> BoundedBy<B> for StaticBody<'a, S> where
    B: Bound,
    S: Shape + BoundedBy<B>, 
[src]

[src]

impl<'a, S, T> Collider<Intersection, T> for StaticBody<'a, S> where
    S: Shape + Collider<Intersection, T>, 
[src]

[src]

Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more

[src]

Returns the first collision found if any exists.

impl<'a, S, T> Collider<Contact, T> for StaticBody<'a, S> where
    S: Shape + Collider<Contact, T>, 
[src]

[src]

Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more

[src]

Returns the first collision found if any exists.

impl<'a, S: Shape + 'a> PhysicsObject for StaticBody<'a, S>
[src]

[src]

Integrate the object over the timestep

[src]

Return the physics state of the object

[src]

Apply linear and angular impulse to the object

[src]

Update the linear and angular positional derivatives