Struct gilrs::ff::EffectBuilder [] [src]

pub struct EffectBuilder { /* fields omitted */ }

Creates new Effect.

Methods

impl EffectBuilder
[src]

[src]

Creates new builder with following defaults: no gamepads, no base effects, repeat set to infinitely, no distance model, position in (0.0, 0.0, 0.0) and gain 1.0. Use finish() to create new effect.

[src]

Adds new BaseEffect.

[src]

Changes gamepads that are associated with effect. Effect will be only played on gamepads from last call to this function.

[src]

Adds gamepad to the list of gamepads associated with effect.

[src]

Changes what should happen to effect when it ends.

[src]

Changes distance model associated with effect.

[src]

Changes position of the source of effect.

[src]

Changes gain of the effect. gain will be clamped to [0.0, f32::MAX].

[src]

Validates all parameters and creates new effect.

Errors

Returns Error::Disconnected(id) or Error::FfNotSupported(id) on first gamepad in ids that is disconnected or doesn't support force feedback.

Returns Error::InvalidDistanceModel if model is not valid. See DistanceModel for details.

Trait Implementations

impl Clone for EffectBuilder
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for EffectBuilder
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for EffectBuilder
[src]

[src]

Formats the value using the given formatter.