X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FNCollection%2FNCollection_Vec4.hxx;h=b3c84aea9a38256fe8684c8f79506657cc82cd4e;hb=f9b30c0db34c00de8b7a3d0724f3b46e23dfd590;hpb=a5278fc126a36055aa61c4fa3a5ee7331a1801ab diff --git a/src/NCollection/NCollection_Vec4.hxx b/src/NCollection/NCollection_Vec4.hxx index f049585df3..b3c84aea9a 100644 --- a/src/NCollection/NCollection_Vec4.hxx +++ b/src/NCollection/NCollection_Vec4.hxx @@ -73,6 +73,20 @@ public: v[3] = theW; } + //! Conversion constructor (explicitly converts some 4-component vector with other element type + //! to a new 4-component vector with the element type Element_t, + //! whose elements are static_cast'ed corresponding elements of theOtherVec4 vector) + //! @tparam OtherElement_t the element type of the other 4-component vector theOtherVec4 + //! @param theOtherVec4 the 4-component vector that needs to be converted + template + explicit NCollection_Vec4 (const NCollection_Vec4& theOtherVec4) + { + v[0] = static_cast (theOtherVec4[0]); + v[1] = static_cast (theOtherVec4[1]); + v[2] = static_cast (theOtherVec4[2]); + v[3] = static_cast (theOtherVec4[3]); + } + //! Assign new values to the vector. void SetValues (const Element_t theX, const Element_t theY,