Function animate

Synopsis

#include <Source/Falcor/Scene/Animation/Animation.h>

void animate(double currentTime, std::vector< glm::mat4 > &matrices)

Description

Run the animation

Parameters:

currentTime - The current time in seconds. This can be larger then the animation time, in which case the animation will loop

matrices - The array of global matrices to update

Source

Lines 176-184 in Source/Falcor/Scene/Animation/Animation.cpp. Line 98 in Source/Falcor/Scene/Animation/Animation.h.

void Animation::animate(double totalTime, std::vector<glm::mat4>& matrices)
{
    // Calculate the relative time
    double modTime = std::fmod(totalTime, mDurationInSeconds);
    for (auto& c : mChannels)
    {
        matrices[c.matrixID] = animateChannel(c, modTime);
    }
}





Add Discussion as Guest

Log in to DocsForge