Struct mgf::StaticBody [] [src]

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

A physical object that cannot move.

A static body is an immovable object that can be constructed from any shape, the only other 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, RHS> Intersects<RHS> for StaticBody<'a, S> where
    S: Intersects<RHS> + Shape
[src]

[src]

Returns an Intersection if one exists.

impl<'a, S, RHS> Contacts<RHS> for StaticBody<'a, S> where
    S: Contacts<RHS> + Shape
[src]

[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

[src]

Returns the last contact found, if one 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