Struct rhusics::physics::Material [] [src]

pub struct Material { /* fields omitted */ }

Physics material

Used to describe physical properties of rigid bodies, such as density and restitution.

The default material has density 1, such that only the volume affects its mass, and restitution 1, such that all energy is preserved in collisions.

Methods

impl Material
[src]

ROCK: Material = Material{density: 0.6, restitution: 0.1,}

Rock

WOOD: Material = Material{density: 0.3, restitution: 0.2,}

Wood

METAL: Material = Material{density: 1.2, restitution: 0.05,}

Metal

BOUNCY_BALL: Material = Material{density: 0.3, restitution: 0.8,}

Bouncy Ball

SUPER_BALL: Material = Material{density: 0.3, restitution: 0.95,}

Super Ball

PILLOW: Material = Material{density: 0.1, restitution: 0.2,}

Pillow

STATIC: Material = Material{density: 0.0, restitution: 0.4,}

Static

[src]

Create new material

[src]

Get density

[src]

Get restitution

Trait Implementations

impl Debug for Material
[src]

[src]

Formats the value using the given formatter.

impl Default for Material
[src]

[src]

Returns the "default value" for a type. Read more