summaryrefslogtreecommitdiffstats
path: root/Common/interface
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-02-24 22:11:15 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-02-24 22:11:15 +0000
commit065f070fe90aee08a7d572bcc28f411bb344d093 (patch)
treeef3cbcbaa9e1d2d8fc9ddd03654c243cac5c4aaa /Common/interface
parentFixed issue with gl_Position redeclaration in GLES3.1 and above (fixed https:... (diff)
downloadDiligentCore-065f070fe90aee08a7d572bcc28f411bb344d093.tar.gz
DiligentCore-065f070fe90aee08a7d572bcc28f411bb344d093.zip
BasicMath: added Vector4->Vector3 implicit conversion
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 49f3e3e9..6fb52af9 100644
--- a/Common/interface/BasicMath.h
+++ b/Common/interface/BasicMath.h
@@ -558,6 +558,11 @@ template <class T> struct Vector4
Vector4() : x(0), y(0), z(0), w(0) { }
Vector4(T _x, T _y, T _z, T _w) : x(_x), y(_y), z(_z), w(_w) { }
+
+ operator Vector3<T>() const
+ {
+ return Vector3<T>(x, y, z);
+ }
};