Vuo  1.1.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Functions
VuoSmooth.h File Reference

Description

VuoImageSmooth interface.

Header-only, to support generic types.

Classes

struct  _VuoSmoothInertia
 Instance data for smoothing a value using inertia. More...
 

Typedefs

typedef struct _VuoSmoothInertiaVuoSmoothInertia
 Instance data for smoothing a value using inertia.
 

Functions

static VuoSmoothInertia VuoSmoothInertia_make (type initialPosition)
 Creates a new smoothing object, at rest in initialPosition.
 
static void VuoSmoothInertia_setPosition (VuoSmoothInertia s, type position)
 Warps to position (without smoothing) and stops.
 
static void VuoSmoothInertia_setTarget (VuoSmoothInertia s, VuoReal time, type target)
 Changes the end value of the smooth movement to `target, and initiates/continues motion.
 
static void VuoSmoothInertia_setDuration (VuoSmoothInertia s, VuoReal duration)
 Changes the total time between successive targets.
 
static bool VuoSmoothInertia_step (VuoSmoothInertia s, VuoReal time, type *calculatedPosition)
 Calculates the next time-step.
 

Class Documentation

struct _VuoSmoothInertia
Class Members
VuoReal duration
bool moving
type positionLastFrame
type positionWhenTargetChanged
type target
VuoReal timeLastFrame
VuoReal timeWhenTargetChanged
bool updateNeededAfterSetPosition
type velocity
type velocityWhenTargetChanged

Typedef Documentation

Instance data for smoothing a value using inertia.

Function Documentation

static VuoSmoothInertia VuoSmoothInertia_make ( type  initialPosition)
static

Creates a new smoothing object, at rest in initialPosition.

static void VuoSmoothInertia_setDuration ( VuoSmoothInertia  s,
VuoReal  duration 
)
static

Changes the total time between successive targets.

static void VuoSmoothInertia_setPosition ( VuoSmoothInertia  s,
type  position 
)
static

Warps to position (without smoothing) and stops.

static void VuoSmoothInertia_setTarget ( VuoSmoothInertia  s,
VuoReal  time,
type  target 
)
static

Changes the end value of the smooth movement to `target, and initiates/continues motion.

static bool VuoSmoothInertia_step ( VuoSmoothInertia  s,
VuoReal  time,
type *  calculatedPosition 
)
static

Calculates the next time-step.

time should be monotonically-increasing (not a delta).

Returns true if motion is in progress (and thus an event should be fired).