Function getScript

Synopsis

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

std::string getScript(const std::string &cameraVar)

Description

No description yet.

Source

Lines 344-361 in Source/Falcor/Scene/Camera/Camera.cpp. Line 265 in Source/Falcor/Scene/Camera/Camera.h.

std::string Camera::getScript(const std::string& cameraVar)
{
    std::string c;
    if (hasAnimation() && !isAnimated())
    {
        c += Scripting::makeSetProperty(cameraVar, kAnimated, false);
    }
    if (!hasAnimation() || !isAnimated())
    {
        c += Scripting::makeSetProperty(cameraVar, kPosition, getPosition());
        c += Scripting::makeSetProperty(cameraVar, kTarget, getTarget());
        c += Scripting::makeSetProperty(cameraVar, kUp, getUpVector());
    }
    return c;
}





Add Discussion as Guest

Log in