Debian Codegraph @

lib/nodekits/src/upgraders/SoV1NodeKit.c++

raw
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * Copyright (C) 1990, 1991 Silicon Graphics, Inc.
39 *
40 _______________________________________________________________________
41 ______________ S I L I C O N G R A P H I C S I N C . ____________
42 |
43 | $Revision: 1.1.1.1 $
44 |
45 | Description:
46 | Definition of the SoV1NodeKit class
47 |
48 | Author(s) : Paul Isaacs
49 |
50 ______________ S I L I C O N G R A P H I C S I N C . ____________
51 _______________________________________________________________________
52 */
53
54 #include <Inventor/misc/upgraders/SoV1NodeKit.h>
55 #include <Inventor/misc/upgraders/SoV1AppearanceKit.h>
56 #include <Inventor/misc/upgraders/SoV1BaseKit.h>
57 #include <Inventor/misc/upgraders/SoV1CameraKit.h>
58 #include <Inventor/misc/upgraders/SoV1ConeKit.h>
59 #include <Inventor/misc/upgraders/SoV1CubeKit.h>
60 #include <Inventor/misc/upgraders/SoV1CylinderKit.h>
61 #include <Inventor/misc/upgraders/SoV1DirectionalLightKit.h>
62 #include <Inventor/misc/upgraders/SoV1FaceSetKit.h>
63 #include <Inventor/misc/upgraders/SoV1GroupKit.h>
64 #include <Inventor/misc/upgraders/SoV1IndexedFaceSetKit.h>
65 #include <Inventor/misc/upgraders/SoV1IndexedLineSetKit.h>
66 #include <Inventor/misc/upgraders/SoV1IndexedTriangleMeshKit.h>
67 #include <Inventor/misc/upgraders/SoV1IndexedNurbsCurveKit.h>
68 #include <Inventor/misc/upgraders/SoV1IndexedNurbsSurfaceKit.h>
69 #include <Inventor/misc/upgraders/SoV1LightKit.h>
70 #include <Inventor/misc/upgraders/SoV1LineSetKit.h>
71 #include <Inventor/misc/upgraders/SoV1NurbsCurveKit.h>
72 #include <Inventor/misc/upgraders/SoV1NurbsSurfaceKit.h>
73 #include <Inventor/misc/upgraders/SoV1OrthographicCameraKit.h>
74 #include <Inventor/misc/upgraders/SoV1PerspectiveCameraKit.h>
75 #include <Inventor/misc/upgraders/SoV1PointLightKit.h>
76 #include <Inventor/misc/upgraders/SoV1PointSetKit.h>
77 #include <Inventor/misc/upgraders/SoV1QuadMeshKit.h>
78 #include <Inventor/misc/upgraders/SoV1SceneKit.h>
79 #include <Inventor/misc/upgraders/SoV1ShapeKit.h>
80 #include <Inventor/misc/upgraders/SoV1SphereKit.h>
81 #include <Inventor/misc/upgraders/SoV1SpotLightKit.h>
82 #include <Inventor/misc/upgraders/SoV1Text2Kit.h>
83 #include <Inventor/misc/upgraders/SoV1Text3Kit.h>
84 #include <Inventor/misc/upgraders/SoV1TriangleStripSetKit.h>
85 #include <Inventor/misc/upgraders/SoV1VertexShapeKit.h>
86 #include <Inventor/misc/upgraders/SoV1WrapperKit.h>
87
88 ////////////////////////////////////////////////////////////////////////
89 //
90 // Description:
91 // Initialize all interaction class.
92 //
93 // Use: public
94
95 void
96 SoV1NodeKit::init()
97 //
98 ////////////////////////////////////////////////////////////////////////
99 {
100 //
101 // initialize the nodekit catalog class
102 //
103 SoV1NodekitCatalog::initClass();
104
105 //
106 // initialize all the node classes
107 //
108
109 // base class
110 SoV1BaseKit::initClass();
111
112 // appearance class
113 SoV1AppearanceKit::initClass();
114
115 // group and wrapper
116 SoV1GroupKit::initClass();
117 SoV1WrapperKit::initClass();
118
119 // shape classes
120 SoV1ShapeKit::initClass();
121 SoV1ConeKit::initClass();
122 SoV1CubeKit::initClass();
123 SoV1CylinderKit::initClass();
124 SoV1SphereKit::initClass();
125 SoV1Text2Kit::initClass();
126 SoV1Text3Kit::initClass();
127 SoV1VertexShapeKit::initClass();
128 SoV1FaceSetKit::initClass();
129 SoV1LineSetKit::initClass();
130 SoV1PointSetKit::initClass();
131 SoV1IndexedFaceSetKit::initClass();
132 SoV1IndexedLineSetKit::initClass();
133 SoV1IndexedTriangleMeshKit::initClass();
134 SoV1IndexedNurbsCurveKit::initClass();
135 SoV1IndexedNurbsSurfaceKit::initClass();
136 SoV1QuadMeshKit::initClass();
137 SoV1TriangleStripSetKit::initClass();
138 SoV1NurbsCurveKit::initClass();
139 SoV1NurbsSurfaceKit::initClass();
140
141 // lights
142 SoV1LightKit::initClass();
143 SoV1DirectionalLightKit::initClass();
144 SoV1PointLightKit::initClass();
145 SoV1SpotLightKit::initClass();
146
147 // cameras
148 SoV1CameraKit::initClass();
149 SoV1OrthographicCameraKit::initClass();
150 SoV1PerspectiveCameraKit::initClass();
151
152 // scene
153 SoV1SceneKit::initClass();
154 }
155
156 ////////////////////////////////////////////////////////////////////////
157 //
158 // Description:
159 // This initializes the SoV1AppearanceKit class.
160 //
161 // Use: internal
162
163 void
164 SoV1AppearanceKit::initClass()
165 //
166 ////////////////////////////////////////////////////////////////////////
167 {
168 SO__NODE_INIT_CLASS(SoV1AppearanceKit, "V1AppearanceKit", SoV1BaseKit);
169 SO_REGISTER_UPGRADER(AppearanceKit,1.0);
170 }
171
172 ////////////////////////////////////////////////////////////////////////
173 //
174 // Description:
175 // This initializes the SoV1BaseKit class.
176 //
177 // Use: internal
178
179 void
180 SoV1BaseKit::initClass()
181 //
182 ////////////////////////////////////////////////////////////////////////
183 {
184 SO__NODE_INIT_CLASS(SoV1BaseKit, "V1BaseKit", SoV1CustomNode);
185 SO_REGISTER_UPGRADER(BaseKit,1.0);
186 }
187
188 ////////////////////////////////////////////////////////////////////////
189 //
190 // Description:
191 // This initializes the SoV1CameraKit class.
192 //
193 // Use: internal
194
195 void
196 SoV1CameraKit::initClass()
197 //
198 ////////////////////////////////////////////////////////////////////////
199 {
200 SO__NODE_INIT_CLASS(SoV1CameraKit, "V1CameraKit", SoV1BaseKit );
201 SO_REGISTER_UPGRADER(CameraKit,1.0);
202 }
203
204 ////////////////////////////////////////////////////////////////////////
205 //
206 // Description:
207 // This initializes the SoV1ConeKit class.
208 //
209 // Use: internal
210
211 void
212 SoV1ConeKit::initClass()
213 //
214 ////////////////////////////////////////////////////////////////////////
215 {
216 SO__NODE_INIT_CLASS(SoV1ConeKit, "V1ConeKit", SoV1ShapeKit);
217 SO_REGISTER_UPGRADER(ConeKit,1.0);
218 }
219
220 ////////////////////////////////////////////////////////////////////////
221 //
222 // Description:
223 // This initializes the SoV1CubeKit class.
224 //
225 // Use: internal
226
227 void
228 SoV1CubeKit::initClass()
229 //
230 ////////////////////////////////////////////////////////////////////////
231 {
232 SO__NODE_INIT_CLASS(SoV1CubeKit, "V1CubeKit", SoV1ShapeKit);
233 SO_REGISTER_UPGRADER(CubeKit,1.0);
234 }
235
236 ////////////////////////////////////////////////////////////////////////
237 //
238 // Description:
239 // This initializes the SoV1CylinderKit class.
240 //
241 // Use: internal
242
243 void
244 SoV1CylinderKit::initClass()
245 //
246 ////////////////////////////////////////////////////////////////////////
247 {
248 SO__NODE_INIT_CLASS(SoV1CylinderKit, "V1CylinderKit", SoV1ShapeKit);
249 SO_REGISTER_UPGRADER(CylinderKit,1.0);
250 }
251
252 ////////////////////////////////////////////////////////////////////////
253 //
254 // Description:
255 // This initializes the SoV1DirectionalLightKit class.
256 //
257 // Use: internal
258
259 void
260 SoV1DirectionalLightKit::initClass()
261 //
262 ////////////////////////////////////////////////////////////////////////
263 {
264 SO__NODE_INIT_CLASS(SoV1DirectionalLightKit, "V1DirectionalLightKit",
265 SoV1LightKit);
266 SO_REGISTER_UPGRADER(DirectionalLightKit,1.0);
267 }
268
269 ////////////////////////////////////////////////////////////////////////
270 //
271 // Description:
272 // This initializes the SoV1FaceSetKit class.
273 //
274 // Use: internal
275
276 void
277 SoV1FaceSetKit::initClass()
278 //
279 ////////////////////////////////////////////////////////////////////////
280 {
281 SO__NODE_INIT_CLASS(SoV1FaceSetKit, "V1FaceSetKit", SoV1VertexShapeKit);
282 SO_REGISTER_UPGRADER(FaceSetKit,1.0);
283 }
284
285 ////////////////////////////////////////////////////////////////////////
286 //
287 // Description:
288 // This initializes the SoV1GroupKit class.
289 //
290 // Use: internal
291
292 void
293 SoV1GroupKit::initClass()
294 //
295 ////////////////////////////////////////////////////////////////////////
296 {
297 SO__NODE_INIT_CLASS(SoV1GroupKit, "V1GroupKit", SoV1BaseKit);
298 SO_REGISTER_UPGRADER(GroupKit,1.0);
299 }
300
301 ////////////////////////////////////////////////////////////////////////
302 //
303 // Description:
304 // This initializes the SoV1IndexedFaceSetKit class.
305 //
306 // Use: internal
307
308 void
309 SoV1IndexedFaceSetKit::initClass()
310 //
311 ////////////////////////////////////////////////////////////////////////
312 {
313 SO__NODE_INIT_CLASS(SoV1IndexedFaceSetKit, "V1IndexedFaceSetKit",
314 SoV1VertexShapeKit);
315 SO_REGISTER_UPGRADER(IndexedFaceSetKit,1.0);
316 }
317
318 ////////////////////////////////////////////////////////////////////////
319 //
320 // Description:
321 // This initializes the SoV1IndexedLineSetKit class.
322 //
323 // Use: internal
324
325 void
326 SoV1IndexedLineSetKit::initClass()
327 //
328 ////////////////////////////////////////////////////////////////////////
329 {
330 SO__NODE_INIT_CLASS(SoV1IndexedLineSetKit, "V1IndexedLineSetKit",
331 SoV1VertexShapeKit);
332 SO_REGISTER_UPGRADER(IndexedLineSetKit,1.0);
333 }
334
335 ////////////////////////////////////////////////////////////////////////
336 //
337 // Description:
338 // This initializes the SoV1IndexedNurbsCurveKit class.
339 //
340 // Use: internal
341
342 void
343 SoV1IndexedNurbsCurveKit::initClass()
344 //
345 ////////////////////////////////////////////////////////////////////////
346 {
347 SO__NODE_INIT_CLASS(SoV1IndexedNurbsCurveKit, "V1IndexedNurbsCurveKit",
348 SoV1ShapeKit );
349 SO_REGISTER_UPGRADER(IndexedNurbsCurveKit,1.0);
350 }
351
352 ////////////////////////////////////////////////////////////////////////
353 //
354 // Description:
355 // This initializes the SoV1IndexedNurbsSurfaceKit class.
356 //
357 // Use: internal
358
359 void
360 SoV1IndexedNurbsSurfaceKit::initClass()
361 //
362 ////////////////////////////////////////////////////////////////////////
363 {
364 SO__NODE_INIT_CLASS(SoV1IndexedNurbsSurfaceKit, "V1IndexedNurbsSurfaceKit",
365 SoV1ShapeKit );
366 SO_REGISTER_UPGRADER(IndexedNurbsSurfaceKit,1.0);
367 }
368
369 ////////////////////////////////////////////////////////////////////////
370 //
371 // Description:
372 // This initializes the SoV1IndexedTriangleMeshKit class.
373 //
374 // Use: internal
375
376 void
377 SoV1IndexedTriangleMeshKit::initClass()
378 //
379 ////////////////////////////////////////////////////////////////////////
380 {
381 SO__NODE_INIT_CLASS(SoV1IndexedTriangleMeshKit, "V1IndexedTriangleMeshKit",
382 SoV1VertexShapeKit);
383 SO_REGISTER_UPGRADER(IndexedTriangleMeshKit,1.0);
384 }
385
386 ////////////////////////////////////////////////////////////////////////
387 //
388 // Description:
389 // This initializes the SoV1LightKit class.
390 //
391 // Use: internal
392
393 void
394 SoV1LightKit::initClass()
395 //
396 ////////////////////////////////////////////////////////////////////////
397 {
398 SO__NODE_INIT_CLASS(SoV1LightKit, "V1LightKit", SoV1BaseKit );
399 SO_REGISTER_UPGRADER(LightKit,1.0);
400 }
401
402 ////////////////////////////////////////////////////////////////////////
403 //
404 // Description:
405 // This initializes the SoV1LineSetKit class.
406 //
407 // Use: internal
408
409 void
410 SoV1LineSetKit::initClass()
411 //
412 ////////////////////////////////////////////////////////////////////////
413 {
414 SO__NODE_INIT_CLASS(SoV1LineSetKit, "V1LineSetKit", SoV1VertexShapeKit);
415 SO_REGISTER_UPGRADER(LineSetKit,1.0);
416 }
417
418 ////////////////////////////////////////////////////////////////////////
419 //
420 // Description:
421 // Initializes static variables.
422 //
423 // Use: public
424
425 void
426 SoV1NodekitCatalog::initClass()
427 //
428 ////////////////////////////////////////////////////////////////////////
429 {
430 emptyName = new SbName("");
431 emptyList = new SbPList;
432 badType = new SoType();
433 *badType = SoType::badType();
434 }
435
436 ////////////////////////////////////////////////////////////////////////
437 //
438 // Description:
439 // This initializes the SoV1NurbsCurveKit class.
440 //
441 // Use: internal
442
443 void
444 SoV1NurbsCurveKit::initClass()
445 //
446 ////////////////////////////////////////////////////////////////////////
447 {
448 SO__NODE_INIT_CLASS(SoV1NurbsCurveKit, "V1NurbsCurveKit", SoV1ShapeKit);
449 SO_REGISTER_UPGRADER(NurbsCurveKit,1.0);
450 }
451
452 ////////////////////////////////////////////////////////////////////////
453 //
454 // Description:
455 // This initializes the SoV1NurbsSurfaceKit class.
456 //
457 // Use: internal
458
459 void
460 SoV1NurbsSurfaceKit::initClass()
461 //
462 ////////////////////////////////////////////////////////////////////////
463 {
464 SO__NODE_INIT_CLASS(SoV1NurbsSurfaceKit, "V1NurbsSurfaceKit", SoV1ShapeKit);
465 SO_REGISTER_UPGRADER(NurbsSurfaceKit,1.0);
466 }
467
468 ////////////////////////////////////////////////////////////////////////
469 //
470 // Description:
471 // This initializes the SoV1OrthographicCameraKit class.
472 //
473 // Use: internal
474
475 void
476 SoV1OrthographicCameraKit::initClass()
477 //
478 ////////////////////////////////////////////////////////////////////////
479 {
480 SO__NODE_INIT_CLASS(SoV1OrthographicCameraKit, "V1OrthographicCameraKit",
481 SoV1CameraKit );
482 SO_REGISTER_UPGRADER(OrthographicCameraKit,1.0);
483 }
484
485 ////////////////////////////////////////////////////////////////////////
486 //
487 // Description:
488 // This initializes the SoV1PerspectiveCameraKit class.
489 //
490 // Use: internal
491
492 void
493 SoV1PerspectiveCameraKit::initClass()
494 //
495 ////////////////////////////////////////////////////////////////////////
496 {
497 SO__NODE_INIT_CLASS(SoV1PerspectiveCameraKit, "V1PerspectiveCameraKit",
498 SoV1CameraKit );
499 SO_REGISTER_UPGRADER(PerspectiveCameraKit,1.0);
500 }
501
502 ////////////////////////////////////////////////////////////////////////
503 //
504 // Description:
505 // This initializes the SoV1PointLightKit class.
506 //
507 // Use: internal
508
509 void
510 SoV1PointLightKit::initClass()
511 //
512 ////////////////////////////////////////////////////////////////////////
513 {
514 SO__NODE_INIT_CLASS(SoV1PointLightKit, "V1PointLightKit", SoV1LightKit );
515 SO_REGISTER_UPGRADER(PointLightKit,1.0);
516 }
517
518 ////////////////////////////////////////////////////////////////////////
519 //
520 // Description:
521 // This initializes the SoV1PointSetKit class.
522 //
523 // Use: internal
524
525 void
526 SoV1PointSetKit::initClass()
527 //
528 ////////////////////////////////////////////////////////////////////////
529 {
530 SO__NODE_INIT_CLASS(SoV1PointSetKit, "V1PointSetKit", SoV1VertexShapeKit);
531 SO_REGISTER_UPGRADER(PointSetKit,1.0);
532 }
533
534 ////////////////////////////////////////////////////////////////////////
535 //
536 // Description:
537 // This initializes the SoV1QuadMeshKit class.
538 //
539 // Use: internal
540
541 void
542 SoV1QuadMeshKit::initClass()
543 //
544 ////////////////////////////////////////////////////////////////////////
545 {
546 SO__NODE_INIT_CLASS(SoV1QuadMeshKit, "V1QuadMeshKit", SoV1VertexShapeKit);
547 SO_REGISTER_UPGRADER(QuadMeshKit,1.0);
548 }
549
550 ////////////////////////////////////////////////////////////////////////
551 //
552 // Description:
553 // This initializes the SoV1SceneKit class.
554 //
555 // Use: internal
556
557 void
558 SoV1SceneKit::initClass()
559 //
560 ////////////////////////////////////////////////////////////////////////
561 {
562 SO__NODE_INIT_CLASS(SoV1SceneKit, "V1SceneKit", SoV1BaseKit );
563 SO_REGISTER_UPGRADER(SceneKit,1.0);
564 }
565
566 ////////////////////////////////////////////////////////////////////////
567 //
568 // Description:
569 // This initializes the SoV1ShapeKit class.
570 //
571 // Use: internal
572
573 void
574 SoV1ShapeKit::initClass()
575 //
576 ////////////////////////////////////////////////////////////////////////
577 {
578 SO__NODE_INIT_CLASS(SoV1ShapeKit, "V1ShapeKit", SoV1GroupKit );
579 SO_REGISTER_UPGRADER(ShapeKit,1.0);
580 }
581
582 ////////////////////////////////////////////////////////////////////////
583 //
584 // Description:
585 // This initializes the SoV1SphereKit class.
586 //
587 // Use: internal
588
589 void
590 SoV1SphereKit::initClass()
591 //
592 ////////////////////////////////////////////////////////////////////////
593 {
594 SO__NODE_INIT_CLASS(SoV1SphereKit, "V1SphereKit", SoV1ShapeKit);
595 SO_REGISTER_UPGRADER(SphereKit,1.0);
596 }
597
598 ////////////////////////////////////////////////////////////////////////
599 //
600 // Description:
601 // This initializes the SoV1SpotLightKit class.
602 //
603 // Use: internal
604
605 void
606 SoV1SpotLightKit::initClass()
607 //
608 ////////////////////////////////////////////////////////////////////////
609 {
610 SO__NODE_INIT_CLASS(SoV1SpotLightKit, "V1SpotLightKit", SoV1LightKit );
611 SO_REGISTER_UPGRADER(SpotLightKit,1.0);
612 }
613
614 ////////////////////////////////////////////////////////////////////////
615 //
616 // Description:
617 // This initializes the SoV1Text2Kit class.
618 //
619 // Use: internal
620
621 void
622 SoV1Text2Kit::initClass()
623 //
624 ////////////////////////////////////////////////////////////////////////
625 {
626 SO__NODE_INIT_CLASS(SoV1Text2Kit, "V1Text2Kit", SoV1ShapeKit);
627 SO_REGISTER_UPGRADER(Text2Kit,1.0);
628 }
629
630 ////////////////////////////////////////////////////////////////////////
631 //
632 // Description:
633 // This initializes the SoV1Text3Kit class.
634 //
635 // Use: internal
636
637 void
638 SoV1Text3Kit::initClass()
639 //
640 ////////////////////////////////////////////////////////////////////////
641 {
642 SO__NODE_INIT_CLASS(SoV1Text3Kit, "V1Text3Kit", SoV1ShapeKit);
643 SO_REGISTER_UPGRADER(Text3Kit,1.0);
644 }
645
646 ////////////////////////////////////////////////////////////////////////
647 //
648 // Description:
649 // This initializes the SoV1TriangleStripSetKit class.
650 //
651 // Use: internal
652
653 void
654 SoV1TriangleStripSetKit::initClass()
655 //
656 ////////////////////////////////////////////////////////////////////////
657 {
658 SO__NODE_INIT_CLASS(SoV1TriangleStripSetKit, "V1TriangleStripSetKit",
659 SoV1VertexShapeKit );
660 SO_REGISTER_UPGRADER(TriangleStripSetKit,1.0);
661 }
662
663 ////////////////////////////////////////////////////////////////////////
664 //
665 // Description:
666 // This initializes the SoV1VertexShapeKit class.
667 //
668 // Use: internal
669
670 void
671 SoV1VertexShapeKit::initClass()
672 //
673 ////////////////////////////////////////////////////////////////////////
674 {
675 SO__NODE_INIT_CLASS(SoV1VertexShapeKit, "V1VertexShapeKit", SoV1ShapeKit);
676 SO_REGISTER_UPGRADER(VertexShapeKit,1.0);
677 }
678
679 ////////////////////////////////////////////////////////////////////////
680 //
681 // Description:
682 // This initializes the SoV1WrapperKit class.
683 //
684 // Use: internal
685
686 void
687 SoV1WrapperKit::initClass()
688 //
689 ////////////////////////////////////////////////////////////////////////
690 {
691 SO__NODE_INIT_CLASS(SoV1WrapperKit, "V1WrapperKit", SoV1GroupKit);
692 SO_REGISTER_UPGRADER(WrapperKit,1.0);
693 }
694