JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::SpringEasingOptions Class Reference

A selection of options available for customising a spring style easing function. More...

#include <juce_Easings.h>

Collaboration diagram for juce::SpringEasingOptions:

Public Member Functions

auto getAttenuation () const
 Returns the value specified by withAttenuation.
 
auto getExtraAttenuationRange () const
 Returns the value specified by withExtraAttenuationRange.
 
auto getFrequency () const
 Returns the value specified by withFrequency.
 
auto withAttenuation (float newAttenuation) const
 Affects how quickly the oscillations die down.
 
auto withExtraAttenuationRange (float newExtraAttenuationRange) const
 Specifies the input value at which an extra non-physical attenuation begins to be applied.
 
auto withFrequency (float newFrequency) const
 Specifies the number of oscillations the easing would undergo.
 

Private Attributes

float attenuation = 3.0f
 
float extraAttenuationRange = 0.25f
 
float frequency = 3.0f
 

Detailed Description

A selection of options available for customising a spring style easing function.

@tags{Animations}

Member Function Documentation

◆ getAttenuation()

auto juce::SpringEasingOptions::getAttenuation ( ) const
inline

Returns the value specified by withAttenuation.

If no value was specified the default value is 3.0f.

See also
withAttenuation

References attenuation.

◆ getExtraAttenuationRange()

auto juce::SpringEasingOptions::getExtraAttenuationRange ( ) const
inline

Returns the value specified by withExtraAttenuationRange.

If no value was specified the default value is 0.25f.

See also
withExtraAttenuationRange

References extraAttenuationRange.

◆ getFrequency()

auto juce::SpringEasingOptions::getFrequency ( ) const
inline

Returns the value specified by withFrequency.

If no value was specified the default value is 3.0f.

See also
withFrequency

References frequency.

◆ withAttenuation()

auto juce::SpringEasingOptions::withAttenuation ( float  newAttenuation) const
inline

Affects how quickly the oscillations die down.

See also
getAttenuation, withFrequency, withExtraAttenuationRange

References attenuation, and juce::withMember().

◆ withExtraAttenuationRange()

auto juce::SpringEasingOptions::withExtraAttenuationRange ( float  newExtraAttenuationRange) const
inline

Specifies the input value at which an extra non-physical attenuation begins to be applied.

The value must be in the range [0.05f, 0.98f].

This ensures that the easing always reaches an output value of 1.0f when the input value is 1.0f. If the attenuation is set sufficiently high this won't have a visible effect.

See also
getExtraAttenuationRange, withFrequency, withAttenuation

References extraAttenuationRange, and juce::withMember().

◆ withFrequency()

auto juce::SpringEasingOptions::withFrequency ( float  newFrequency) const
inline

Specifies the number of oscillations the easing would undergo.

This also affects the speed of the movement.

See also
getFrequency, withAttenuation, withExtraAttenuationRange

References frequency, and juce::withMember().

Member Data Documentation

◆ attenuation

float juce::SpringEasingOptions::attenuation = 3.0f
private

Referenced by getAttenuation(), and withAttenuation().

◆ extraAttenuationRange

float juce::SpringEasingOptions::extraAttenuationRange = 0.25f
private

◆ frequency

float juce::SpringEasingOptions::frequency = 3.0f
private

Referenced by getFrequency(), and withFrequency().


The documentation for this class was generated from the following file: