igor::iClip Class Reference

#include <iClip.h>

Public Member Functions

 ~iClip ()=default
 
void addAnimation (iAnimationPtr animation)
 
void removeAnimation (iAnimationPtr animation)
 
const std::vector< iAnimationPtr > & getAnimations () const
 
const iaTimegetStart ()
 
const iaTimegetStop ()
 
const iaTimegetDuration ()
 
void setEasingFunction (iaEasing::iaEasingFunction interpolationFunction)
 
iaEasing::iaEasingFunction getEasingFunction () const
 
void setLooped (bool loop=true)
 
bool isLooped () const
 
void setRandomStart (bool randomStart)
 
bool hasRandomStart () const
 
float64 getNormalizedTime (const iaTime &startTime, const iaTime &time)
 

Static Public Member Functions

static iClipPtr createClip (const std::vector< iAnimationPtr > &animations=std::vector< iAnimationPtr >(), bool looped=true, bool randomStart=false, iaEasing::iaEasingFunction easingFunction=iaEasing::iaEasingFunction::Linear)
 

Detailed Description

clip to time an animation

Constructor & Destructor Documentation

◆ ~iClip()

igor::iClip::~iClip ( )
default

does nothing

Member Function Documentation

◆ addAnimation()

void igor::iClip::addAnimation ( iAnimationPtr  animation)

adds animation to this clip

Parameters
animationthe to add

◆ createClip()

iClipPtr igor::iClip::createClip ( const std::vector< iAnimationPtr > &  animations = std::vector<iAnimationPtr>(),
bool  looped = true,
bool  randomStart = false,
iaEasing::iaEasingFunction  easingFunction = iaEasing::iaEasingFunction::Linear 
)
static

create clip

Parameters
animationslist of animations to bind to this clip
loopedif true clip is looped
randomStartif true clip starts with a random offset
easingFunctionthe easing function to use (default linear)

◆ getAnimations()

const std::vector< iAnimationPtr > & igor::iClip::getAnimations ( ) const
Returns
animations under this clip

◆ getDuration()

const iaTime & igor::iClip::getDuration ( )
Returns
duration time

◆ getEasingFunction()

iaEasing::iaEasingFunction igor::iClip::getEasingFunction ( ) const
Returns
interpolation function type

◆ getNormalizedTime()

float64 igor::iClip::getNormalizedTime ( const iaTime startTime,
const iaTime time 
)
Returns
value generally between 0.0-1.0

Where 0.0 represents the start and 1.0 the stop time If the time given is before start the returns value is 0.0 If the time given is after stop the returns value is 1.0

Parameters
startTimethe time this clip was started to playback
timethe time we want to normalize

◆ getStart()

const iaTime & igor::iClip::getStart ( )
Returns
start time

◆ getStop()

const iaTime & igor::iClip::getStop ( )
Returns
start time

◆ hasRandomStart()

bool igor::iClip::hasRandomStart ( ) const
Returns
true if random start is active

◆ isLooped()

bool igor::iClip::isLooped ( ) const
Returns
true if evaluation is in loop mode

◆ removeAnimation()

void igor::iClip::removeAnimation ( iAnimationPtr  animation)

removes animation from this clip

Parameters
animationthe to remove

◆ setEasingFunction()

void igor::iClip::setEasingFunction ( iaEasing::iaEasingFunction  interpolationFunction)

sets the interpolation function

only has an effect on deriving classes that respect the easing function like iClipTransform

Parameters
interpolationFunctionthe interpolation function type to set

◆ setLooped()

void igor::iClip::setLooped ( bool  loop = true)

sets if this evaluation runs in an endless loop

◆ setRandomStart()

void igor::iClip::setRandomStart ( bool  randomStart)

sets random start time flag

This flag can be used to have an animation playback with a random offset so copies of an animation don't appear too artificially synchronous


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