HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PyImathVec.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright Contributors to the OpenEXR Project.
4 //
5 
6 // clang-format off
7 
8 #ifndef _PyImathVec_h_
9 #define _PyImathVec_h_
10 
11 #include <Python.h>
12 #define HBOOST_BIND_GLOBAL_PLACEHOLDERS
13 #include <hboost/python.hpp>
14 #include <ImathVec.h>
15 #include "PyImath.h"
16 #include "PyImathFixedArray.h"
17 
18 namespace PyImath {
19 
20 template <class T> hboost::python::class_<IMATH_NAMESPACE::Vec2<T> > register_Vec2();
21 template <class T> hboost::python::class_<FixedArray<IMATH_NAMESPACE::Vec2<T> > > register_Vec2Array();
27 
28 // TODO: template <class T> class Vec2Array : public FixedArray<IMATH_NAMESPACE::Vec2<T> >
29 
30 }
31 
32 // define vector*float array multiplication
33 template <class T>
34 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a0, T v1) {
36  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*v1; return f;
37 }
38 template <class T>
39 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator * (T v0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a1) { return a1*v0; }
40 template <class T>
41 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a0, const PyImath::FixedArray<T> &a1) {
43  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*a1[i]; return f;
44 }
45 template <class T>
46 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator * (const PyImath::FixedArray<T> &a0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a1) {
47  return a1*a0;
48 }
49 
50 // define vector/float array division
51 template <class T>
52 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a0, T v1) {
54  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/v1; return f;
55 }
56 template <class T>
57 static PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > &a0, const PyImath::FixedArray<T> &a1) {
59  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec2<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/a1[i]; return f;
60 }
61 
62 
63 namespace PyImath {
64 
65 template <class T> hboost::python::class_<IMATH_NAMESPACE::Vec3<T> > register_Vec3();
66 template <class T> hboost::python::class_<FixedArray<IMATH_NAMESPACE::Vec3<T> > > register_Vec3Array();
73 
74 // TODO: template <class T> class Vec3Array : public FixedArray<IMATH_NAMESPACE::Vec3<T> >
75 }
76 
77 // define vector*float array multiplication
78 template <class T>
79 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a0, T v1) {
81  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*v1; return f;
82 }
83 template <class T>
84 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (T v0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a1) { return a1*v0; }
85 template <class T>
86 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a0, const PyImath::FixedArray<T> &a1) {
88  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*a1[i]; return f;
89 }
90 template <class T>
91 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (const PyImath::FixedArray<T> &a0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a1) {
92  return a1*a0;
93 }
94 template <class T>
95 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &va, const IMATH_NAMESPACE::M44f &m) {
97  size_t len = va.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i = 0; i < len; ++i) f[i] = va[i] * m; return f;
98 }
99 
100 template <class T>
101 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &va, const IMATH_NAMESPACE::M44d &m) {
103  size_t len = va.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i = 0; i < len; ++i) f[i] = va[i] * m; return f;
104 }
105 
106 // define vector/float array division
107 template <class T>
108 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a0, T v1) {
110  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/v1; return f;
111 }
112 template <class T>
113 static PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > &a0, const PyImath::FixedArray<T> &a1) {
115  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec3<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/a1[i]; return f;
116 }
117 
118 namespace PyImath {
119 
120 template <class T> hboost::python::class_<IMATH_NAMESPACE::Vec4<T> > register_Vec4();
121 template <class T> hboost::python::class_<PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > > register_Vec4Array();
128 
129 // TODO: template <class T> class Vec3Array : public FixedArray<IMATH_NAMESPACE::Vec3<T> >
130 }
131 
132 // define vector*float array multiplication
133 template <class T>
134 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a0, T v1) {
136  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*v1; return f;
137 }
138 template <class T>
139 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (T v0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a1) { return a1*v0; }
140 template <class T>
141 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a0, const PyImath::FixedArray<T> &a1) {
143  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]*a1[i]; return f;
144 }
145 template <class T>
146 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (const PyImath::FixedArray<T> &a0, const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a1) {
147  return a1*a0;
148 }
149 template <class T>
150 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &va, const IMATH_NAMESPACE::M44f &m) {
152  size_t len = va.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i = 0; i < len; ++i) f[i] = va[i] * m; return f;
153 }
154 
155 template <class T>
156 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator * (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &va, const IMATH_NAMESPACE::M44d &m) {
158  size_t len = va.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i = 0; i < len; ++i) f[i] = va[i] * m; return f;
159 }
160 
161 // define vector/float array division
162 template <class T>
163 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a0, T v1) {
165  size_t len = a0.len(); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/v1; return f;
166 }
167 template <class T>
168 static PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > operator / (const PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > &a0, const PyImath::FixedArray<T> &a1) {
170  size_t len = a0.match_dimension(a1); PyImath::FixedArray<IMATH_NAMESPACE::Vec4<T> > f(len); for (size_t i=0;i<len;++i) f[i]=a0[i]/a1[i]; return f;
171 }
172 
173 
174 //
175 
176 namespace PyImath {
177 
178 // Other code in the Zeno code base assumes the existance of a class with the
179 // same name as the Imath class, and with static functions wrap() and
180 // convert() to produce a PyImath object from an Imath object and vice-versa,
181 // respectively. The class Boost generates from the Imath class does not
182 // have these properties, so we define a companion class here.
183 // The template argument, T, is the element type for the vector (e.g., int,
184 // float, double).
185 
186 template <class T>
187 class V2 {
188  public:
189  static PyObject * wrap (const IMATH_NAMESPACE::Vec2<T> &v);
190  static int convert (PyObject *p, IMATH_NAMESPACE::Vec2<T> *v);
191 };
192 
193 template <class T>
194 class V3 {
195  public:
196  static PyObject * wrap (const IMATH_NAMESPACE::Vec3<T> &v);
197  static int convert (PyObject *p, IMATH_NAMESPACE::Vec3<T> *v);
198 };
199 
200 template <class T>
201 class V4 {
202  public:
203  static PyObject * wrap (const IMATH_NAMESPACE::Vec4<T> &v);
204  static int convert (PyObject *p, IMATH_NAMESPACE::Vec4<T> *v);
205 };
206 
207 template <class T>
208 PyObject *
209 V2<T>::wrap (const IMATH_NAMESPACE::Vec2<T> &v)
210 {
211  typename hboost::python::return_by_value::apply < IMATH_NAMESPACE::Vec2<T> >::type converter;
212  PyObject *p = converter (v);
213  return p;
214 }
215 
216 template <class T>
217 PyObject *
218 V3<T>::wrap (const IMATH_NAMESPACE::Vec3<T> &v)
219 {
220  typename hboost::python::return_by_value::apply < IMATH_NAMESPACE::Vec3<T> >::type converter;
221  PyObject *p = converter (v);
222  return p;
223 }
224 
225 template <class T>
226 PyObject *
227 V4<T>::wrap (const IMATH_NAMESPACE::Vec4<T> &v)
228 {
229  typename hboost::python::return_by_value::apply < IMATH_NAMESPACE::Vec4<T> >::type converter;
230  PyObject *p = converter (v);
231  return p;
232 }
233 
234 template <class T>
235 int
236 V2<T>::convert (PyObject *p, IMATH_NAMESPACE::Vec2<T> *v)
237 {
238  hboost::python::extract <IMATH_NAMESPACE::V2i> extractorV2i (p);
239  if (extractorV2i.check())
240  {
241  IMATH_NAMESPACE::V2i v2i = extractorV2i();
242  v->setValue (T(v2i[0]), T(v2i[1]));
243  return 1;
244  }
245 
246  hboost::python::extract <IMATH_NAMESPACE::V2i64> extractorV2i64 (p);
247  if (extractorV2i64.check())
248  {
249  IMATH_NAMESPACE::V2i64 v2i64 = extractorV2i64();
250  v->setValue (T(v2i64[0]), T(v2i64[1]));
251  return 1;
252  }
253 
254  hboost::python::extract <IMATH_NAMESPACE::V2f> extractorV2f (p);
255  if (extractorV2f.check())
256  {
257  IMATH_NAMESPACE::V2f v2f = extractorV2f();
258  v->setValue (T(v2f[0]), T(v2f[1]));
259  return 1;
260  }
261 
262  hboost::python::extract <IMATH_NAMESPACE::V2d> extractorV2d (p);
263  if (extractorV2d.check())
264  {
265  IMATH_NAMESPACE::V2d v2d = extractorV2d();
266  v->setValue (T(v2d[0]), T(v2d[1]));
267  return 1;
268  }
269 
270  hboost::python::extract <hboost::python::tuple> extractorTuple (p);
271  if (extractorTuple.check())
272  {
273  hboost::python::tuple t = extractorTuple();
274  if (t.attr ("__len__") () == 2)
275  {
276  // Extracting the tuple elements as doubles and casting them to
277  // Ts in setValue() works better than extracting them as Ts from
278  // the start. Extracting them as Ts can fail in certain
279  // circumstances if T is int and the tuples elemnts are floats.
280  // In particular, this kind of failure occurs in PyImathBox.h,
281  // when Box2<int>::convert() is passed a tuple of two tuples of
282  // floats.
283 
284  double a = hboost::python::extract <double> (t[0]);
285  double b = hboost::python::extract <double> (t[1]);
286  v->setValue (T(a), T(b));
287  return 1;
288  }
289  }
290 
291  hboost::python::extract <hboost::python::list> extractorList (p);
292  if (extractorList.check())
293  {
294  hboost::python::list l = extractorList();
295  if (l.attr ("__len__") () == 2)
296  {
297  hboost::python::extract <double> extractor0 (l[0]);
298  hboost::python::extract <double> extractor1 (l[1]);
299  if (extractor0.check() && extractor1.check())
300  {
301  v->setValue (T(extractor0()), T(extractor1()));
302  return 1;
303  }
304  }
305  }
306 
307  return 0;
308 }
309 
310 template <class T>
311 int
312 V3<T>::convert (PyObject *p, IMATH_NAMESPACE::Vec3<T> *v)
313 {
314  hboost::python::extract <IMATH_NAMESPACE::V3i> extractorV3i (p);
315  if (extractorV3i.check())
316  {
317  IMATH_NAMESPACE::V3i v3i = extractorV3i();
318  v->setValue (T(v3i[0]), T(v3i[1]), T(v3i[2]));
319  return 1;
320  }
321 
322  hboost::python::extract <IMATH_NAMESPACE::V3i64> extractorV3i64 (p);
323  if (extractorV3i64.check())
324  {
325  IMATH_NAMESPACE::V3i64 v3i64 = extractorV3i64();
326  v->setValue (T(v3i64[0]), T(v3i64[1]), T(v3i64[2]));
327  return 1;
328  }
329 
330  hboost::python::extract <IMATH_NAMESPACE::V3f> extractorV3f (p);
331  if (extractorV3f.check())
332  {
333  IMATH_NAMESPACE::V3f v3f = extractorV3f();
334  v->setValue (T(v3f[0]), T(v3f[1]), T(v3f[2]));
335  return 1;
336  }
337 
338  hboost::python::extract <IMATH_NAMESPACE::V3d> extractorV3d (p);
339  if (extractorV3d.check())
340  {
341  IMATH_NAMESPACE::V3d v3d = extractorV3d();
342  v->setValue (T(v3d[0]), T(v3d[1]), T(v3d[2]));
343  return 1;
344  }
345 
346  hboost::python::extract <hboost::python::tuple> extractorTuple (p);
347  if (extractorTuple.check())
348  {
349  hboost::python::tuple t = extractorTuple();
350  if (t.attr ("__len__") () == 3)
351  {
352  // See the comment in V2<T>::convert().
353 
354  double a = hboost::python::extract <double> (t[0]);
355  double b = hboost::python::extract <double> (t[1]);
356  double c = hboost::python::extract <double> (t[2]);
357  v->setValue (T(a), T(b), T(c));
358  return 1;
359  }
360  }
361 
362  hboost::python::extract <hboost::python::list> extractorList (p);
363  if (extractorList.check())
364  {
365  hboost::python::list l = extractorList();
366  if (l.attr ("__len__") () == 3)
367  {
368  hboost::python::extract <double> extractor0 (l[0]);
369  hboost::python::extract <double> extractor1 (l[1]);
370  hboost::python::extract <double> extractor2 (l[2]);
371  if (extractor0.check() && extractor1.check() &&
372  extractor2.check())
373  {
374  v->setValue (T(extractor0()), T(extractor1()),
375  T(extractor2()));
376  return 1;
377  }
378  }
379  }
380 
381  return 0;
382 }
383 
384 template <class T>
385 int
386 V4<T>::convert (PyObject *p, IMATH_NAMESPACE::Vec4<T> *v)
387 {
388  hboost::python::extract <IMATH_NAMESPACE::V4i> extractorV4i (p);
389  if (extractorV4i.check())
390  {
391  IMATH_NAMESPACE::V4i v4i = extractorV4i();
392  *v = IMATH_NAMESPACE::Vec4<T>(v4i);
393  return 1;
394  }
395 
396  hboost::python::extract <IMATH_NAMESPACE::V4f> extractorV4f (p);
397  if (extractorV4f.check())
398  {
399  IMATH_NAMESPACE::V4f v4f = extractorV4f();
400  *v = IMATH_NAMESPACE::Vec4<T>(v4f);
401  return 1;
402  }
403 
404  hboost::python::extract <IMATH_NAMESPACE::V4d> extractorV4d (p);
405  if (extractorV4d.check())
406  {
407  IMATH_NAMESPACE::V4d v4d = extractorV4d();
408  *v = IMATH_NAMESPACE::Vec4<T>(v4d);
409  return 1;
410  }
411 
412  hboost::python::extract <hboost::python::tuple> extractorTuple (p);
413  if (extractorTuple.check())
414  {
415  hboost::python::tuple t = extractorTuple();
416  if (t.attr ("__len__") () == 4)
417  {
418  // See the comment in V2<T>::convert().
419 
420  double a = hboost::python::extract <double> (t[0]);
421  double b = hboost::python::extract <double> (t[1]);
422  double c = hboost::python::extract <double> (t[2]);
423  double d = hboost::python::extract <double> (t[3]);
424  *v = IMATH_NAMESPACE::Vec4<T>(T(a), T(b), T(c), T(d));
425  return 1;
426  }
427  }
428 
429  hboost::python::extract <hboost::python::list> extractorList (p);
430  if (extractorList.check())
431  {
432  hboost::python::list l = extractorList();
433  if (l.attr ("__len__") () == 4)
434  {
435  hboost::python::extract <double> extractor0 (l[0]);
436  hboost::python::extract <double> extractor1 (l[1]);
437  hboost::python::extract <double> extractor2 (l[2]);
438  hboost::python::extract <double> extractor3 (l[3]);
439  if (extractor0.check() && extractor1.check() &&
440  extractor2.check() && extractor3.check())
441  {
442  *v = IMATH_NAMESPACE::Vec4<T>(T(extractor0()), T(extractor1()),
443  T(extractor2()), T(extractor3()));
444  return 1;
445  }
446  }
447  }
448 
449  return 0;
450 }
451 
452 
453 typedef V2<int> V2i;
454 typedef V2<float> V2f;
455 typedef V2<double> V2d;
456 typedef V3<int> V3i;
457 typedef V3<float> V3f;
458 typedef V3<double> V3d;
459 typedef V4<int> V4i;
460 typedef V4<float> V4f;
461 typedef V4<double> V4d;
462 
463 }
464 
465 #endif
FixedArray< IMATH_NAMESPACE::V3i > V3iArray
Definition: PyImathVec.h:69
Mat3< typename promote< S, T >::type > operator*(S scalar, const Mat3< T > &m)
Multiply each element of the given matrix by scalar and return the result.
Definition: Mat3.h:561
hboost::python::class_< PyImath::FixedArray< IMATH_NAMESPACE::Vec4< T > > > register_Vec4Array()
FixedArray< IMATH_NAMESPACE::Vec4< unsigned char > > V4cArray
Definition: PyImathVec.h:122
Matrix44< float > M44f
4x4 matrix of float
Definition: ImathMatrix.h:1401
FixedArray< IMATH_NAMESPACE::V3f > V3fArray
Definition: PyImathVec.h:71
V4< double > V4d
Definition: PyImathVec.h:461
Vec4< float > V4f
Vec4 of float.
Definition: ImathVec.h:1082
const GLdouble * v
Definition: glcorearb.h:837
Vec3< int > V3i
Vec3 of integer.
Definition: ImathVec.h:1058
Vec2< int > V2i
Vec2 of integer.
Definition: ImathVec.h:1040
FixedArray< IMATH_NAMESPACE::V4i64 > V4i64Array
Definition: PyImathVec.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
static PyObject * wrap(const IMATH_NAMESPACE::Vec4< T > &v)
Definition: PyImathVec.h:227
V4< float > V4f
Definition: PyImathVec.h:460
hboost::python::class_< IMATH_NAMESPACE::Vec2< T > > register_Vec2()
hboost::python::class_< FixedArray< IMATH_NAMESPACE::Vec3< T > > > register_Vec3Array()
V2< int > V2i
Definition: PyImathVec.h:453
static PyObject * wrap(const IMATH_NAMESPACE::Vec3< T > &v)
Definition: PyImathVec.h:218
Vec4< int > V4i
Vec4 of integer.
Definition: ImathVec.h:1076
FixedArray< IMATH_NAMESPACE::V4s > V4sArray
Definition: PyImathVec.h:123
hboost::python::class_< IMATH_NAMESPACE::Vec3< T > > register_Vec3()
FixedArray< IMATH_NAMESPACE::V3s > V3sArray
Definition: PyImathVec.h:68
Matrix44< double > M44d
4x4 matrix of double
Definition: ImathMatrix.h:1404
Vec3< double > V3d
Vec3 of double.
Definition: ImathVec.h:1067
static PyObject * wrap(const IMATH_NAMESPACE::Vec2< T > &v)
Definition: PyImathVec.h:209
GLfloat f
Definition: glcorearb.h:1926
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
hboost::python::class_< FixedArray< IMATH_NAMESPACE::Vec2< T > > > register_Vec2Array()
hboost::python::class_< IMATH_NAMESPACE::Vec4< T > > register_Vec4()
FixedArray< IMATH_NAMESPACE::V2i > V2iArray
Definition: PyImathVec.h:23
V4< int > V4i
Definition: PyImathVec.h:459
FixedArray< IMATH_NAMESPACE::V3d > V3dArray
Definition: PyImathVec.h:72
Vec2< double > V2d
Vec2 of double.
Definition: ImathVec.h:1049
V3< int > V3i
Definition: PyImathVec.h:456
Vec3< int64_t > V3i64
Vec3 of int64_t.
Definition: ImathVec.h:1061
static int convert(PyObject *p, IMATH_NAMESPACE::Vec4< T > *v)
Definition: PyImathVec.h:386
FixedArray< IMATH_NAMESPACE::V2f > V2fArray
Definition: PyImathVec.h:25
FixedArray< IMATH_NAMESPACE::V2s > V2sArray
Definition: PyImathVec.h:22
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLdouble t
Definition: glad.h:2397
GLfloat v0
Definition: glcorearb.h:816
Vec2< float > V2f
Vec2 of float.
Definition: ImathVec.h:1046
V2< double > V2d
Definition: PyImathVec.h:455
FixedArray< IMATH_NAMESPACE::Vec3< unsigned char > > V3cArray
Definition: PyImathVec.h:67
Vec3< float > V3f
Vec3 of float.
Definition: ImathVec.h:1064
FixedArray< IMATH_NAMESPACE::V2d > V2dArray
Definition: PyImathVec.h:26
#define PY_IMATH_LEAVE_PYTHON
FixedArray< IMATH_NAMESPACE::V4i > V4iArray
Definition: PyImathVec.h:124
Vec2< int64_t > V2i64
Vec2 of int64_t.
Definition: ImathVec.h:1043
FixedArray< IMATH_NAMESPACE::V3i64 > V3i64Array
Definition: PyImathVec.h:70
FixedArray< IMATH_NAMESPACE::V4d > V4dArray
Definition: PyImathVec.h:127
static int convert(PyObject *p, IMATH_NAMESPACE::Vec3< T > *v)
Definition: PyImathVec.h:312
GLfloat GLfloat v1
Definition: glcorearb.h:817
FixedArray< IMATH_NAMESPACE::V2i64 > V2i64Array
Definition: PyImathVec.h:24
V3< float > V3f
Definition: PyImathVec.h:457
V2< float > V2f
Definition: PyImathVec.h:454
static int convert(PyObject *p, IMATH_NAMESPACE::Vec2< T > *v)
Definition: PyImathVec.h:236
FixedArray< IMATH_NAMESPACE::V4f > V4fArray
Definition: PyImathVec.h:126
Vec4< double > V4d
Vec4 of double.
Definition: ImathVec.h:1085
V3< double > V3d
Definition: PyImathVec.h:458