SpringParams

Physical parameters of a spring for class@SpringAnimation.

Any spring can be described by three parameters: mass, stiffness and damping.

An undamped spring will produce an oscillatory motion which will go on forever.

The frequency and amplitude of the oscillations will be determined by the stiffness (how "strong" the spring is) and its mass (how much "inertia" it has).

If damping is larger than 0, the amplitude of that oscillating motion will exponientally decrease over time. If that damping is strong enough that the spring can't complete a full oscillation, it's called an overdamped spring.

If we the spring can oscillate, it's called an underdamped spring.

The value between these two behaviors is called critical damping; a critically damped spring will comes to rest in the minimum possible time without producing oscillations.

The damping can be replaced by damping ratio, which produces the following springs:

  • 0: an undamped spring.
  • Between 0 and 1: an underdamped spring.
  • 1: a critically damped spring.
  • Larger than 1: an overdamped spring.

As such

Constructors

this
this(double dampingRatio, double mass, double stiffness)

Creates a new adw.spring_params.SpringParams from mass, stiffness and damping_ratio.

Members

Functions

getDamping
double getDamping()

Gets the damping of self.

getDampingRatio
double getDampingRatio()

Gets the damping ratio of self.

getMass
double getMass()

Gets the mass of self.

getStiffness
double getStiffness()

Gets the stiffness of self.

Static functions

newFull
adw.spring_params.SpringParams newFull(double damping, double mass, double stiffness)

Creates a new adw.spring_params.SpringParams from mass, stiffness and damping.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.