2.9.3 Animatedtransform implementation

Given the foundations of the quaternion infrastructure, we can now implement the AnimatedTransform class, which implements keyframe transformation interpolation in pbrt. Its constructor takes two transformations and the time values they are associated with.

As mentioned earlier, AnimatedTransform decomposes the given composite transformation matrices into scaling, rotation, and translation components. The decomposition is performed by the AnimatedTransform::Decompose() method.

AnimatedTransform Method Definitions〉 ≡

  AnimatedTransform::AnimatedTransform(const Transform *startTransform,

        Float startTime, const Transform *endTransform, Float endTime)

    : startTransform(startTransform), endTransform(endTransform), ...

Get Physically Based Rendering, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.