summaryrefslogtreecommitdiffstats
path: root/Common/interface
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-05-03 05:35:32 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-05-03 05:35:32 +0000
commit7ddbb30e18b2064ec57ed17afb29752c0f14fd7d (patch)
treef49ba87afa46882d8243ec7d8609cc60bb76d11b /Common/interface
parentBasic math: removed GL-versions of transforms as they don't realy make sense ... (diff)
downloadDiligentCore-7ddbb30e18b2064ec57ed17afb29752c0f14fd7d.tar.gz
DiligentCore-7ddbb30e18b2064ec57ed17afb29752c0f14fd7d.zip
Basic math: added Matrix4x4 Scale(T s) function
Diffstat (limited to 'Common/interface')
-rw-r--r--Common/interface/BasicMath.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Common/interface/BasicMath.h b/Common/interface/BasicMath.h
index ac0750f9..64766d54 100644
--- a/Common/interface/BasicMath.h
+++ b/Common/interface/BasicMath.h
@@ -1037,6 +1037,11 @@ template <class T> struct Matrix4x4
return Scale(v.x, v.y, v.z);
}
+ static Matrix4x4 Scale(T s)
+ {
+ return Scale(s,s,s);
+ }
+
// D3D-style left-handed matrix that rotates a point around the x axis. Angle (in radians)
// is measured clockwise when looking along the rotation axis toward the origin: