Code refactor: add DecomposedTransform.

This is in preparation of making Transform affine only, and also gives us
a little extra type safety so we don't accidentally treat it as a regular
4x4 matrix.
This commit is contained in:
Brecht Van Lommel
2018-03-08 06:19:17 +01:00
parent 516e82a900
commit 623141f339
9 changed files with 45 additions and 27 deletions

View File

@@ -341,12 +341,12 @@ void Camera::update(Scene *scene)
/* TODO(sergey): Support perspective (zoom, fov) motion. */
if(type == CAMERA_PANORAMA) {
if(use_motion) {
kcam->motion.pre = transform_inverse(motion.pre);
kcam->motion.post = transform_inverse(motion.post);
kcam->pass_motion.pre = transform_inverse(motion.pre);
kcam->pass_motion.post = transform_inverse(motion.post);
}
else {
kcam->motion.pre = kcam->worldtocamera;
kcam->motion.post = kcam->worldtocamera;
kcam->pass_motion.pre = kcam->worldtocamera;
kcam->pass_motion.post = kcam->worldtocamera;
}
}
else {