diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-08 08:19:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-10 06:54:05 +0300 |
commit | 623141f339d5066ed6b96ad70ab45fb294e3e612 (patch) | |
tree | 4af00e5d967a66829db1bec4bbf369c0529b9bd7 /intern/cycles/util/util_transform.cpp | |
parent | 516e82a90012da3911518103829158215d94215f (diff) |
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.
Diffstat (limited to 'intern/cycles/util/util_transform.cpp')
-rw-r--r-- | intern/cycles/util/util_transform.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp index c1270545339..edb53cc06b7 100644 --- a/intern/cycles/util/util_transform.cpp +++ b/intern/cycles/util/util_transform.cpp @@ -202,7 +202,7 @@ float4 transform_to_quat(const Transform& tfm) return qt; } -static void transform_decompose(Transform *decomp, const Transform *tfm) +static void transform_decompose(DecomposedTransform *decomp, const Transform *tfm) { /* extract translation */ decomp->y = make_float4(tfm->x.w, tfm->y.w, tfm->z.w, 0.0f); @@ -247,7 +247,7 @@ static void transform_decompose(Transform *decomp, const Transform *tfm) decomp->w = make_float4(scale.y.z, scale.z.x, scale.z.y, scale.z.z); } -void transform_motion_decompose(MotionTransform *decomp, const MotionTransform *motion, const Transform *mid) +void transform_motion_decompose(DecomposedMotionTransform *decomp, const MotionTransform *motion, const Transform *mid) { transform_decompose(&decomp->pre, &motion->pre); transform_decompose(&decomp->mid, mid); |