Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
type_traits.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2018 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_TYPE_TRAITS_H
8 #define MI_NEURAYLIB_TYPE_TRAITS_H
9 
11 #include <mi/base/uuid.h>
12 #include <mi/math/bbox.h>
13 #include <mi/math/color.h>
14 #include <mi/math/matrix.h>
15 #include <mi/math/spectrum.h>
16 #include <mi/math/vector.h>
17 
18 namespace mi {
19 
24 class IData;
25 class IBoolean;
26 class ISint8;
27 class ISint16;
28 class ISint32;
29 class ISint64;
30 class IUint8;
31 class IUint16;
32 class IUint32;
33 class IUint64;
34 class IFloat32;
35 class IFloat64;
36 class ISize;
37 class IDifference;
38 class IString;
39 class IUuid;
40 class IVoid;
41 class IRef;
42 class IBoolean_2;
43 class IBoolean_3;
44 class IBoolean_4;
45 class ISint32_2;
46 class ISint32_3;
47 class ISint32_4;
48 class IUint32_2;
49 class IUint32_3;
50 class IUint32_4;
51 class IFloat32_2;
52 class IFloat32_3;
53 class IFloat32_4;
54 class IFloat64_2;
55 class IFloat64_3;
56 class IFloat64_4;
57 class IBoolean_2_2;
58 class IBoolean_2_3;
59 class IBoolean_2_4;
60 class IBoolean_3_2;
61 class IBoolean_3_3;
62 class IBoolean_3_4;
63 class IBoolean_4_2;
64 class IBoolean_4_3;
65 class IBoolean_4_4;
66 class ISint32_2_2;
67 class ISint32_2_3;
68 class ISint32_2_4;
69 class ISint32_3_2;
70 class ISint32_3_3;
71 class ISint32_3_4;
72 class ISint32_4_2;
73 class ISint32_4_3;
74 class ISint32_4_4;
75 class IUint32_2_2;
76 class IUint32_2_3;
77 class IUint32_2_4;
78 class IUint32_3_2;
79 class IUint32_3_3;
80 class IUint32_3_4;
81 class IUint32_4_2;
82 class IUint32_4_3;
83 class IUint32_4_4;
84 class IFloat32_2_2;
85 class IFloat32_2_3;
86 class IFloat32_2_4;
87 class IFloat32_3_2;
88 class IFloat32_3_3;
89 class IFloat32_3_4;
90 class IFloat32_4_2;
91 class IFloat32_4_3;
92 class IFloat32_4_4;
93 class IFloat64_2_2;
94 class IFloat64_2_3;
95 class IFloat64_2_4;
96 class IFloat64_3_2;
97 class IFloat64_3_3;
98 class IFloat64_3_4;
99 class IFloat64_4_2;
100 class IFloat64_4_3;
101 class IFloat64_4_4;
102 class IColor;
103 class IColor3;
104 class ISpectrum;
105 class IBbox3;
106 
160 template<typename I> struct Type_traits {};
161 
162 template<> struct Type_traits<mi::IBoolean>
163 {
164  static const char* get_type_name() { return "Boolean"; }
165  typedef bool Primitive_type;
166 };
167 
168 template<> struct Type_traits<mi::ISint8>
169 {
170  static const char* get_type_name() { return "Sint8"; }
171  typedef mi::Sint8 Primitive_type;
172 };
173 
174 template<> struct Type_traits<mi::ISint16>
175 {
176  static const char* get_type_name() { return "Sint16"; }
177  typedef mi::Sint16 Primitive_type;
178 };
179 
180 template<> struct Type_traits<mi::ISint32>
181 {
182  static const char* get_type_name() { return "Sint32"; }
183  typedef mi::Sint32 Primitive_type;
184 };
185 
186 template<> struct Type_traits<mi::ISint64>
187 {
188  static const char* get_type_name() { return "Sint64"; }
189  typedef mi::Sint64 Primitive_type;
190 };
191 
192 template<> struct Type_traits<mi::IUint8>
193 {
194  static const char* get_type_name() { return "Uint8"; }
195  typedef mi::Uint8 Primitive_type;
196 };
197 
198 template<> struct Type_traits<mi::IUint16>
199 {
200  static const char* get_type_name() { return "Uint16"; }
201  typedef mi::Uint16 Primitive_type;
202 };
203 
204 template<> struct Type_traits<mi::IUint32>
205 {
206  static const char* get_type_name() { return "Uint32"; }
207  typedef mi::Uint32 Primitive_type;
208 };
209 
210 template<> struct Type_traits<mi::IUint64>
211 {
212  static const char* get_type_name() { return "Uint64"; }
213  typedef mi::Uint64 Primitive_type;
214 };
215 
216 template<> struct Type_traits<mi::IFloat32>
217 {
218  static const char* get_type_name() { return "Float32"; }
219  typedef mi::Float32 Primitive_type;
220 };
221 
222 template<> struct Type_traits<mi::IFloat64>
223 {
224  static const char* get_type_name() { return "Float64"; }
225  typedef mi::Float64 Primitive_type;
226 };
227 
228 template<> struct Type_traits<mi::ISize>
229 {
230  static const char* get_type_name() { return "Size"; }
231  typedef mi::Size Primitive_type;
232 };
233 
234 template<> struct Type_traits<mi::IDifference>
235 {
236  static const char* get_type_name() { return "Difference"; }
237  typedef mi::Difference Primitive_type;
238 };
239 
240 template<> struct Type_traits<mi::IString>
241 {
242  static const char* get_type_name() { return "String"; }
243  typedef const char* Primitive_type;
244 };
245 
246 template<> struct Type_traits<mi::IUuid>
247 {
248  static const char* get_type_name() { return "Uuid"; }
249  typedef mi::base::Uuid Primitive_type;
250 };
251 
252 template<> struct Type_traits<mi::IVoid>
253 {
254  static const char* get_type_name() { return "Void"; }
255  typedef void Primitive_type;
256 };
257 
258 template<> struct Type_traits<mi::IRef>
259 {
260  static const char* get_type_name() { return "Ref"; }
261  typedef const char* Primitive_type;
262 };
263 
264 template<> struct Type_traits<mi::IBoolean_2>
265 {
266  static const char* get_type_name() { return "Boolean<2>"; }
267  typedef mi::math::Vector<bool,2> Primitive_type;
268 };
269 
270 template<> struct Type_traits<mi::IBoolean_3>
271 {
272  static const char* get_type_name() { return "Boolean<3>"; }
273  typedef mi::math::Vector<bool,3> Primitive_type;
274 };
275 
276 template<> struct Type_traits<mi::IBoolean_4>
277 {
278  static const char* get_type_name() { return "Boolean<4>"; }
279  typedef mi::math::Vector<bool,4> Primitive_type;
280 };
281 
282 template<> struct Type_traits<mi::ISint32_2>
283 {
284  static const char* get_type_name() { return "Sint32<2>"; }
285  typedef mi::math::Vector<mi::Sint32,2> Primitive_type;
286 };
287 
288 template<> struct Type_traits<mi::ISint32_3>
289 {
290  static const char* get_type_name() { return "Sint32<3>"; }
291  typedef mi::math::Vector<mi::Sint32,3> Primitive_type;
292 };
293 
294 template<> struct Type_traits<mi::ISint32_4>
295 {
296  static const char* get_type_name() { return "Sint32<4>"; }
297  typedef mi::math::Vector<mi::Sint32,4> Primitive_type;
298 };
299 
300 template<> struct Type_traits<mi::IUint32_2>
301 {
302  static const char* get_type_name() { return "Uint32<2>"; }
303  typedef mi::math::Vector<mi::Uint32,2> Primitive_type;
304 };
305 
306 template<> struct Type_traits<mi::IUint32_3>
307 {
308  static const char* get_type_name() { return "Uint32<3>"; }
309  typedef mi::math::Vector<mi::Uint32,3> Primitive_type;
310 };
311 
312 template<> struct Type_traits<mi::IUint32_4>
313 {
314  static const char* get_type_name() { return "Uint32<4>"; }
315  typedef mi::math::Vector<mi::Uint32,4> Primitive_type;
316 };
317 
318 template<> struct Type_traits<mi::IFloat32_2>
319 {
320  static const char* get_type_name() { return "Float32<2>"; }
321  typedef mi::math::Vector<mi::Float32,2> Primitive_type;
322 };
323 
324 template<> struct Type_traits<mi::IFloat32_3>
325 {
326  static const char* get_type_name() { return "Float32<3>"; }
327  typedef mi::math::Vector<mi::Float32,3> Primitive_type;
328 };
329 
330 template<> struct Type_traits<mi::IFloat32_4>
331 {
332  static const char* get_type_name() { return "Float32<4>"; }
333  typedef mi::math::Vector<mi::Float32,4> Primitive_type;
334 };
335 
336 template<> struct Type_traits<mi::IFloat64_2>
337 {
338  static const char* get_type_name() { return "Float64<2>"; }
339  typedef mi::math::Vector<mi::Float64,2> Primitive_type;
340 };
341 
342 template<> struct Type_traits<mi::IFloat64_3>
343 {
344  static const char* get_type_name() { return "Float64<3>"; }
345  typedef mi::math::Vector<mi::Float64,3> Primitive_type;
346 };
347 
348 template<> struct Type_traits<mi::IFloat64_4>
349 {
350  static const char* get_type_name() { return "Float64<4>"; }
351  typedef mi::math::Vector<mi::Float64,4> Primitive_type;
352 };
353 
354 template<> struct Type_traits<mi::IBoolean_2_2>
355 {
356  static const char* get_type_name() { return "Boolean<2,2>"; }
357  typedef mi::math::Matrix<bool,2,2> Primitive_type;
358 };
359 
360 template<> struct Type_traits<mi::IBoolean_2_3>
361 {
362  static const char* get_type_name() { return "Boolean<2,3>"; }
363  typedef mi::math::Matrix<bool,2,3> Primitive_type;
364 };
365 
366 template<> struct Type_traits<mi::IBoolean_2_4>
367 {
368  static const char* get_type_name() { return "Boolean<2,4>"; }
369  typedef mi::math::Matrix<bool,2,4> Primitive_type;
370 };
371 
372 template<> struct Type_traits<mi::IBoolean_3_2>
373 {
374  static const char* get_type_name() { return "Boolean<3,2>"; }
375  typedef mi::math::Matrix<bool,3,2> Primitive_type;
376 };
377 
378 template<> struct Type_traits<mi::IBoolean_3_3>
379 {
380  static const char* get_type_name() { return "Boolean<3,3>"; }
381  typedef mi::math::Matrix<bool,3,3> Primitive_type;
382 };
383 
384 template<> struct Type_traits<mi::IBoolean_3_4>
385 {
386  static const char* get_type_name() { return "Boolean<3,4>"; }
387  typedef mi::math::Matrix<bool,3,4> Primitive_type;
388 };
389 
390 template<> struct Type_traits<mi::IBoolean_4_2>
391 {
392  static const char* get_type_name() { return "Boolean<4,2>"; }
393  typedef mi::math::Matrix<bool,4,2> Primitive_type;
394 };
395 
396 template<> struct Type_traits<mi::IBoolean_4_3>
397 {
398  static const char* get_type_name() { return "Boolean<4,3>"; }
399  typedef mi::math::Matrix<bool,4,3> Primitive_type;
400 };
401 
402 template<> struct Type_traits<mi::IBoolean_4_4>
403 {
404  static const char* get_type_name() { return "Boolean<4,4>"; }
405  typedef mi::math::Matrix<bool,4,4> Primitive_type;
406 };
407 
408 template<> struct Type_traits<mi::ISint32_2_2>
409 {
410  static const char* get_type_name() { return "Sint32<2,2>"; }
411  typedef mi::math::Matrix<mi::Sint32,2,2> Primitive_type;
412 };
413 
414 template<> struct Type_traits<mi::ISint32_2_3>
415 {
416  static const char* get_type_name() { return "Sint32<2,3>"; }
417  typedef mi::math::Matrix<mi::Sint32,2,3> Primitive_type;
418 };
419 
420 template<> struct Type_traits<mi::ISint32_2_4>
421 {
422  static const char* get_type_name() { return "Sint32<2,4>"; }
423  typedef mi::math::Matrix<mi::Sint32,2,4> Primitive_type;
424 };
425 
426 template<> struct Type_traits<mi::ISint32_3_2>
427 {
428  static const char* get_type_name() { return "Sint32<3,2>"; }
429  typedef mi::math::Matrix<mi::Sint32,3,2> Primitive_type;
430 };
431 
432 template<> struct Type_traits<mi::ISint32_3_3>
433 {
434  static const char* get_type_name() { return "Sint32<3,3>"; }
435  typedef mi::math::Matrix<mi::Sint32,3,3> Primitive_type;
436 };
437 
438 template<> struct Type_traits<mi::ISint32_3_4>
439 {
440  static const char* get_type_name() { return "Sint32<3,4>"; }
441  typedef mi::math::Matrix<mi::Sint32,3,4> Primitive_type;
442 };
443 
444 template<> struct Type_traits<mi::ISint32_4_2>
445 {
446  static const char* get_type_name() { return "Sint32<4,2>"; }
447  typedef mi::math::Matrix<mi::Sint32,4,2> Primitive_type;
448 };
449 
450 template<> struct Type_traits<mi::ISint32_4_3>
451 {
452  static const char* get_type_name() { return "Sint32<4,3>"; }
453  typedef mi::math::Matrix<mi::Sint32,4,3> Primitive_type;
454 };
455 
456 template<> struct Type_traits<mi::ISint32_4_4>
457 {
458  static const char* get_type_name() { return "Sint32<4,4>"; }
459  typedef mi::math::Matrix<mi::Sint32,4,4> Primitive_type;
460 };
461 
462 template<> struct Type_traits<mi::IUint32_2_2>
463 {
464  static const char* get_type_name() { return "Uint32<2,2>"; }
465  typedef mi::math::Matrix<mi::Uint32,2,2> Primitive_type;
466 };
467 
468 template<> struct Type_traits<mi::IUint32_2_3>
469 {
470  static const char* get_type_name() { return "Uint32<2,3>"; }
471  typedef mi::math::Matrix<mi::Uint32,2,3> Primitive_type;
472 };
473 
474 template<> struct Type_traits<mi::IUint32_2_4>
475 {
476  static const char* get_type_name() { return "Uint32<2,4>"; }
477  typedef mi::math::Matrix<mi::Uint32,2,4> Primitive_type;
478 };
479 
480 template<> struct Type_traits<mi::IUint32_3_2>
481 {
482  static const char* get_type_name() { return "Uint32<3,2>"; }
483  typedef mi::math::Matrix<mi::Uint32,3,2> Primitive_type;
484 };
485 
486 template<> struct Type_traits<mi::IUint32_3_3>
487 {
488  static const char* get_type_name() { return "Uint32<3,3>"; }
489  typedef mi::math::Matrix<mi::Uint32,3,3> Primitive_type;
490 };
491 
492 template<> struct Type_traits<mi::IUint32_3_4>
493 {
494  static const char* get_type_name() { return "Uint32<3,4>"; }
495  typedef mi::math::Matrix<mi::Uint32,3,4> Primitive_type;
496 };
497 
498 template<> struct Type_traits<mi::IUint32_4_2>
499 {
500  static const char* get_type_name() { return "Uint32<4,2>"; }
501  typedef mi::math::Matrix<mi::Uint32,4,2> Primitive_type;
502 };
503 
504 template<> struct Type_traits<mi::IUint32_4_3>
505 {
506  static const char* get_type_name() { return "Uint32<4,3>"; }
507  typedef mi::math::Matrix<mi::Uint32,4,3> Primitive_type;
508 };
509 
510 template<> struct Type_traits<mi::IUint32_4_4>
511 {
512  static const char* get_type_name() { return "Uint32<4,4>"; }
513  typedef mi::math::Matrix<mi::Uint32,4,4> Primitive_type;
514 };
515 
516 template<> struct Type_traits<mi::IFloat32_2_2>
517 {
518  static const char* get_type_name() { return "Float32<2,2>"; }
519  typedef mi::math::Matrix<mi::Float32,2,2> Primitive_type;
520 };
521 
522 template<> struct Type_traits<mi::IFloat32_2_3>
523 {
524  static const char* get_type_name() { return "Float32<2,3>"; }
525  typedef mi::math::Matrix<mi::Float32,2,3> Primitive_type;
526 };
527 
528 template<> struct Type_traits<mi::IFloat32_2_4>
529 {
530  static const char* get_type_name() { return "Float32<2,4>"; }
531  typedef mi::math::Matrix<mi::Float32,2,4> Primitive_type;
532 };
533 
534 template<> struct Type_traits<mi::IFloat32_3_2>
535 {
536  static const char* get_type_name() { return "Float32<3,2>"; }
537  typedef mi::math::Matrix<mi::Float32,3,2> Primitive_type;
538 };
539 
540 template<> struct Type_traits<mi::IFloat32_3_3>
541 {
542  static const char* get_type_name() { return "Float32<3,3>"; }
543  typedef mi::math::Matrix<mi::Float32,3,3> Primitive_type;
544 };
545 
546 template<> struct Type_traits<mi::IFloat32_3_4>
547 {
548  static const char* get_type_name() { return "Float32<3,4>"; }
549  typedef mi::math::Matrix<mi::Float32,3,4> Primitive_type;
550 };
551 
552 template<> struct Type_traits<mi::IFloat32_4_2>
553 {
554  static const char* get_type_name() { return "Float32<4,2>"; }
555  typedef mi::math::Matrix<mi::Float32,4,2> Primitive_type;
556 };
557 
558 template<> struct Type_traits<mi::IFloat32_4_3>
559 {
560  static const char* get_type_name() { return "Float32<4,3>"; }
561  typedef mi::math::Matrix<mi::Float32,4,3> Primitive_type;
562 };
563 
564 template<> struct Type_traits<mi::IFloat32_4_4>
565 {
566  static const char* get_type_name() { return "Float32<4,4>"; }
567  typedef mi::math::Matrix<mi::Float32,4,4> Primitive_type;
568 };
569 
570 template<> struct Type_traits<mi::IFloat64_2_2>
571 {
572  static const char* get_type_name() { return "Float64<2,2>"; }
573  typedef mi::math::Matrix<mi::Float64,2,2> Primitive_type;
574 };
575 
576 template<> struct Type_traits<mi::IFloat64_2_3>
577 {
578  static const char* get_type_name() { return "Float64<2,3>"; }
579  typedef mi::math::Matrix<mi::Float64,2,3> Primitive_type;
580 };
581 
582 template<> struct Type_traits<mi::IFloat64_2_4>
583 {
584  static const char* get_type_name() { return "Float64<2,4>"; }
585  typedef mi::math::Matrix<mi::Float64,2,4> Primitive_type;
586 };
587 
588 template<> struct Type_traits<mi::IFloat64_3_2>
589 {
590  static const char* get_type_name() { return "Float64<3,2>"; }
591  typedef mi::math::Matrix<mi::Float64,3,2> Primitive_type;
592 };
593 
594 template<> struct Type_traits<mi::IFloat64_3_3>
595 {
596  static const char* get_type_name() { return "Float64<3,3>"; }
597  typedef mi::math::Matrix<mi::Float64,3,3> Primitive_type;
598 };
599 
600 template<> struct Type_traits<mi::IFloat64_3_4>
601 {
602  static const char* get_type_name() { return "Float64<3,4>"; }
603  typedef mi::math::Matrix<mi::Float64,3,4> Primitive_type;
604 };
605 
606 template<> struct Type_traits<mi::IFloat64_4_2>
607 {
608  static const char* get_type_name() { return "Float64<4,2>"; }
609  typedef mi::math::Matrix<mi::Float64,4,2> Primitive_type;
610 };
611 
612 template<> struct Type_traits<mi::IFloat64_4_3>
613 {
614  static const char* get_type_name() { return "Float64<4,3>"; }
615  typedef mi::math::Matrix<mi::Float64,4,3> Primitive_type;
616 };
617 
618 template<> struct Type_traits<mi::IFloat64_4_4>
619 {
620  static const char* get_type_name() { return "Float64<4,4>"; }
621  typedef mi::math::Matrix<mi::Float64,4,4> Primitive_type;
622 };
623 
624 template<> struct Type_traits<mi::IColor>
625 {
626  static const char* get_type_name() { return "Color"; }
627  typedef mi::math::Color Primitive_type;
628 };
629 
630 template<> struct Type_traits<mi::IColor3>
631 {
632  static const char* get_type_name() { return "Color3"; }
633  typedef mi::math::Color Primitive_type;
634 };
635 
636 template<> struct Type_traits<mi::ISpectrum>
637 {
638  static const char* get_type_name() { return "Spectrum"; }
639  typedef mi::math::Spectrum Primitive_type;
640 };
641 
642 template<> struct Type_traits<mi::IBbox3>
643 {
644  static const char* get_type_name() { return "Bbox3"; }
645  typedef mi::math::Bbox<mi::Float32,3> Primitive_type;
646 };
647 
648 
649 template<> struct Type_traits<bool>
650 {
651  static const char* get_type_name() { return "Boolean"; };
652  typedef mi::IBoolean Interface_type;
653 };
654 
655 template<> struct Type_traits<mi::Sint8>
656 {
657  static const char* get_type_name() { return "Sint8"; };
658  typedef mi::ISint8 Interface_type;
659 };
660 
661 template<> struct Type_traits<mi::Sint16>
662 {
663  static const char* get_type_name() { return "Sint16"; };
664  typedef mi::ISint16 Interface_type;
665 };
666 
667 template<> struct Type_traits<mi::Sint32>
668 {
669  static const char* get_type_name() { return "Sint32"; };
670  typedef mi::ISint32 Interface_type;
671 };
672 
673 template<> struct Type_traits<mi::Sint64>
674 {
675  static const char* get_type_name() { return "Sint64"; };
676  typedef mi::ISint64 Interface_type;
677 };
678 
679 template<> struct Type_traits<mi::Uint8>
680 {
681  static const char* get_type_name() { return "Uint8"; };
682  typedef mi::IUint8 Interface_type;
683 };
684 
685 template<> struct Type_traits<mi::Uint16>
686 {
687  static const char* get_type_name() { return "Uint16"; };
688  typedef mi::IUint16 Interface_type;
689 };
690 
691 template<> struct Type_traits<mi::Uint32>
692 {
693  static const char* get_type_name() { return "Uint32"; };
694  typedef mi::IUint32 Interface_type;
695 };
696 
697 template<> struct Type_traits<mi::Uint64>
698 {
699  static const char* get_type_name() { return "Uint64"; };
700  typedef mi::IUint64 Interface_type;
701 };
702 
703 template<> struct Type_traits<mi::Float32>
704 {
705  static const char* get_type_name() { return "Float32"; };
706  typedef mi::IFloat32 Interface_type;
707 };
708 
709 template<> struct Type_traits<mi::Float64>
710 {
711  static const char* get_type_name() { return "Float64"; };
712  typedef mi::IFloat64 Interface_type;
713 };
714 
715 template<> struct Type_traits<const char*>
716 {
717  static const char* get_type_name() { return "String"; };
718  typedef mi::IString Interface_type;
719 };
720 
721 template<> struct Type_traits<mi::base::Uuid>
722 {
723  static const char* get_type_name() { return "Uuid"; };
724  typedef mi::IUuid Interface_type;
725 };
726 
727 template<> struct Type_traits<void>
728 {
729  static const char* get_type_name() { return "Void"; };
730  typedef mi::IVoid Interface_type;
731 };
732 
733 template<> struct Type_traits<mi::math::Vector<bool,2> >
734 {
735  static const char* get_type_name() { return "Boolean<2>"; };
736  typedef mi::IBoolean_2 Interface_type;
737 };
738 
739 template<> struct Type_traits<mi::math::Vector<bool,3> >
740 {
741  static const char* get_type_name() { return "Boolean<3>"; };
742  typedef mi::IBoolean_3 Interface_type;
743 };
744 
745 template<> struct Type_traits<mi::math::Vector<bool,4> >
746 {
747  static const char* get_type_name() { return "Boolean<4>"; };
748  typedef mi::IBoolean_4 Interface_type;
749 };
750 
751 template<> struct Type_traits<mi::math::Vector<mi::Sint32,2> >
752 {
753  static const char* get_type_name() { return "Sint32<2>"; };
754  typedef mi::ISint32_2 Interface_type;
755 };
756 
757 template<> struct Type_traits<mi::math::Vector<mi::Sint32,3> >
758 {
759  static const char* get_type_name() { return "Sint32<3>"; };
760  typedef mi::ISint32_3 Interface_type;
761 };
762 
763 template<> struct Type_traits<mi::math::Vector<mi::Sint32,4> >
764 {
765  static const char* get_type_name() { return "Sint32<4>"; };
766  typedef mi::ISint32_4 Interface_type;
767 };
768 
769 template<> struct Type_traits<mi::math::Vector<mi::Uint32,2> >
770 {
771  static const char* get_type_name() { return "Uint32<2>"; };
772  typedef mi::IUint32_2 Interface_type;
773 };
774 
775 template<> struct Type_traits<mi::math::Vector<mi::Uint32,3> >
776 {
777  static const char* get_type_name() { return "Uint32<3>"; };
778  typedef mi::IUint32_3 Interface_type;
779 };
780 
781 template<> struct Type_traits<mi::math::Vector<mi::Uint32,4> >
782 {
783  static const char* get_type_name() { return "Uint32<4>"; };
784  typedef mi::IUint32_4 Interface_type;
785 };
786 
787 template<> struct Type_traits<mi::math::Vector<mi::Float32,2> >
788 {
789  static const char* get_type_name() { return "Float32<2>"; };
790  typedef mi::IFloat32_2 Interface_type;
791 };
792 
793 template<> struct Type_traits<mi::math::Vector<mi::Float32,3> >
794 {
795  static const char* get_type_name() { return "Float32<3>"; };
796  typedef mi::IFloat32_3 Interface_type;
797 };
798 
799 template<> struct Type_traits<mi::math::Vector<mi::Float32,4> >
800 {
801  static const char* get_type_name() { return "Float32<4>"; };
802  typedef mi::IFloat32_4 Interface_type;
803 };
804 
805 template<> struct Type_traits<mi::math::Vector<mi::Float64,2> >
806 {
807  static const char* get_type_name() { return "Float64<2>"; };
808  typedef mi::IFloat64_2 Interface_type;
809 };
810 
811 template<> struct Type_traits<mi::math::Vector<mi::Float64,3> >
812 {
813  static const char* get_type_name() { return "Float64<3>"; };
814  typedef mi::IFloat64_3 Interface_type;
815 };
816 
817 template<> struct Type_traits<mi::math::Vector<mi::Float64,4> >
818 {
819  static const char* get_type_name() { return "Float64<4>"; };
820  typedef mi::IFloat64_4 Interface_type;
821 };
822 
823 template<> struct Type_traits<mi::math::Matrix<bool,2,2> >
824 {
825  static const char* get_type_name() { return "Boolean<2,2>"; };
826  typedef mi::IBoolean_2_2 Interface_type;
827 };
828 
829 template<> struct Type_traits<mi::math::Matrix<bool,2,3> >
830 {
831  static const char* get_type_name() { return "Boolean<2,3>"; };
832  typedef mi::IBoolean_2_3 Interface_type;
833 };
834 
835 template<> struct Type_traits<mi::math::Matrix<bool,2,4> >
836 {
837  static const char* get_type_name() { return "Boolean<2,4>"; };
838  typedef mi::IBoolean_2_4 Interface_type;
839 };
840 
841 template<> struct Type_traits<mi::math::Matrix<bool,3,2> >
842 {
843  static const char* get_type_name() { return "Boolean<3,2>"; };
844  typedef mi::IBoolean_3_2 Interface_type;
845 };
846 
847 template<> struct Type_traits<mi::math::Matrix<bool,3,3> >
848 {
849  static const char* get_type_name() { return "Boolean<3,3>"; };
850  typedef mi::IBoolean_3_3 Interface_type;
851 };
852 
853 template<> struct Type_traits<mi::math::Matrix<bool,3,4> >
854 {
855  static const char* get_type_name() { return "Boolean<3,4>"; };
856  typedef mi::IBoolean_3_4 Interface_type;
857 };
858 
859 template<> struct Type_traits<mi::math::Matrix<bool,4,2> >
860 {
861  static const char* get_type_name() { return "Boolean<4,2>"; };
862  typedef mi::IBoolean_4_2 Interface_type;
863 };
864 
865 template<> struct Type_traits<mi::math::Matrix<bool,4,3> >
866 {
867  static const char* get_type_name() { return "Boolean<4,3>"; };
868  typedef mi::IBoolean_4_3 Interface_type;
869 };
870 
871 template<> struct Type_traits<mi::math::Matrix<bool,4,4> >
872 {
873  static const char* get_type_name() { return "Boolean<4,4>"; };
874  typedef mi::IBoolean_4_4 Interface_type;
875 };
876 
877 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,2,2> >
878 {
879  static const char* get_type_name() { return "Sint32<2,2>"; };
880  typedef mi::ISint32_2_2 Interface_type;
881 };
882 
883 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,2,3> >
884 {
885  static const char* get_type_name() { return "Sint32<2,3>"; };
886  typedef mi::ISint32_2_3 Interface_type;
887 };
888 
889 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,2,4> >
890 {
891  static const char* get_type_name() { return "Sint32<2,4>"; };
892  typedef mi::ISint32_2_4 Interface_type;
893 };
894 
895 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,3,2> >
896 {
897  static const char* get_type_name() { return "Sint32<3,2>"; };
898  typedef mi::ISint32_3_2 Interface_type;
899 };
900 
901 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,3,3> >
902 {
903  static const char* get_type_name() { return "Sint32<3,3>"; };
904  typedef mi::ISint32_3_3 Interface_type;
905 };
906 
907 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,3,4> >
908 {
909  static const char* get_type_name() { return "Sint32<3,4>"; };
910  typedef mi::ISint32_3_4 Interface_type;
911 };
912 
913 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,4,2> >
914 {
915  static const char* get_type_name() { return "Sint32<4,2>"; };
916  typedef mi::ISint32_4_2 Interface_type;
917 };
918 
919 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,4,3> >
920 {
921  static const char* get_type_name() { return "Sint32<4,3>"; };
922  typedef mi::ISint32_4_3 Interface_type;
923 };
924 
925 template<> struct Type_traits<mi::math::Matrix<mi::Sint32,4,4> >
926 {
927  static const char* get_type_name() { return "Sint32<4,4>"; };
928  typedef mi::ISint32_4_4 Interface_type;
929 };
930 
931 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,2,2> >
932 {
933  static const char* get_type_name() { return "Uint32<2,2>"; };
934  typedef mi::IUint32_2_2 Interface_type;
935 };
936 
937 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,2,3> >
938 {
939  static const char* get_type_name() { return "Uint32<2,3>"; };
940  typedef mi::IUint32_2_3 Interface_type;
941 };
942 
943 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,2,4> >
944 {
945  static const char* get_type_name() { return "Uint32<2,4>"; };
946  typedef mi::IUint32_2_4 Interface_type;
947 };
948 
949 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,3,2> >
950 {
951  static const char* get_type_name() { return "Uint32<3,2>"; };
952  typedef mi::IUint32_3_2 Interface_type;
953 };
954 
955 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,3,3> >
956 {
957  static const char* get_type_name() { return "Uint32<3,3>"; };
958  typedef mi::IUint32_3_3 Interface_type;
959 };
960 
961 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,3,4> >
962 {
963  static const char* get_type_name() { return "Uint32<3,4>"; };
964  typedef mi::IUint32_3_4 Interface_type;
965 };
966 
967 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,4,2> >
968 {
969  static const char* get_type_name() { return "Uint32<4,2>"; };
970  typedef mi::IUint32_4_2 Interface_type;
971 };
972 
973 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,4,3> >
974 {
975  static const char* get_type_name() { return "Uint32<4,3>"; };
976  typedef mi::IUint32_4_3 Interface_type;
977 };
978 
979 template<> struct Type_traits<mi::math::Matrix<mi::Uint32,4,4> >
980 {
981  static const char* get_type_name() { return "Uint32<4,4>"; };
982  typedef mi::IUint32_4_4 Interface_type;
983 };
984 
985 template<> struct Type_traits<mi::math::Matrix<mi::Float32,2,2> >
986 {
987  static const char* get_type_name() { return "Float32<2,2>"; };
988  typedef mi::IFloat32_2_2 Interface_type;
989 };
990 
991 template<> struct Type_traits<mi::math::Matrix<mi::Float32,2,3> >
992 {
993  static const char* get_type_name() { return "Float32<2,3>"; };
994  typedef mi::IFloat32_2_3 Interface_type;
995 };
996 
997 template<> struct Type_traits<mi::math::Matrix<mi::Float32,2,4> >
998 {
999  static const char* get_type_name() { return "Float32<2,4>"; };
1000  typedef mi::IFloat32_2_4 Interface_type;
1001 };
1002 
1003 template<> struct Type_traits<mi::math::Matrix<mi::Float32,3,2> >
1004 {
1005  static const char* get_type_name() { return "Float32<3,2>"; };
1006  typedef mi::IFloat32_3_2 Interface_type;
1007 };
1008 
1009 template<> struct Type_traits<mi::math::Matrix<mi::Float32,3,3> >
1010 {
1011  static const char* get_type_name() { return "Float32<3,3>"; };
1012  typedef mi::IFloat32_3_3 Interface_type;
1013 };
1014 
1015 template<> struct Type_traits<mi::math::Matrix<mi::Float32,3,4> >
1016 {
1017  static const char* get_type_name() { return "Float32<3,4>"; };
1018  typedef mi::IFloat32_3_4 Interface_type;
1019 };
1020 
1021 template<> struct Type_traits<mi::math::Matrix<mi::Float32,4,2> >
1022 {
1023  static const char* get_type_name() { return "Float32<4,2>"; };
1024  typedef mi::IFloat32_4_2 Interface_type;
1025 };
1026 
1027 template<> struct Type_traits<mi::math::Matrix<mi::Float32,4,3> >
1028 {
1029  static const char* get_type_name() { return "Float32<4,3>"; };
1030  typedef mi::IFloat32_4_3 Interface_type;
1031 };
1032 
1033 template<> struct Type_traits<mi::math::Matrix<mi::Float32,4,4> >
1034 {
1035  static const char* get_type_name() { return "Float32<4,4>"; };
1036  typedef mi::IFloat32_4_4 Interface_type;
1037 };
1038 
1039 template<> struct Type_traits<mi::math::Matrix<mi::Float64,2,2> >
1040 {
1041  static const char* get_type_name() { return "Float64<2,2>"; };
1042  typedef mi::IFloat64_2_2 Interface_type;
1043 };
1044 
1045 template<> struct Type_traits<mi::math::Matrix<mi::Float64,2,3> >
1046 {
1047  static const char* get_type_name() { return "Float64<2,3>"; };
1048  typedef mi::IFloat64_2_3 Interface_type;
1049 };
1050 
1051 template<> struct Type_traits<mi::math::Matrix<mi::Float64,2,4> >
1052 {
1053  static const char* get_type_name() { return "Float64<2,4>"; };
1054  typedef mi::IFloat64_2_4 Interface_type;
1055 };
1056 
1057 template<> struct Type_traits<mi::math::Matrix<mi::Float64,3,2> >
1058 {
1059  static const char* get_type_name() { return "Float64<3,2>"; };
1060  typedef mi::IFloat64_3_2 Interface_type;
1061 };
1062 
1063 template<> struct Type_traits<mi::math::Matrix<mi::Float64,3,3> >
1064 {
1065  static const char* get_type_name() { return "Float64<3,3>"; };
1066  typedef mi::IFloat64_3_3 Interface_type;
1067 };
1068 
1069 template<> struct Type_traits<mi::math::Matrix<mi::Float64,3,4> >
1070 {
1071  static const char* get_type_name() { return "Float64<3,4>"; };
1072  typedef mi::IFloat64_3_4 Interface_type;
1073 };
1074 
1075 template<> struct Type_traits<mi::math::Matrix<mi::Float64,4,2> >
1076 {
1077  static const char* get_type_name() { return "Float64<4,2>"; };
1078  typedef mi::IFloat64_4_2 Interface_type;
1079 };
1080 
1081 template<> struct Type_traits<mi::math::Matrix<mi::Float64,4,3> >
1082 {
1083  static const char* get_type_name() { return "Float64<4,3>"; };
1084  typedef mi::IFloat64_4_3 Interface_type;
1085 };
1086 
1087 template<> struct Type_traits<mi::math::Matrix<mi::Float64,4,4> >
1088 {
1089  static const char* get_type_name() { return "Float64<4,4>"; };
1090  typedef mi::IFloat64_4_4 Interface_type;
1091 };
1092 
1093 template<> struct Type_traits<mi::math::Color>
1094 {
1095  static const char* get_type_name() { return "Color"; };
1096  typedef mi::IColor Interface_type;
1097 };
1098 
1099 template<> struct Type_traits<mi::math::Spectrum>
1100 {
1101  static const char* get_type_name() { return "Spectrum"; };
1102  typedef mi::ISpectrum Interface_type;
1103 };
1104 
1105 template<> struct Type_traits<mi::math::Bbox<mi::Float32,3> >
1106 {
1107  static const char* get_type_name() { return "Bbox3"; };
1108  typedef mi::IBbox3 Interface_type;
1109 };
1110 
1111 
1112 template<typename I, Size DIM> struct Vector_type_traits {};
1113 
1114 template<> struct Vector_type_traits<bool, 2>
1115 { typedef mi::IBoolean_2 Interface_type; };
1116 
1117 template<> struct Vector_type_traits<bool, 3>
1118 { typedef mi::IBoolean_3 Interface_type; };
1119 
1120 template<> struct Vector_type_traits<bool, 4>
1121 { typedef mi::IBoolean_4 Interface_type; };
1122 
1123 template<> struct Vector_type_traits<mi::Sint32, 2>
1124 { typedef mi::ISint32_2 Interface_type; };
1125 
1126 template<> struct Vector_type_traits<mi::Sint32, 3>
1127 { typedef mi::ISint32_3 Interface_type; };
1128 
1129 template<> struct Vector_type_traits<mi::Sint32, 4>
1130 { typedef mi::ISint32_4 Interface_type; };
1131 
1132 template<> struct Vector_type_traits<mi::Float32, 2>
1133 { typedef mi::IFloat32_2 Interface_type; };
1134 
1135 template<> struct Vector_type_traits<mi::Float32, 3>
1136 { typedef mi::IFloat32_3 Interface_type; };
1137 
1138 template<> struct Vector_type_traits<mi::Float32, 4>
1139 { typedef mi::IFloat32_4 Interface_type; };
1140 
1141 template<> struct Vector_type_traits<mi::Float64, 2>
1142 { typedef mi::IFloat64_2 Interface_type; };
1143 
1144 template<> struct Vector_type_traits<mi::Float64, 3>
1145 { typedef mi::IFloat64_3 Interface_type; };
1146 
1147 template<> struct Vector_type_traits<mi::Float64, 4>
1148 { typedef mi::IFloat64_4 Interface_type; };
1149 
1150 
1151 template<typename I, Size ROW, Size COL> struct Matrix_type_traits {};
1152 
1153 template<> struct Matrix_type_traits<bool, 2, 2>
1154 { typedef mi::IBoolean_2_2 Interface_type; };
1155 
1156 template<> struct Matrix_type_traits<bool, 2, 3>
1157 { typedef mi::IBoolean_2_3 Interface_type; };
1158 
1159 template<> struct Matrix_type_traits<bool, 2, 4>
1160 { typedef mi::IBoolean_2_4 Interface_type; };
1161 
1162 template<> struct Matrix_type_traits<bool, 3, 2>
1163 { typedef mi::IBoolean_3_2 Interface_type; };
1164 
1165 template<> struct Matrix_type_traits<bool, 3, 3>
1166 { typedef mi::IBoolean_3_3 Interface_type; };
1167 
1168 template<> struct Matrix_type_traits<bool, 3, 4>
1169 { typedef mi::IBoolean_3_4 Interface_type; };
1170 
1171 template<> struct Matrix_type_traits<bool, 4, 2>
1172 { typedef mi::IBoolean_4_2 Interface_type; };
1173 
1174 template<> struct Matrix_type_traits<bool, 4, 3>
1175 { typedef mi::IBoolean_4_3 Interface_type; };
1176 
1177 template<> struct Matrix_type_traits<bool, 4, 4>
1178 { typedef mi::IBoolean_4_4 Interface_type; };
1179 
1180 template<> struct Matrix_type_traits<mi::Sint32, 2, 2>
1181 { typedef mi::ISint32_2_2 Interface_type; };
1182 
1183 template<> struct Matrix_type_traits<mi::Sint32, 2, 3>
1184 { typedef mi::ISint32_2_3 Interface_type; };
1185 
1186 template<> struct Matrix_type_traits<mi::Sint32, 2, 4>
1187 { typedef mi::ISint32_2_4 Interface_type; };
1188 
1189 template<> struct Matrix_type_traits<mi::Sint32, 3, 2>
1190 { typedef mi::ISint32_3_2 Interface_type; };
1191 
1192 template<> struct Matrix_type_traits<mi::Sint32, 3, 3>
1193 { typedef mi::ISint32_3_3 Interface_type; };
1194 
1195 template<> struct Matrix_type_traits<mi::Sint32, 3, 4>
1196 { typedef mi::ISint32_3_4 Interface_type; };
1197 
1198 template<> struct Matrix_type_traits<mi::Sint32, 4, 2>
1199 { typedef mi::ISint32_4_2 Interface_type; };
1200 
1201 template<> struct Matrix_type_traits<mi::Sint32, 4, 3>
1202 { typedef mi::ISint32_4_3 Interface_type; };
1203 
1204 template<> struct Matrix_type_traits<mi::Sint32, 4, 4>
1205 { typedef mi::ISint32_4_4 Interface_type; };
1206 
1207 template<> struct Matrix_type_traits<mi::Float32, 2, 2>
1208 { typedef mi::IFloat32_2_2 Interface_type; };
1209 
1210 template<> struct Matrix_type_traits<mi::Float32, 2, 3>
1211 { typedef mi::IFloat32_2_3 Interface_type; };
1212 
1213 template<> struct Matrix_type_traits<mi::Float32, 2, 4>
1214 { typedef mi::IFloat32_2_4 Interface_type; };
1215 
1216 template<> struct Matrix_type_traits<mi::Float32, 3, 2>
1217 { typedef mi::IFloat32_3_2 Interface_type; };
1218 
1219 template<> struct Matrix_type_traits<mi::Float32, 3, 3>
1220 { typedef mi::IFloat32_3_3 Interface_type; };
1221 
1222 template<> struct Matrix_type_traits<mi::Float32, 3, 4>
1223 { typedef mi::IFloat32_3_4 Interface_type; };
1224 
1225 template<> struct Matrix_type_traits<mi::Float32, 4, 2>
1226 { typedef mi::IFloat32_4_2 Interface_type; };
1227 
1228 template<> struct Matrix_type_traits<mi::Float32, 4, 3>
1229 { typedef mi::IFloat32_4_3 Interface_type; };
1230 
1231 template<> struct Matrix_type_traits<mi::Float32, 4, 4>
1232 { typedef mi::IFloat32_4_4 Interface_type; };
1233 
1234 template<> struct Matrix_type_traits<mi::Float64, 2, 2>
1235 { typedef mi::IFloat64_2_2 Interface_type; };
1236 
1237 template<> struct Matrix_type_traits<mi::Float64, 2, 3>
1238 { typedef mi::IFloat64_2_3 Interface_type; };
1239 
1240 template<> struct Matrix_type_traits<mi::Float64, 2, 4>
1241 { typedef mi::IFloat64_2_4 Interface_type; };
1242 
1243 template<> struct Matrix_type_traits<mi::Float64, 3, 2>
1244 { typedef mi::IFloat64_3_2 Interface_type; };
1245 
1246 template<> struct Matrix_type_traits<mi::Float64, 3, 3>
1247 { typedef mi::IFloat64_3_3 Interface_type; };
1248 
1249 template<> struct Matrix_type_traits<mi::Float64, 3, 4>
1250 { typedef mi::IFloat64_3_4 Interface_type; };
1251 
1252 template<> struct Matrix_type_traits<mi::Float64, 4, 2>
1253 { typedef mi::IFloat64_4_2 Interface_type; };
1254 
1255 template<> struct Matrix_type_traits<mi::Float64, 4, 3>
1256 { typedef mi::IFloat64_4_3 Interface_type; };
1257 
1258 template<> struct Matrix_type_traits<mi::Float64, 4, 4>
1259 { typedef mi::IFloat64_4_4 Interface_type; };
1260  // end group mi_neuray_types
1262 
1263 } // namespace mi
1264 
1265 #endif // MI_NEURAYLIB_TYPE_TRAITS_H