8 #ifndef _PyImathShear_h_
9 #define _PyImathShear_h_
12 #define HBOOST_BIND_GLOBAL_PLACEHOLDERS
13 #include <hboost/python.hpp>
19 template <
class T> hboost::python::class_<IMATH_NAMESPACE::Shear6<T> >
register_Shear();
33 static PyObject *
wrap (
const IMATH_NAMESPACE::Shear6<T> &
s);
34 static int convert (PyObject *p, IMATH_NAMESPACE::Shear6<T> *s);
41 typename hboost::python::return_by_value::apply < IMATH_NAMESPACE::Shear6<T> >
::type converter;
42 PyObject *p = converter (s);
50 hboost::python::extract <IMATH_NAMESPACE::Shear6f> extractorShear6f (p);
51 if (extractorShear6f.check())
54 float xy, xz, yz, yx, zx, zy;
55 s6f.getValue (xy, xz, yz, yx, zx, zy);
56 s->setValue(
T(xy),
T(xz),
T(yz),
T(yx),
T(zx),
T(zy));
60 hboost::python::extract <IMATH_NAMESPACE::Shear6d> extractorShear6d (p);
61 if (extractorShear6d.check())
64 double xy, xz, yz, yx, zx, zy;
65 s6d.getValue (xy, xz, yz, yx, zx, zy);
66 s->setValue(
T(xy),
T(xz),
T(yz),
T(yx),
T(zx),
T(zy));
70 hboost::python::extract <hboost::python::tuple> extractorTuple (p);
71 if (extractorTuple.check())
73 hboost::python::tuple
t = extractorTuple();
74 if (t.attr (
"__len__") () == 3)
76 double xy = hboost::python::extract <double> (t[0]);
77 double xz = hboost::python::extract <double> (t[1]);
78 double yz = hboost::python::extract <double> (t[2]);
79 s->setValue (
T(xy),
T(xz),
T(yz),
T(0),
T(0),
T(0));
83 else if (t.attr (
"__len__") () == 6)
85 double xy = hboost::python::extract <double> (t[0]);
86 double xz = hboost::python::extract <double> (t[1]);
87 double yz = hboost::python::extract <double> (t[2]);
88 double yx = hboost::python::extract <double> (t[3]);
89 double zx = hboost::python::extract <double> (t[4]);
90 double zy = hboost::python::extract <double> (t[5]);
91 s->setValue (
T(xy),
T(xz),
T(yz),
T(yx),
T(zx),
T(zy));
96 hboost::python::extract <IMATH_NAMESPACE::V3i> extractorV3i (p);
97 if (extractorV3i.check())
100 s->setValue (
T(v3i[0]),
T(v3i[1]),
T(v3i[2]),
T(0),
T(0),
T(0));
104 hboost::python::extract <IMATH_NAMESPACE::V3f> extractorV3f (p);
105 if (extractorV3f.check())
108 s->setValue (
T(v3f[0]),
T(v3f[1]),
T(v3f[2]),
T(0),
T(0),
T(0));
112 hboost::python::extract <IMATH_NAMESPACE::V3d> extractorV3d (p);
113 if (extractorV3d.check())
116 s->setValue (
T(v3d[0]),
T(v3d[1]),
T(v3d[2]),
T(0),
T(0),
T(0));
static int convert(PyObject *p, IMATH_NAMESPACE::Shear6< T > *s)
Vec3< int > V3i
Vec3 of integer.
static PyObject * wrap(const IMATH_NAMESPACE::Shear6< T > &s)
Vec3< double > V3d
Vec3 of double.
Shear6< float > Shear6f
Shear6 of type float.
GLint GLint GLsizei GLint GLenum GLenum type
Vec3< float > V3f
Vec3 of float.
Shear6< double > Shear6d
Shear6 of type double.
hboost::python::class_< IMATH_NAMESPACE::Shear6< T > > register_Shear()