Function updateFromAnimation

Synopsis

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

void updateFromAnimation(const glm::mat4 &transform) override

Description

Update the transform of the animatable object.

Source

Lines 299-307 in Source/Falcor/Scene/Camera/Camera.cpp. Line 237 in Source/Falcor/Scene/Camera/Camera.h.

void Camera::updateFromAnimation(const glm::mat4& transform)
{
    float3 up = float3(transform[1]);
    float3 fwd = float3(transform[2]);
    float3 pos = float3(transform[3]);
    setUpVector(up);
    setPosition(pos);
    setTarget(pos + fwd);
}





Add Discussion as Guest

Log in to DocsForge