Struct three_d::renderer::object::Particles[][src]

pub struct Particles {
    pub acceleration: Vec3,
    pub time: f32,
    // some fields omitted
}
Expand description

Particle effect that can be rendered with any material.

Each particle is initialised with a position and velocity using the update function and a global acceleration. Then when time passes, their position is updated based on new_position = start_position + start_velocity * time + 0.5 * acceleration * time * time

Fields

acceleration: Vec3

The acceleration applied to all particles. Default is gravity.

time: f32

A time variable that should be updated each frame.

Implementations

Creates a new set of particles with geometry defined by the given cpu mesh.

Updates the particles with the given initial data. The list contain one entry for each particle.

Trait Implementations

Returns the AxisAlignedBoundingBox for this geometry. Read more

Returns the local to world transformation applied to this geometry. Read more

Set the local to world transformation applied to this geometry. Read more

Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. You can use Lights::default() if you know the material does not require lights. Read more

👎 Deprecated:

use render_with_material instead

Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. You can use Lights::default() if you know the material does not require lights. Read more

👎 Deprecated

Render the geometry and surface material parameters of the object. Should usually not be called directly but used in DeferredPipeline::geometry_pass. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more