Coin Logo http://www.coin3d.org/
http://www.kongsberg.com/kogt/

SbTypeInfo.h
1 #ifndef COIN_SBTYPEINFO_H
2 #define COIN_SBTYPEINFO_H
3 
4 /**************************************************************************\
5  * Copyright (c) Kongsberg Oil & Gas Technologies AS
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are
10  * met:
11  *
12  * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * Neither the name of the copyright holder nor the names of its
20  * contributors may be used to endorse or promote products derived from
21  * this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 \**************************************************************************/
35 
36 // SbTypeInfo<> is a Coin type information library.
37 
62 #include <Inventor/system/inttypes.h>
63 #include <Inventor/C/basic.h>
64 
65 // *************************************************************************
66 // Predeclarations
67 
68 // Sb-classes
69 class SbVec2b;
70 class SbVec2ub;
71 class SbVec2s;
72 class SbVec2us;
73 class SbVec2i32;
74 class SbVec2ui32;
75 class SbVec2f;
76 class SbVec2d;
77 class SbVec3b;
78 class SbVec3ub;
79 class SbVec3s;
80 class SbVec3us;
81 class SbVec3i32;
82 class SbVec3ui32;
83 class SbVec3f;
84 class SbVec3d;
85 class SbVec4b;
86 class SbVec4ub;
87 class SbVec4s;
88 class SbVec4us;
89 class SbVec4i32;
90 class SbVec4ui32;
91 class SbVec4f;
92 class SbVec4d;
93 
94 class SbBox2s;
95 class SbBox2i32;
96 class SbBox2f;
97 class SbBox2d;
98 class SbBox3s;
99 class SbBox3i32;
100 class SbBox3f;
101 class SbBox3d;
102 
103 class SbLine;
104 class SbDPLine;
105 class SbPlane;
106 class SbDPPlane;
107 class SbMatrix;
108 class SbDPMatrix;
109 class SbRotation;
110 class SbDPRotation;
111 
112 class SbTime;
113 class SbName;
114 class SbColor;
115 class SbColor4f;
116 class SbString;
117 
118 // Field classes
119 class SoSFBitMask;
120 class SoSFBool;
121 class SoSFBox2s;
122 class SoSFBox2i32;
123 class SoSFBox2f;
124 class SoSFBox2d;
125 class SoSFBox3s;
126 class SoSFBox3i32;
127 class SoSFBox3f;
128 class SoSFBox3d;
129 class SoSFColor;
130 class SoSFColorRGBA;
131 class SoSFEngine;
132 class SoSFEnum;
133 class SoSFImage3;
134 class SoSFImage;
135 class SoSFMatrix;
136 class SoSFName;
137 class SoSFNode;
138 class SoSFPath;
139 class SoSFPlane;
140 class SoSFRotation;
141 class SoSFString;
142 class SoSFTime;
143 class SoSFTrigger;
144 
145 class SoSFShort;
146 class SoSFUShort;
147 class SoSFInt32;
148 class SoSFUInt32;
149 class SoSFLong;
150 class SoSFULong;
151 class SoSFFloat;
152 class SoSFDouble;
153 
154 class SoSFVec2b;
155 class SoSFVec2s;
156 class SoSFVec2i32;
157 class SoSFVec2f;
158 class SoSFVec2d;
159 class SoSFVec3b;
160 class SoSFVec3s;
161 class SoSFVec3i32;
162 class SoSFVec3f;
163 class SoSFVec3d;
164 class SoSFVec4b;
165 class SoSFVec4ub;
166 class SoSFVec4s;
167 class SoSFVec4us;
168 class SoSFVec4i32;
169 class SoSFVec4ui32;
170 class SoSFVec4f;
171 class SoSFVec4d;
172 
173 class SoMFBitMask;
174 class SoMFBool;
175 class SoMFColor;
176 class SoMFColorRGBA;
177 class SoMFDouble;
178 class SoMFEngine;
179 class SoMFEnum;
180 class SoMFFloat;
181 class SoMFInt32;
182 class SoMFLong;
183 class SoMFMatrix;
184 class SoMFName;
185 class SoMFNode;
186 class SoMFPath;
187 class SoMFPlane;
188 class SoMFRotation;
189 class SoMFShort;
190 class SoMFString;
191 class SoMFTime;
192 class SoMFUInt32;
193 class SoMFULong;
194 class SoMFUShort;
195 class SoMFVec2b;
196 class SoMFVec2s;
197 class SoMFVec2i32;
198 class SoMFVec2f;
199 class SoMFVec2d;
200 class SoMFVec3b;
201 class SoMFVec3s;
202 class SoMFVec3i32;
203 class SoMFVec3f;
204 class SoMFVec3d;
205 class SoMFVec4b;
206 class SoMFVec4ub;
207 class SoMFVec4s;
208 class SoMFVec4us;
209 class SoMFVec4i32;
210 class SoMFVec4ui32;
211 class SoMFVec4f;
212 class SoMFVec4d;
213 
214 class SoEngine;
215 class SoNode;
216 class SoPath;
217 
218 // *************************************************************************
219 
220 // namespace SIM { namespace Coin3D { namespace Coin {
221 
222 template <typename T>
223 struct SbTypeInfo {
224  typedef T Type;
225  typedef const T & ParamType;
226 }; // fallback
227 
228 template <>
229 struct SbTypeInfo<float> {
230  typedef float Type;
231  typedef float PrimitiveType;
232  enum { isPrimitive = 1 };
233 
234  typedef Type ParamType;
235 
236  enum { Dimensions = 1 };
237 
238  typedef SbVec2f Vec2Type;
239  typedef SbVec3f Vec3Type;
240  typedef SbVec4f Vec4Type;
241  typedef SbBox2f Box2Type;
242  typedef SbBox3f Box3Type;
243 
244  typedef SoSFFloat SFieldType;
245  typedef SoMFFloat MFieldType;
246 
247  typedef SbPlane PlaneType;
248  typedef SbLine LineType;
249  typedef SbMatrix MatrixType;
250  typedef SbRotation RotationType;
251 };
252 
253 template<typename PrimitiveType, unsigned int dim>
254 struct Vec
255 {
256 };
257 template<typename PrimitiveType>
258 struct Vec<PrimitiveType,2>
259 {
260  typedef typename SbTypeInfo<PrimitiveType>::Vec2Type Type;
261 };
262 template<typename PrimitiveType>
263 struct Vec<PrimitiveType,3>
264 {
265  typedef typename SbTypeInfo<PrimitiveType>::Vec3Type Type;
266 };
267 
268 template<typename PrimitiveType>
269 struct Vec<PrimitiveType,4>
270 {
271  typedef typename SbTypeInfo<PrimitiveType>::Vec4Type Type;
272 };
273 
274 
275 
276 //This should have been a template for SbBool, but since SbBool is an
277 //int, we would risk unwanted behaviour for ints.
278 template <>
279 struct SbTypeInfo<bool> {
280  typedef bool Type;
281  typedef bool PrimitiveType;
282  enum { isPrimitive = 1 };
283 
284  typedef Type ParamType;
285 
286  enum { Dimensions = 1 };
287 
288  typedef SoSFBool SFieldType;
289  typedef SoMFBool MFieldType;
290 };
291 
292 template <>
293 struct SbTypeInfo<double> {
294  typedef double Type;
295  typedef Type ParamType;
296 
297  enum { isPrimitive = 1 };
298 
299  enum { Dimensions = 1 };
300 
301  typedef SbVec2d Vec2Type;
302  typedef SbVec3d Vec3Type;
303  typedef SbVec4d Vec4Type;
304  typedef SbBox2d Box2Type;
305  typedef SbBox3d Box3Type;
306 
307  typedef SoSFDouble SFieldType;
308  typedef SoMFDouble MFieldType;
309 
310  typedef SbDPPlane PlaneType;
311  typedef SbDPLine LineType;
312  typedef SbDPMatrix MatrixType;
313  typedef SbDPRotation RotationType;
314 };
315 
316 template <>
317 struct SbTypeInfo<int8_t> {
318  typedef int8_t Type;
319  typedef Type ParamType;
320 
321  typedef SbVec2b Vec2Type;
322  typedef SbVec3b Vec3Type;
323  typedef SbVec4b Vec4Type;
324 };
325 
326 template <>
327 struct SbTypeInfo<uint8_t> {
328  typedef uint8_t Type;
329  typedef Type ParamType;
330 
331  typedef SbVec2ub Vec2Type;
332  typedef SbVec3ub Vec3Type;
333  typedef SbVec4ub Vec4Type;
334 };
335 
336 template <>
337 struct SbTypeInfo<short> {
338  typedef short Type;
339  typedef Type ParamType;
340 
341  enum { isPrimitive = 1 };
342 
343  typedef SbVec2s Vec2Type;
344  typedef SbVec3s Vec3Type;
345  typedef SbVec4s Vec4Type;
346  typedef SbBox2s Box2Type;
347  typedef SbBox3s Box3Type;
348 
349  typedef SoSFShort SFieldType;
350  typedef SoMFShort MFieldType;
351 };
352 
353 template <>
354 struct SbTypeInfo<unsigned short> {
355  typedef unsigned short Type;
356  typedef Type ParamType;
357 
358  typedef SbVec2us Vec2Type;
359  typedef SbVec3us Vec3Type;
360  typedef SbVec4us Vec4Type;
361 
362  typedef SoSFUShort SFieldType;
363  typedef SoMFUShort MFieldType;
364 };
365 
366 template <>
367 struct SbTypeInfo<int32_t> {
368  typedef int32_t Type;
369  typedef Type ParamType;
370 
371  typedef SbVec2i32 Vec2Type;
372  typedef SbVec3i32 Vec3Type;
373  typedef SbVec4i32 Vec4Type;
374  typedef SbBox2i32 Box2Type;
375  typedef SbBox3i32 Box3Type;
376 
377  typedef SoSFInt32 SFieldType;
378  typedef SoMFInt32 MFieldType;
379 };
380 
381 template <>
382 struct SbTypeInfo<uint32_t> {
383  typedef uint32_t Type;
384  typedef Type ParamType;
385 
386  typedef SbVec2ui32 Vec2Type;
387  typedef SbVec3ui32 Vec3Type;
388  typedef SbVec4ui32 Vec4Type;
389 
390  typedef SoSFUInt32 SFieldType;
391  typedef SoMFUInt32 MFieldType;
392 };
393 
394 
395 template <>
396 struct SbTypeInfo<SbVec2f> {
397  typedef SbVec2f Type;
398  typedef const Type & ParamType;
399 
400  typedef float PrimitiveType;
401  enum { isPrimitive = 0 };
402 
403  enum { Dimensions = 2 };
404 
405  typedef SbBox2f BoxType;
406 
407  typedef SoSFVec2f SFieldType;
408  typedef SoMFVec2f MFieldType;
409 
410  static const char * getTypeName() { return "SbVec2f"; }
411 };
412 
413 template <>
414 struct SbTypeInfo<SbVec2d> {
415  typedef SbVec2d Type;
416  typedef const Type & ParamType;
417 
418  typedef double PrimitiveType;
419  enum { Dimensions = 2 };
420 
421  typedef SbBox2d BoxType;
422 
423  typedef SoSFVec2d SFieldType;
424  typedef SoMFVec2d MFieldType;
425 };
426 
427 template <>
428 struct SbTypeInfo<SbVec2b> {
429  typedef SbVec2b Type;
430  typedef Type ParamType;
431 
432  typedef int8_t PrimitiveType;
433  enum { Dimensions = 2 };
434 
435  typedef SoSFVec2b SFieldType;
436  typedef SoMFVec2b MFieldType;
437 };
438 
439 template <>
440 struct SbTypeInfo<SbVec2ub> {
441  typedef SbVec2ub Type;
442  typedef Type ParamType;
443 
444  typedef uint8_t PrimitiveType;
445  enum { Dimensions = 2 };
446 };
447 
448 template <>
449 struct SbTypeInfo<SbVec2s> {
450  typedef SbVec2s Type;
451  typedef Type ParamType;
452 
453  typedef short PrimitiveType;
454  enum { isPrimitive = 0 };
455 
456  enum { Dimensions = 2 };
457 
458  typedef SbBox2s BoxType;
459 
460  typedef SoSFVec2s SFieldType;
461  typedef SoMFVec2s MFieldType;
462 
463  static const char * getTypeName() { return "SbVec2s"; }
464 };
465 
466 template <>
467 struct SbTypeInfo<SbVec2us> {
468  typedef SbVec2us Type;
469  typedef Type ParamType;
470 
471  typedef unsigned short PrimitiveType;
472  enum { Dimensions = 2 };
473 };
474 
475 template <>
476 struct SbTypeInfo<SbVec2i32> {
477  typedef SbVec2i32 Type;
478  typedef const Type & ParamType;
479 
480  typedef int32_t PrimitiveType;
481  enum { Dimensions = 2 };
482 
483  typedef SbBox2i32 BoxType;
484 
485  typedef SoSFVec2i32 SFieldType;
486  typedef SoMFVec2i32 MFieldType;
487 };
488 
489 template <>
490 struct SbTypeInfo<SbVec2ui32> {
491  typedef SbVec2ui32 Type;
492  typedef const Type & ParamType;
493 
494  typedef uint32_t PrimitiveType;
495  enum { Dimensions = 2 };
496 };
497 
498 template <>
499 struct SbTypeInfo<SbVec3f> {
500  typedef SbVec3f Type;
501  typedef const Type & ParamType;
502 
503  typedef float PrimitiveType;
504  enum { isPrimitive = 0 };
505 
506  enum { Dimensions = 3 };
507 
508  typedef SbBox3f BoxType;
509 
510  typedef SoSFVec3f SFieldType;
511  typedef SoMFVec3f MFieldType;
512 
513  static const char * getTypeName() { return "SbVec3f"; }
514 };
515 
516 template <>
517 struct SbTypeInfo<SbVec3d> {
518  typedef SbVec3d Type;
519  typedef const Type & ParamType;
520 
521  typedef double PrimitiveType;
522  enum { Dimensions = 3 };
523 
524  typedef SbBox3d BoxType;
525 
526  typedef SoSFVec3d SFieldType;
527  typedef SoMFVec3d MFieldType;
528 };
529 
530 template <>
531 struct SbTypeInfo<SbVec3b> {
532  typedef SbVec3b Type;
533  typedef Type ParamType;
534 
535  typedef int8_t PrimitiveType;
536  enum { Dimensions = 3 };
537 
538  typedef SoSFVec3b SFieldType;
539  typedef SoMFVec3b MFieldType;
540 };
541 
542 template <>
543 struct SbTypeInfo<SbVec3ub> {
544  typedef SbVec3ub Type;
545  typedef Type ParamType;
546 
547  typedef uint8_t PrimitiveType;
548  enum { Dimensions = 3 };
549 };
550 
551 template <>
552 struct SbTypeInfo<SbVec3s> {
553  typedef SbVec3s Type;
554  typedef const Type & ParamType;
555 
556  typedef short PrimitiveType;
557  enum { isPrimitive = 0 };
558 
559  enum { Dimensions = 3 };
560 
561  typedef SbBox3s BoxType;
562 
563  typedef SoSFVec3s SFieldType;
564  typedef SoMFVec3s MFieldType;
565 
566  static const char * getTypeName() { return "SbVec3s"; }
567 };
568 
569 template <>
570 struct SbTypeInfo<SbVec3us> {
571  typedef SbVec3us Type;
572  typedef const Type & ParamType;
573 
574  typedef unsigned short PrimitiveType;
575  enum { Dimensions = 3 };
576 
577  static const char * getTypeName() { return "SbVec3us"; }
578 };
579 
580 template <>
581 struct SbTypeInfo<SbVec3i32> {
582  typedef SbVec3i32 Type;
583  typedef const Type & ParamType;
584 
585  typedef int32_t PrimitiveType;
586  enum { Dimensions = 3 };
587 
588  typedef SbBox3i32 BoxType;
589 
590  typedef SoSFVec3i32 SFieldType;
591  typedef SoMFVec3i32 MFieldType;
592 };
593 
594 template <>
595 struct SbTypeInfo<SbVec3ui32> {
596  typedef SbVec3ui32 Type;
597  typedef const Type & ParamType;
598 
599  typedef uint32_t PrimitiveType;
600  enum { Dimensions = 3 };
601 };
602 
603 template <>
604 struct SbTypeInfo<SbVec4f> {
605  typedef SbVec4f Type;
606  typedef const Type & ParamType;
607 
608  typedef float PrimitiveType;
609  enum { Dimensions = 4 };
610 
611  typedef SoSFVec4f SFieldType;
612  typedef SoMFVec4f MFieldType;
613 };
614 
615 template <>
616 struct SbTypeInfo<SbVec4d> {
617  typedef SbVec4d Type;
618  typedef const Type & ParamType;
619 
620  typedef double PrimitiveType;
621  enum { Dimensions = 4 };
622 
623  typedef SoSFVec4d SFieldType;
624  typedef SoMFVec4d MFieldType;
625 };
626 
627 template <>
628 struct SbTypeInfo<SbVec4b> {
629  typedef SbVec4b Type;
630  typedef Type ParamType;
631 
632  typedef int8_t PrimitiveType;
633  enum { Dimensions = 4 };
634 
635  typedef SoSFVec4b SFieldType;
636  typedef SoMFVec4b MFieldType;
637 };
638 
639 template <>
640 struct SbTypeInfo<SbVec4ub> {
641  typedef SbVec4ub Type;
642  typedef Type ParamType;
643 
644  typedef uint8_t PrimitiveType;
645  enum { Dimensions = 4 };
646 
647  typedef SoSFVec4ub SFieldType;
648  typedef SoMFVec4ub MFieldType;
649 };
650 
651 template <>
652 struct SbTypeInfo<SbVec4s> {
653  typedef SbVec4s Type;
654  typedef const Type & ParamType;
655 
656  typedef short PrimitiveType;
657  enum { Dimensions = 4 };
658 
659  typedef SoSFVec4s SFieldType;
660  typedef SoMFVec4s MFieldType;
661 };
662 
663 template <>
664 struct SbTypeInfo<SbVec4us> {
665  typedef SbVec4us Type;
666  typedef const Type & ParamType;
667 
668  typedef unsigned short PrimitiveType;
669  enum { Dimensions = 4 };
670 
671  typedef SoSFVec4us SFieldType;
672  typedef SoMFVec4us MFieldType;
673 };
674 
675 template <>
676 struct SbTypeInfo<SbVec4i32> {
677  typedef SbVec4i32 Type;
678  typedef const Type & ParamType;
679 
680  typedef int32_t PrimitiveType;
681  enum { Dimensions = 4 };
682 
683  typedef SoSFVec4i32 SFieldType;
684  typedef SoMFVec4i32 MFieldType;
685 };
686 
687 template <>
688 struct SbTypeInfo<SbVec4ui32> {
689  typedef SbVec4ui32 Type;
690  typedef const Type & ParamType;
691 
692  typedef uint32_t PrimitiveType;
693  enum { Dimensions = 4 };
694 
695  typedef SoSFVec4ui32 SFieldType;
696  typedef SoMFVec4ui32 MFieldType;
697 };
698 
699 template <>
700 struct SbTypeInfo<SbBox2f> {
701  typedef SbBox2f Type;
702  typedef const Type & ParamType;
703 
704  typedef float PrimitiveType;
705  enum { Dimensions = 2 };
706 
707  typedef SbVec2f VecType;
708 
709  typedef SoSFBox2f SFieldType;
710 };
711 
712 template <>
713 struct SbTypeInfo<SbBox2d> {
714  typedef SbBox2d Type;
715  typedef const Type & ParamType;
716 
717  typedef double PrimitiveType;
718  enum { Dimensions = 2 };
719 
720  typedef SbVec2d VecType;
721 
722  typedef SoSFBox2d SFieldType;
723 };
724 
725 template <>
726 struct SbTypeInfo<SbBox2s> {
727  typedef SbBox2s Type;
728  typedef const Type & ParamType;
729 
730  typedef short PrimitiveType;
731  enum { Dimensions = 2 };
732 
733  typedef SbVec2s VecType;
734 
735  typedef SoSFBox2s SFieldType;
736 };
737 
738 template <>
739 struct SbTypeInfo<SbBox2i32> {
740  typedef SbBox2i32 Type;
741  typedef const Type & ParamType;
742 
743  typedef int32_t PrimitiveType;
744  enum { Dimensions = 2 };
745 
746  typedef SbVec2i32 VecType;
747 
748  typedef SoSFBox2i32 SFieldType;
749 };
750 
751 template <>
752 struct SbTypeInfo<SbBox3f> {
753  typedef SbBox3f Type;
754  typedef const Type & ParamType;
755 
756  typedef float PrimitiveType;
757  enum { Dimensions = 3 };
758 
759  typedef SbVec3f VecType;
760 
761  typedef SoSFBox3f SFieldType;
762 };
763 
764 template <>
765 struct SbTypeInfo<SbBox3d> {
766  typedef SbBox3d Type;
767  typedef const Type & ParamType;
768 
769  typedef double PrimitiveType;
770  enum { Dimensions = 3 };
771 
772  typedef SbVec3d VecType;
773 
774  typedef SoSFBox3d SFieldType;
775 };
776 
777 template <>
778 struct SbTypeInfo<SbBox3s> {
779  typedef SbBox3s Type;
780  typedef const Type & ParamType;
781 
782  typedef short PrimitiveType;
783  enum { Dimensions = 3 };
784 
785  typedef SbVec3s VecType;
786 
787  typedef SoSFBox3s SFieldType;
788 };
789 
790 template <>
791 struct SbTypeInfo<SbBox3i32> {
792  typedef SbBox3i32 Type;
793  typedef const Type & ParamType;
794 
795  typedef int32_t PrimitiveType;
796  enum { Dimensions = 3 };
797 
798  typedef SbVec3i32 VecType;
799 
800  typedef SoSFBox3i32 SFieldType;
801 };
802 
803 template <>
804 struct SbTypeInfo<SbPlane> {
805  typedef SbPlane Type;
806  typedef const Type & ParamType;
807 
808  typedef float PrimitiveType;
809  enum { Dimensions = 3 };
810 
811  typedef SoSFPlane SFieldType;
812  typedef SoMFPlane MFieldType;
813 };
814 
815 template <>
816 struct SbTypeInfo<SbDPPlane> {
817  typedef SbDPPlane Type;
818  typedef const Type & ParamType;
819 
820  typedef double PrimitiveType;
821  enum { Dimensions = 3 };
822 };
823 
824 template <>
825 struct SbTypeInfo<SbLine> {
826  typedef SbLine Type;
827  typedef const Type & ParamType;
828 
829  typedef float PrimitiveType;
830  enum { Dimensions = 3 };
831 };
832 
833 template <>
834 struct SbTypeInfo<SbDPLine> {
835  typedef SbDPLine Type;
836  typedef const Type & ParamType;
837 
838  typedef double PrimitiveType;
839  enum { Dimensions = 3 };
840 };
841 
842 template <>
843 struct SbTypeInfo<SbRotation> {
844  typedef SbRotation Type;
845  typedef const Type & ParamType;
846 
847  typedef float PrimitiveType;
848  enum { isPrimitive = 0 };
849 
850  typedef SoSFRotation SFieldType;
851  typedef SoMFRotation MFieldType;
852 
853  enum { Dimensions = 4 };
854  static const char * getTypeName() { return "SbRotation"; }
855 };
856 
857 template <>
858 struct SbTypeInfo<SbDPRotation> {
859  typedef SbDPRotation Type;
860  typedef const Type & ParamType;
861 
862  typedef double PrimitiveType;
863 };
864 
865 template <>
866 struct SbTypeInfo<SbMatrix> {
867  typedef SbMatrix Type;
868  typedef const Type & ParamType;
869 
870  typedef float PrimitiveType;
871 
872  typedef SoSFMatrix SFieldType;
873  typedef SoMFMatrix MFieldType;
874 };
875 
876 template <>
877 struct SbTypeInfo<SbDPMatrix> {
878  typedef SbDPMatrix Type;
879  typedef const Type & ParamType;
880 
881  typedef double PrimitiveType;
882 };
883 
884 // *************************************************************************
885 
886 template<>
887 struct SbTypeInfo<SoSFBitMask> {
888  typedef SoSFBitMask Type;
889  typedef int32_t DataType;
890 };
891 
892 template<>
893 struct SbTypeInfo<SoSFBool> {
894  typedef SoSFBool Type;
895  typedef SbBool DataType;
896 };
897 
898 template<>
899 struct SbTypeInfo<SoSFBox2d> {
900  typedef SoSFBox2d Type;
901  typedef SbBox2d DataType;
902 };
903 
904 template<>
905 struct SbTypeInfo<SoSFBox2f> {
906  typedef SoSFBox2f Type;
907  typedef SbBox2f DataType;
908 };
909 
910 template<>
911 struct SbTypeInfo<SoSFBox2i32> {
912  typedef SoSFBox2i32 Type;
913  typedef SbBox2i32 DataType;
914 };
915 
916 template<>
917 struct SbTypeInfo<SoSFBox2s> {
918  typedef SoSFBox2s Type;
919  typedef SbBox2s DataType;
920 };
921 
922 template<>
923 struct SbTypeInfo<SoSFBox3d> {
924  typedef SoSFBox3d Type;
925  typedef SbBox3d DataType;
926 };
927 
928 template<>
929 struct SbTypeInfo<SoSFBox3f> {
930  typedef SoSFBox3f Type;
931  typedef SbBox3f DataType;
932 };
933 
934 template<>
935 struct SbTypeInfo<SoSFBox3i32> {
936  typedef SoSFBox3i32 Type;
937  typedef SbBox3i32 DataType;
938 };
939 
940 template<>
941 struct SbTypeInfo<SoSFBox3s> {
942  typedef SoSFBox3s Type;
943  typedef SbBox3s DataType;
944 };
945 
946 template<>
947 struct SbTypeInfo<SoSFColor> {
948  typedef SoSFColor Type;
949  typedef SbColor DataType;
950 };
951 
952 template<>
953 struct SbTypeInfo<SoSFColorRGBA> {
954  typedef SoSFColorRGBA Type;
955  typedef SbColor4f DataType;
956 };
957 
958 template<>
959 struct SbTypeInfo<SoSFDouble> {
960  typedef SoSFDouble Type;
961  typedef double DataType;
962 };
963 
964 template<>
965 struct SbTypeInfo<SoSFEngine> {
966  typedef SoSFEngine Type;
967  typedef SoEngine * DataType;
968 };
969 
970 template<>
971 struct SbTypeInfo<SoSFEnum> {
972  typedef SoSFEnum Type;
973  typedef int32_t DataType;
974 };
975 
976 template<>
977 struct SbTypeInfo<SoSFFloat> {
978  typedef SoSFFloat Type;
979  typedef float DataType;
980 };
981 
982 //template<>
983 //struct SbTypeInfo<SoSFImage3> {
984 // typedef SoSFImage3 Type;
985 // typedef SoImage3 DataType;
986 //};
987 
988 template<>
989 struct SbTypeInfo<SoSFImage> {
990  typedef SoSFImage Type;
991 // typedef SbImage DataType;
992 };
993 
994 template<>
995 struct SbTypeInfo<SoSFInt32> {
996  typedef SoSFInt32 Type;
997  typedef int32_t DataType;
998 };
999 
1000 template<>
1001 struct SbTypeInfo<SoSFMatrix> {
1002  typedef SoSFMatrix Type;
1003  typedef SbMatrix DataType;
1004 };
1005 
1006 template<>
1007 struct SbTypeInfo<SoSFName> {
1008  typedef SoSFName Type;
1009  typedef SbName DataType;
1010 };
1011 
1012 template<>
1013 struct SbTypeInfo<SoSFNode> {
1014  typedef SoSFNode Type;
1015  typedef SoNode * DataType;
1016 };
1017 
1018 template<>
1019 struct SbTypeInfo<SoSFPath> {
1020  typedef SoSFPath Type;
1021  typedef SoPath * DataType;
1022 };
1023 
1024 template<>
1025 struct SbTypeInfo<SoSFPlane> {
1026  typedef SoSFPlane Type;
1027  typedef SbPlane DataType;
1028 };
1029 
1030 template<>
1031 struct SbTypeInfo<SoSFRotation> {
1032  typedef SoSFRotation Type;
1033  typedef SbRotation DataType;
1034 };
1035 
1036 template<>
1037 struct SbTypeInfo<SoSFShort> {
1038  typedef SoSFShort Type;
1039  typedef short DataType;
1040 };
1041 
1042 template<>
1043 struct SbTypeInfo<SoSFString> {
1044  typedef SoSFString Type;
1045  typedef SbString DataType;
1046 };
1047 
1048 template<>
1049 struct SbTypeInfo<SoSFTime> {
1050  typedef SoSFTime Type;
1051  typedef SbTime DataType;
1052 };
1053 
1054 //template<>
1055 //struct SbTypeInfo<SoSFTrigger> {
1056 // typedef SoSFTrigger Type;
1057 // typedef SoTrigger DataType;
1058 //};
1059 
1060 template<>
1061 struct SbTypeInfo<SoSFUInt32> {
1062  typedef SoSFUInt32 Type;
1063  typedef uint32_t DataType;
1064 };
1065 
1066 template<>
1067 struct SbTypeInfo<SoSFUShort> {
1068  typedef SoSFUShort Type;
1069  typedef unsigned short DataType;
1070 };
1071 
1072 template<>
1073 struct SbTypeInfo<SoSFVec2b> {
1074  typedef SoSFVec2b Type;
1075  typedef SbVec2b DataType;
1076 };
1077 
1078 template<>
1079 struct SbTypeInfo<SoSFVec2d> {
1080  typedef SoSFVec2d Type;
1081  typedef SbVec2d DataType;
1082 };
1083 
1084 template<>
1085 struct SbTypeInfo<SoSFVec2f> {
1086  typedef SoSFVec2f Type;
1087  typedef SbVec2f DataType;
1088 };
1089 
1090 template<>
1091 struct SbTypeInfo<SoSFVec2i32> {
1092  typedef SoSFVec2i32 Type;
1093  typedef SbVec2i32 DataType;
1094 };
1095 
1096 template<>
1097 struct SbTypeInfo<SoSFVec2s> {
1098  typedef SoSFVec2s Type;
1099  typedef SbVec2s DataType;
1100 };
1101 
1102 template<>
1103 struct SbTypeInfo<SoSFVec3b> {
1104  typedef SoSFVec3b Type;
1105  typedef SbVec3b DataType;
1106 };
1107 
1108 template<>
1109 struct SbTypeInfo<SoSFVec3d> {
1110  typedef SoSFVec3d Type;
1111  typedef SbVec3d DataType;
1112 };
1113 
1114 template<>
1115 struct SbTypeInfo<SoSFVec3f> {
1116  typedef SoSFVec3f Type;
1117  typedef SbVec3f DataType;
1118 };
1119 
1120 template<>
1121 struct SbTypeInfo<SoSFVec3i32> {
1122  typedef SoSFVec3i32 Type;
1123  typedef SbVec3i32 DataType;
1124 };
1125 
1126 template<>
1127 struct SbTypeInfo<SoSFVec3s> {
1128  typedef SoSFVec3s Type;
1129  typedef SbVec3s DataType;
1130 };
1131 
1132 template<>
1133 struct SbTypeInfo<SoSFVec4b> {
1134  typedef SoSFVec4b Type;
1135  typedef SbVec4b DataType;
1136 };
1137 
1138 template<>
1139 struct SbTypeInfo<SoSFVec4d> {
1140  typedef SoSFVec4d Type;
1141  typedef SbVec4d DataType;
1142 };
1143 
1144 template<>
1145 struct SbTypeInfo<SoSFVec4f> {
1146  typedef SoSFVec4f Type;
1147  typedef SbVec4f DataType;
1148 };
1149 
1150 template<>
1151 struct SbTypeInfo<SoSFVec4i32> {
1152  typedef SoSFVec4i32 Type;
1153  typedef SbVec4i32 DataType;
1154 };
1155 
1156 template<>
1157 struct SbTypeInfo<SoSFVec4s> {
1158  typedef SoSFVec4s Type;
1159  typedef SbVec4s DataType;
1160 };
1161 
1162 template<>
1163 struct SbTypeInfo<SoSFVec4ub> {
1164  typedef SoSFVec4ub Type;
1165  typedef SbVec4ub DataType;
1166 };
1167 
1168 template<>
1169 struct SbTypeInfo<SoSFVec4ui32> {
1170  typedef SoSFVec4ui32 Type;
1171  typedef SbVec4ui32 DataType;
1172 };
1173 
1174 template<>
1175 struct SbTypeInfo<SoSFVec4us> {
1176  typedef SoSFVec4us Type;
1177  typedef SbVec4us DataType;
1178 };
1179 
1180 template<>
1181 struct SbTypeInfo<SoMFBitMask> {
1182  typedef SoMFBitMask Type;
1183  typedef int32_t DataType;
1184 };
1185 
1186 template<>
1187 struct SbTypeInfo<SoMFBool> {
1188  typedef SoMFBool Type;
1189  typedef SbBool DataType;
1190 };
1191 
1192 template<>
1193 struct SbTypeInfo<SoMFColor> {
1194  typedef SoMFColor Type;
1195  typedef SbColor DataType;
1196 };
1197 
1198 template<>
1199 struct SbTypeInfo<SoMFColorRGBA> {
1200  typedef SoMFColorRGBA Type;
1201  typedef SbColor4f DataType;
1202 };
1203 
1204 template<>
1205 struct SbTypeInfo<SoMFDouble> {
1206  typedef SoMFDouble Type;
1207  typedef double DataType;
1208 };
1209 
1210 template<>
1211 struct SbTypeInfo<SoMFEngine> {
1212  typedef SoMFEngine Type;
1213  typedef SoEngine * DataType;
1214 };
1215 
1216 template<>
1217 struct SbTypeInfo<SoMFEnum> {
1218  typedef SoMFEnum Type;
1219  typedef int32_t DataType;
1220 };
1221 
1222 template<>
1223 struct SbTypeInfo<SoMFFloat> {
1224  typedef SoMFFloat Type;
1225  typedef float DataType;
1226 };
1227 
1228 template<>
1229 struct SbTypeInfo<SoMFInt32> {
1230  typedef SoMFInt32 Type;
1231  typedef int32_t DataType;
1232 };
1233 
1234 template<>
1235 struct SbTypeInfo<SoMFMatrix> {
1236  typedef SoMFMatrix Type;
1237  typedef SbMatrix DataType;
1238 };
1239 
1240 template<>
1241 struct SbTypeInfo<SoMFName> {
1242  typedef SoSFVec4us Type;
1243  typedef SbVec4us DataType;
1244 };
1245 
1246 template<>
1247 struct SbTypeInfo<SoMFNode> {
1248  typedef SoMFNode Type;
1249  typedef SoNode * DataType;
1250 };
1251 
1252 template<>
1253 struct SbTypeInfo<SoMFPath> {
1254  typedef SoMFPath Type;
1255  typedef SoPath * DataType;
1256 };
1257 
1258 template<>
1259 struct SbTypeInfo<SoMFPlane> {
1260  typedef SoMFPlane Type;
1261  typedef SbPlane DataType;
1262 };
1263 
1264 template<>
1265 struct SbTypeInfo<SoMFRotation> {
1266  typedef SoMFRotation Type;
1267  typedef SbRotation DataType;
1268 };
1269 
1270 template<>
1271 struct SbTypeInfo<SoMFShort> {
1272  typedef SoMFShort Type;
1273  typedef short DataType;
1274 };
1275 
1276 template<>
1277 struct SbTypeInfo<SoMFString> {
1278  typedef SoMFString Type;
1279  typedef SbString DataType;
1280 };
1281 
1282 template<>
1283 struct SbTypeInfo<SoMFTime> {
1284  typedef SoMFTime Type;
1285  typedef SbTime DataType;
1286 };
1287 
1288 template<>
1289 struct SbTypeInfo<SoMFUInt32> {
1290  typedef SoMFUInt32 Type;
1291  typedef uint32_t DataType;
1292 };
1293 
1294 template<>
1295 struct SbTypeInfo<SoMFUShort> {
1296  typedef SoMFUShort Type;
1297  typedef unsigned short DataType;
1298 };
1299 
1300 template<>
1301 struct SbTypeInfo<SoMFVec2b> {
1302  typedef SoMFVec2b Type;
1303  typedef SbVec2b DataType;
1304 };
1305 
1306 template<>
1307 struct SbTypeInfo<SoMFVec2d> {
1308  typedef SoMFVec2d Type;
1309  typedef SbVec2d DataType;
1310 };
1311 
1312 template<>
1313 struct SbTypeInfo<SoMFVec2f> {
1314  typedef SoMFVec2f Type;
1315  typedef SbVec2f DataType;
1316 };
1317 
1318 template<>
1319 struct SbTypeInfo<SoMFVec2i32> {
1320  typedef SoMFVec2i32 Type;
1321  typedef SbVec2i32 DataType;
1322 };
1323 
1324 template<>
1325 struct SbTypeInfo<SoMFVec2s> {
1326  typedef SoMFVec2s Type;
1327  typedef SbVec2s DataType;
1328 };
1329 
1330 template<>
1331 struct SbTypeInfo<SoMFVec3b> {
1332  typedef SoMFVec3b Type;
1333  typedef SbVec3b DataType;
1334 };
1335 
1336 template<>
1337 struct SbTypeInfo<SoMFVec3d> {
1338  typedef SoMFVec3d Type;
1339  typedef SbVec3d DataType;
1340 };
1341 
1342 template<>
1343 struct SbTypeInfo<SoMFVec3f> {
1344  typedef SoMFVec3f Type;
1345  typedef SbVec3f DataType;
1346 };
1347 
1348 template<>
1349 struct SbTypeInfo<SoMFVec3i32> {
1350  typedef SoMFVec3i32 Type;
1351  typedef SbVec3i32 DataType;
1352 };
1353 
1354 template<>
1355 struct SbTypeInfo<SoMFVec3s> {
1356  typedef SoMFVec3s Type;
1357  typedef SbVec3s DataType;
1358 };
1359 
1360 template<>
1361 struct SbTypeInfo<SoMFVec4b> {
1362  typedef SoMFVec4b Type;
1363  typedef SbVec4b DataType;
1364 };
1365 
1366 template<>
1367 struct SbTypeInfo<SoMFVec4d> {
1368  typedef SoMFVec4d Type;
1369  typedef SbVec4d DataType;
1370 };
1371 
1372 template<>
1373 struct SbTypeInfo<SoMFVec4f> {
1374  typedef SoMFVec4f Type;
1375  typedef SbVec4f DataType;
1376 };
1377 
1378 template<>
1379 struct SbTypeInfo<SoMFVec4i32> {
1380  typedef SoMFVec4i32 Type;
1381  typedef SbVec4i32 DataType;
1382 };
1383 
1384 template<>
1385 struct SbTypeInfo<SoMFVec4s> {
1386  typedef SoMFVec4s Type;
1387  typedef SbVec4s DataType;
1388 };
1389 
1390 template<>
1391 struct SbTypeInfo<SoMFVec4ub> {
1392  typedef SoMFVec4ub Type;
1393  typedef SbVec4ub DataType;
1394 };
1395 
1396 template<>
1397 struct SbTypeInfo<SoMFVec4ui32> {
1398  typedef SoMFVec4ui32 Type;
1399  typedef SbVec4ui32 DataType;
1400 };
1401 
1402 template<>
1403 struct SbTypeInfo<SoMFVec4us> {
1404  typedef SoMFVec4us Type;
1405  typedef SbVec4us DataType;
1406 };
1407 
1408 // *************************************************************************
1409 
1410 // } } } // namespace SIM::Coin3D::Coin
1411 
1412 #endif // !COIN_SBTYPEINFO_H

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed May 29 2013 18:21:19 for Coin by Doxygen 1.8.1.2.