2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright Contributors to the OpenEXR Project.
8 #include "PyImathVec2Impl.h"
9 #include "PyImathExport.h"
12 template <> const char *PyImath::V2sArray::name() { return "V2sArray"; }
13 template <> const char *PyImath::V2iArray::name() { return "V2iArray"; }
14 template <> const char *PyImath::V2i64Array::name() { return "V2i64Array"; }
16 using namespace boost::python;
17 using namespace IMATH_NAMESPACE;
19 template<> const char *Vec2Name<short>::value = "V2s";
20 template<> const char *Vec2Name<int>::value = "V2i";
21 template<> const char *Vec2Name<int64_t>::value = "V2i64";
23 template PYIMATH_EXPORT class_<IMATH_NAMESPACE::Vec2<short> > register_Vec2<short>();
24 template PYIMATH_EXPORT class_<IMATH_NAMESPACE::Vec2<int> > register_Vec2<int>();
25 template PYIMATH_EXPORT class_<IMATH_NAMESPACE::Vec2<int64_t> > register_Vec2<int64_t>();
27 template PYIMATH_EXPORT class_<FixedArray<IMATH_NAMESPACE::Vec2<short> > > register_Vec2Array<short>();
28 template PYIMATH_EXPORT class_<FixedArray<IMATH_NAMESPACE::Vec2<int> > > register_Vec2Array<int>();
29 template PYIMATH_EXPORT class_<FixedArray<IMATH_NAMESPACE::Vec2<int64_t> > > register_Vec2Array<int64_t>();
31 template<> IMATH_NAMESPACE::Vec2<short> PYIMATH_EXPORT FixedArrayDefaultValue<IMATH_NAMESPACE::Vec2<short> >::value() { return IMATH_NAMESPACE::Vec2<short>(0,0); }
32 template<> IMATH_NAMESPACE::Vec2<int> PYIMATH_EXPORT FixedArrayDefaultValue<IMATH_NAMESPACE::Vec2<int> >::value() { return IMATH_NAMESPACE::Vec2<int>(0,0); }
33 template<> IMATH_NAMESPACE::Vec2<int64_t> PYIMATH_EXPORT FixedArrayDefaultValue<IMATH_NAMESPACE::Vec2<int64_t> >::value() { return IMATH_NAMESPACE::Vec2<int64_t>(0,0); }