Convert


Overloaded template function to convert arguments to different data type.

You can find more information in comments below.

template<<class TO, class FROM, size_t CHANNELS = 4>>
TBitmap<lt;TO, CHANNELS>gt; Convert(const TBitmap<lt;FROM, CHANNELS>gt; &b); // Convert to bitmap with another data type
template<class TO, class FROM>
TComplex<TO> Convert(const TComplex<FROM> &v); // Convert to complex with another data type
template<class TO, class FROM>
TMat2<TO> Convert(const TMat2<FROM> &m); // Convert to matrix with another data type
template<class TO, class FROM>
TMat3<TO> Convert(const TMat3<FROM> &m); // Convert to matrix with another data type
template<class TO, class FROM>
TMat4<TO> Convert(const TMat4<FROM> &m); // Convert to matrix with another data type
template<class TO, size_t ROWS, size_t COLUMNS, class FROM>
TMatrix<TO, ROWS, COLUMNS> Convert(const TMatrix<FROM, ROWS, COLUMNS> &m); // Convert to matrix with another data type
template<class TO, class FROM>
TPoint<TO> Convert(const TPoint<FROM> &p); // Convert to point with another data type
template<class TO, class FROM>
TRect<TO> Convert(const TRect<FROM> &r); // Convert to rect with another data type
template<class TO, class FROM>
TVec1<TO> Convert(const TVec1<FROM> &v); // Convert to vector with another data type
template<class TO, class FROM>
TVec2<TO> Convert(const TVec2<FROM> &v); // Convert to vector with another data type
template<class TO, class FROM>
TVec3<TO> Convert(const TVec3<FROM> &v); // Convert to vector with another data type
template<class TO, class FROM>
TVec4<TO> Convert(const TVec4<FROM> &v); // Convert to vector with another data type
template<class TO, class FROM>
TQuaternion<TO> Convert(const TQuaternion<FROM> &q); // Convert to quaternion with another data type
template<class TO, class FROM, size_t CHANNELS = 4>
TPixel<TO, CHANNELS> Convert(const TPixel<FROM, CHANNELS> &p); // Convert to pixel with another data type
template<class TO, class FROM>
TPlane<TO> Convert(const TPlane<FROM> &p); // Convert to plane with another data type
template<class TO, class FROM>
TRange<TO> Convert(const TRange<FROM> &v); // Convert to range with another data type
template<class TO, class FROM, size_t SIZE, size_t ...Dimensions>
void Convert(const TTensor<FROM, SIZE, Dimensions...> &v, TTensor<TO, SIZE, Dimensions...> &target); // Convert to tensor with another data type
template<class TO, class FROM, size_t SIZE, size_t ...Dimensions>
TTensor<TO, SIZE, Dimensions...> Convert(const TTensor<FROM, SIZE, Dimensions...> &v); // Convert to tensor with another data type
Namespace: ntl
Include: NTL/Core/Bitmap.h (For TBitmap argument)
NTL/Core/Complex.h (For TComplex argument)
NTL/Core/Mat2.h (For TMat2 argument)
NTL/Core/Mat3.h (For TMat3 argument)
NTL/Core/Mat4.h (For TMat4 argument)
NTL/Core/Matrix.h (For TMatrix argument)
NTL/Core/Point.h (For TPoint argument)
NTL/Core/Rect.h (For TRect argument)
NTL/Core/Vec1.h (For TVec1 argument)
NTL/Core/Vec2.h (For TVec2 argument)
NTL/Core/Vec3.h (For TVec3 argument)
NTL/Core/Vec4.h (For TVec4 argument)
NTL/Core/Quaternion.h (For TQuaternion argument)
NTL/Core/Pixel.h (For TPixel argument)
NTL/Core/Plane.h (For TPlane argument)
NTL/Core/Range.h (For TRange argument)
NTL/Core/Tensor.h (For TTensor argument)