| 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,91,92 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 |
| Class: |
| 46 |
| call initClasses for all upgrader classes |
| 47 |
| |
| 48 |
| Author(s) : Gavin Bell |
| 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 "SoUpgraders.h" |
| 55 |
|
| 56 |
//////////////////////////////////////////////////////////////////////// |
| 57 |
// |
| 58 |
// Description: |
| 59 |
// This initializes ALL Inventor upgrader classes. |
| 60 |
// |
| 61 |
// Use: internal |
| 62 |
|
| 63 |
void |
| 64 |
SoUpgrader::initClasses() |
| 65 |
// |
| 66 |
//////////////////////////////////////////////////////////////////////// |
| 67 |
{ |
| 68 |
// Base class must be initialized first |
| 69 |
SoUpgrader::initClass(); |
| 70 |
|
| 71 |
SoV1CustomNode::initClass(); |
| 72 |
SoV1DrawStyle::initClass(); |
| 73 |
SoV1Environment::initClass(); |
| 74 |
SoV1IndexedTriangleMesh::initClass(); |
| 75 |
SoV1LayerGroup::initClass(); |
| 76 |
SoV1LightModel::initClass(); |
| 77 |
SoV1Material::initClass(); |
| 78 |
SoV1PackedColor::initClass(); |
| 79 |
SoV1PickStyle::initClass(); |
| 80 |
SoV1Separator::initClass(); |
| 81 |
SoV1ShapeHints::initClass(); |
| 82 |
SoV1Texture2::initClass(); |
| 83 |
SoV1Text3::initClass(); |
| 84 |
SoV1TextureCoordinateCube::initClass(); |
| 85 |
SoV1TextureCoordinateCylinder::initClass(); |
| 86 |
SoV1TextureCoordinateEnvironment::initClass(); |
| 87 |
SoV1TextureCoordinatePlane::initClass(); |
| 88 |
SoV1TextureCoordinateSphere::initClass(); |
| 89 |
|
| 90 |
SoV2Text2::initClass(); |
| 91 |
SoV2Text3::initClass(); |
| 92 |
SoV2WWWAnchor::initClass(); |
| 93 |
SoV2WWWInline::initClass(); |
| 94 |
SoV2AsciiText::initClass(); |
| 95 |
SoV2FontStyle::initClass(); |
| 96 |
SoV2MaterialIndex::initClass(); |
| 97 |
SoV2VertexProperty::initClass(); |
| 98 |
SoV2LOD::initClass(); |
| 99 |
} |
| 100 |
|
| 101 |
//////////////////////////////////////////////////////////////////////// |
| 102 |
// |
| 103 |
// Description: |
| 104 |
// This initializes the SoUpgrader class. |
| 105 |
// |
| 106 |
// Use: internal |
| 107 |
|
| 108 |
void |
| 109 |
SoUpgrader::initClass() |
| 110 |
// |
| 111 |
//////////////////////////////////////////////////////////////////////// |
| 112 |
{ |
| 113 |
SO__NODE_INIT_ABSTRACT_CLASS(SoUpgrader, "Upgrader", SoGroup); |
| 114 |
|
| 115 |
classTypeId.makeInternal(); |
| 116 |
upgradeDictV1 = new SbDict(50); |
| 117 |
upgradeDictV2 = new SbDict(10); // there are only a few classes to upgrade |
| 118 |
} |
| 119 |
|
| 120 |
//////////////////////////////////////////////////////////////////////// |
| 121 |
// |
| 122 |
// Description: |
| 123 |
// This initializes the SoV1CustomNode class. |
| 124 |
// |
| 125 |
// Use: internal |
| 126 |
|
| 127 |
void |
| 128 |
SoV1CustomNode::initClass() |
| 129 |
// |
| 130 |
//////////////////////////////////////////////////////////////////////// |
| 131 |
{ |
| 132 |
SO_UPGRADER_INIT_CLASS(SoV1CustomNode); |
| 133 |
SO_REGISTER_UPGRADER(CustomNode, 1.0); |
| 134 |
} |
| 135 |
|
| 136 |
//////////////////////////////////////////////////////////////////////// |
| 137 |
// |
| 138 |
// Description: |
| 139 |
// This initializes the SoV1DrawStyle class. |
| 140 |
// |
| 141 |
// Use: internal |
| 142 |
|
| 143 |
void |
| 144 |
SoV1DrawStyle::initClass() |
| 145 |
// |
| 146 |
//////////////////////////////////////////////////////////////////////// |
| 147 |
{ |
| 148 |
SO_UPGRADER_INIT_CLASS(SoV1DrawStyle); |
| 149 |
SO_REGISTER_UPGRADER(DrawStyle, 1.0); |
| 150 |
} |
| 151 |
|
| 152 |
//////////////////////////////////////////////////////////////////////// |
| 153 |
// |
| 154 |
// Description: |
| 155 |
// This initializes the SoV1Environment class. |
| 156 |
// |
| 157 |
// Use: internal |
| 158 |
|
| 159 |
void |
| 160 |
SoV1Environment::initClass() |
| 161 |
// |
| 162 |
//////////////////////////////////////////////////////////////////////// |
| 163 |
{ |
| 164 |
SO_UPGRADER_INIT_CLASS(SoV1Environment); |
| 165 |
SO_REGISTER_UPGRADER(Environment, 1.0); |
| 166 |
} |
| 167 |
|
| 168 |
//////////////////////////////////////////////////////////////////////// |
| 169 |
// |
| 170 |
// Description: |
| 171 |
// This initializes the SoV1IndexedTriangleMesh class. |
| 172 |
// |
| 173 |
// Use: internal |
| 174 |
|
| 175 |
void |
| 176 |
SoV1IndexedTriangleMesh::initClass() |
| 177 |
// |
| 178 |
//////////////////////////////////////////////////////////////////////// |
| 179 |
{ |
| 180 |
SO_UPGRADER_INIT_CLASS(SoV1IndexedTriangleMesh); |
| 181 |
SO_REGISTER_UPGRADER(IndexedTriangleMesh, 1.0); |
| 182 |
} |
| 183 |
|
| 184 |
//////////////////////////////////////////////////////////////////////// |
| 185 |
// |
| 186 |
// Description: |
| 187 |
// This initializes the SoV1LayerGroup class. |
| 188 |
// |
| 189 |
// Use: internal |
| 190 |
|
| 191 |
void |
| 192 |
SoV1LayerGroup::initClass() |
| 193 |
// |
| 194 |
//////////////////////////////////////////////////////////////////////// |
| 195 |
{ |
| 196 |
SO_UPGRADER_INIT_CLASS(SoV1LayerGroup); |
| 197 |
SO_REGISTER_UPGRADER(LayerGroup, 1.0); |
| 198 |
} |
| 199 |
|
| 200 |
//////////////////////////////////////////////////////////////////////// |
| 201 |
// |
| 202 |
// Description: |
| 203 |
// This initializes the SoV1LightModel class. |
| 204 |
// |
| 205 |
// Use: internal |
| 206 |
|
| 207 |
void |
| 208 |
SoV1LightModel::initClass() |
| 209 |
// |
| 210 |
//////////////////////////////////////////////////////////////////////// |
| 211 |
{ |
| 212 |
SO_UPGRADER_INIT_CLASS(SoV1LightModel); |
| 213 |
SO_REGISTER_UPGRADER(LightModel, 1.0); |
| 214 |
} |
| 215 |
|
| 216 |
//////////////////////////////////////////////////////////////////////// |
| 217 |
// |
| 218 |
// Description: |
| 219 |
// This initializes the SoV1Material class. |
| 220 |
// |
| 221 |
// Use: internal |
| 222 |
|
| 223 |
void |
| 224 |
SoV1Material::initClass() |
| 225 |
// |
| 226 |
//////////////////////////////////////////////////////////////////////// |
| 227 |
{ |
| 228 |
SO_UPGRADER_INIT_CLASS(SoV1Material); |
| 229 |
SO_REGISTER_UPGRADER(Material, 1.0); |
| 230 |
} |
| 231 |
|
| 232 |
//////////////////////////////////////////////////////////////////////// |
| 233 |
// |
| 234 |
// Description: |
| 235 |
// This initializes the SoV1PackedColor class. |
| 236 |
// |
| 237 |
// Use: internal |
| 238 |
|
| 239 |
void |
| 240 |
SoV1PackedColor::initClass() |
| 241 |
// |
| 242 |
//////////////////////////////////////////////////////////////////////// |
| 243 |
{ |
| 244 |
// PackedColor changed for 2.1, so we have to upgrade from both 1.0 and 2.0 |
| 245 |
SO_UPGRADER_INIT_CLASS(SoV1PackedColor); |
| 246 |
SO_REGISTER_UPGRADER(PackedColor, 1.0); |
| 247 |
SO_REGISTER_UPGRADER(PackedColor, 2.0); |
| 248 |
} |
| 249 |
|
| 250 |
//////////////////////////////////////////////////////////////////////// |
| 251 |
// |
| 252 |
// Description: |
| 253 |
// This initializes the SoV1PickStyle class. |
| 254 |
// |
| 255 |
// Use: internal |
| 256 |
|
| 257 |
void |
| 258 |
SoV1PickStyle::initClass() |
| 259 |
// |
| 260 |
//////////////////////////////////////////////////////////////////////// |
| 261 |
{ |
| 262 |
SO_UPGRADER_INIT_CLASS(SoV1PickStyle); |
| 263 |
SO_REGISTER_UPGRADER(PickStyle, 1.0); |
| 264 |
} |
| 265 |
|
| 266 |
//////////////////////////////////////////////////////////////////////// |
| 267 |
// |
| 268 |
// Description: |
| 269 |
// This initializes the SoV1Separator class. |
| 270 |
// |
| 271 |
// Use: internal |
| 272 |
|
| 273 |
void |
| 274 |
SoV1Separator::initClass() |
| 275 |
// |
| 276 |
//////////////////////////////////////////////////////////////////////// |
| 277 |
{ |
| 278 |
SO_UPGRADER_INIT_CLASS(SoV1Separator); |
| 279 |
SO_REGISTER_UPGRADER(Separator, 1.0); |
| 280 |
} |
| 281 |
|
| 282 |
//////////////////////////////////////////////////////////////////////// |
| 283 |
// |
| 284 |
// Description: |
| 285 |
// This initializes the SoV1ShapeHints class. |
| 286 |
// |
| 287 |
// Use: internal |
| 288 |
|
| 289 |
void |
| 290 |
SoV1ShapeHints::initClass() |
| 291 |
// |
| 292 |
//////////////////////////////////////////////////////////////////////// |
| 293 |
{ |
| 294 |
SO_UPGRADER_INIT_CLASS(SoV1ShapeHints); |
| 295 |
SO_REGISTER_UPGRADER(ShapeHints, 1.0); |
| 296 |
} |
| 297 |
|
| 298 |
//////////////////////////////////////////////////////////////////////// |
| 299 |
// |
| 300 |
// Description: |
| 301 |
// This initializes the SoV1Text3 class. |
| 302 |
// |
| 303 |
// Use: internal |
| 304 |
|
| 305 |
void |
| 306 |
SoV1Text3::initClass() |
| 307 |
// |
| 308 |
//////////////////////////////////////////////////////////////////////// |
| 309 |
{ |
| 310 |
SO_UPGRADER_INIT_CLASS(SoV1Text3); |
| 311 |
SO_REGISTER_UPGRADER(Text3, 1.0); |
| 312 |
} |
| 313 |
//////////////////////////////////////////////////////////////////////// |
| 314 |
// |
| 315 |
// Description: |
| 316 |
// This initializes the SoV2Text3 class. |
| 317 |
// |
| 318 |
// Use: internal |
| 319 |
|
| 320 |
void |
| 321 |
SoV2Text3::initClass() |
| 322 |
// |
| 323 |
//////////////////////////////////////////////////////////////////////// |
| 324 |
{ |
| 325 |
SO_UPGRADER_INIT_CLASS(SoV2Text3); |
| 326 |
SO_REGISTER_UPGRADER(Text3, 2.0); |
| 327 |
} |
| 328 |
//////////////////////////////////////////////////////////////////////// |
| 329 |
// |
| 330 |
// Description: |
| 331 |
// This initializes the SoV2Text2 class. |
| 332 |
// |
| 333 |
// Use: internal |
| 334 |
|
| 335 |
void |
| 336 |
SoV2Text2::initClass() |
| 337 |
// |
| 338 |
//////////////////////////////////////////////////////////////////////// |
| 339 |
{ |
| 340 |
SO_UPGRADER_INIT_CLASS(SoV2Text2); |
| 341 |
SO_REGISTER_UPGRADER(Text2, 2.0); |
| 342 |
} |
| 343 |
|
| 344 |
//////////////////////////////////////////////////////////////////////// |
| 345 |
// |
| 346 |
// Description: |
| 347 |
// This initializes the SoV1Texture2 class. |
| 348 |
// |
| 349 |
// Use: internal |
| 350 |
|
| 351 |
void |
| 352 |
SoV1Texture2::initClass() |
| 353 |
// |
| 354 |
//////////////////////////////////////////////////////////////////////// |
| 355 |
{ |
| 356 |
SO_UPGRADER_INIT_CLASS(SoV1Texture2); |
| 357 |
SO_REGISTER_UPGRADER(Texture2, 1.0); |
| 358 |
} |
| 359 |
|
| 360 |
//////////////////////////////////////////////////////////////////////// |
| 361 |
// |
| 362 |
// Description: |
| 363 |
// This initializes the SoV1TextureCoordinateCube class. |
| 364 |
// |
| 365 |
// Use: internal |
| 366 |
|
| 367 |
void |
| 368 |
SoV1TextureCoordinateCube::initClass() |
| 369 |
// |
| 370 |
//////////////////////////////////////////////////////////////////////// |
| 371 |
{ |
| 372 |
SO_UPGRADER_INIT_CLASS(SoV1TextureCoordinateCube); |
| 373 |
SO_REGISTER_UPGRADER(TextureCoordinateCube, 1.0); |
| 374 |
} |
| 375 |
|
| 376 |
//////////////////////////////////////////////////////////////////////// |
| 377 |
// |
| 378 |
// Description: |
| 379 |
// This initializes the SoV1TextureCoordinateCylinder class. |
| 380 |
// |
| 381 |
// Use: internal |
| 382 |
|
| 383 |
void |
| 384 |
SoV1TextureCoordinateCylinder::initClass() |
| 385 |
// |
| 386 |
//////////////////////////////////////////////////////////////////////// |
| 387 |
{ |
| 388 |
SO_UPGRADER_INIT_CLASS(SoV1TextureCoordinateCylinder); |
| 389 |
SO_REGISTER_UPGRADER(TextureCoordinateCylinder, 1.0); |
| 390 |
} |
| 391 |
|
| 392 |
//////////////////////////////////////////////////////////////////////// |
| 393 |
// |
| 394 |
// Description: |
| 395 |
// This initializes the SoV1TextureCoordinateEnvironment class. |
| 396 |
// |
| 397 |
// Use: internal |
| 398 |
|
| 399 |
void |
| 400 |
SoV1TextureCoordinateEnvironment::initClass() |
| 401 |
// |
| 402 |
//////////////////////////////////////////////////////////////////////// |
| 403 |
{ |
| 404 |
SO_UPGRADER_INIT_CLASS(SoV1TextureCoordinateEnvironment); |
| 405 |
SO_REGISTER_UPGRADER(TextureCoordinateEnvironment, 1.0); |
| 406 |
} |
| 407 |
|
| 408 |
//////////////////////////////////////////////////////////////////////// |
| 409 |
// |
| 410 |
// Description: |
| 411 |
// This initializes the SoV1TextureCoordinatePlane class. |
| 412 |
// |
| 413 |
// Use: internal |
| 414 |
|
| 415 |
void |
| 416 |
SoV1TextureCoordinatePlane::initClass() |
| 417 |
// |
| 418 |
//////////////////////////////////////////////////////////////////////// |
| 419 |
{ |
| 420 |
SO_UPGRADER_INIT_CLASS(SoV1TextureCoordinatePlane); |
| 421 |
SO_REGISTER_UPGRADER(TextureCoordinatePlane, 1.0); |
| 422 |
|
| 423 |
sDir = SbVec3f(1,0,0); |
| 424 |
tDir = SbVec3f(0,1,0); |
| 425 |
} |
| 426 |
|
| 427 |
//////////////////////////////////////////////////////////////////////// |
| 428 |
// |
| 429 |
// Description: |
| 430 |
// This initializes the SoV1TextureCoordinateSphere class. |
| 431 |
// |
| 432 |
// Use: internal |
| 433 |
|
| 434 |
void |
| 435 |
SoV1TextureCoordinateSphere::initClass() |
| 436 |
// |
| 437 |
//////////////////////////////////////////////////////////////////////// |
| 438 |
{ |
| 439 |
SO_UPGRADER_INIT_CLASS(SoV1TextureCoordinateSphere); |
| 440 |
SO_REGISTER_UPGRADER(TextureCoordinateSphere, 1.0); |
| 441 |
} |
| 442 |
|
| 443 |
//////////////////////////////////////////////////////////////////////// |
| 444 |
// |
| 445 |
// Description: |
| 446 |
// This initializes the SoV2WWWAnchor class. |
| 447 |
// |
| 448 |
// Use: internal |
| 449 |
|
| 450 |
void |
| 451 |
SoV2WWWAnchor::initClass() |
| 452 |
// |
| 453 |
//////////////////////////////////////////////////////////////////////// |
| 454 |
{ |
| 455 |
SO_UPGRADER_INIT_CLASS(SoV2WWWAnchor); |
| 456 |
SO_REGISTER_UPGRADER(WWWAnchor, 2.0); |
| 457 |
} |
| 458 |
//////////////////////////////////////////////////////////////////////// |
| 459 |
// |
| 460 |
// Description: |
| 461 |
// This initializes the SoV2WWWInline class. |
| 462 |
// |
| 463 |
// Use: internal |
| 464 |
|
| 465 |
void |
| 466 |
SoV2WWWInline::initClass() |
| 467 |
// |
| 468 |
//////////////////////////////////////////////////////////////////////// |
| 469 |
{ |
| 470 |
SO_UPGRADER_INIT_CLASS(SoV2WWWInline); |
| 471 |
SO_REGISTER_UPGRADER(WWWInline, 2.0); |
| 472 |
} |
| 473 |
//////////////////////////////////////////////////////////////////////// |
| 474 |
// |
| 475 |
// Description: |
| 476 |
// This initializes the SoV2AsciiText class. |
| 477 |
// |
| 478 |
// Use: internal |
| 479 |
|
| 480 |
void |
| 481 |
SoV2AsciiText::initClass() |
| 482 |
// |
| 483 |
//////////////////////////////////////////////////////////////////////// |
| 484 |
{ |
| 485 |
SO_UPGRADER_INIT_CLASS(SoV2AsciiText); |
| 486 |
SO_REGISTER_UPGRADER(AsciiText, 2.0); |
| 487 |
} |
| 488 |
|
| 489 |
//////////////////////////////////////////////////////////////////////// |
| 490 |
// |
| 491 |
// Description: |
| 492 |
// This initializes the SoV2FontStyle class. |
| 493 |
// |
| 494 |
// Use: internal |
| 495 |
|
| 496 |
void |
| 497 |
SoV2FontStyle::initClass() |
| 498 |
// |
| 499 |
//////////////////////////////////////////////////////////////////////// |
| 500 |
{ |
| 501 |
SO_UPGRADER_INIT_CLASS(SoV2FontStyle); |
| 502 |
SO_REGISTER_UPGRADER(FontStyle, 2.0); |
| 503 |
} |
| 504 |
|
| 505 |
//////////////////////////////////////////////////////////////////////// |
| 506 |
// |
| 507 |
// Description: |
| 508 |
// This initializes the SoV2MaterialIndex class. |
| 509 |
// |
| 510 |
// Use: internal |
| 511 |
|
| 512 |
void |
| 513 |
SoV2MaterialIndex::initClass() |
| 514 |
// |
| 515 |
//////////////////////////////////////////////////////////////////////// |
| 516 |
{ |
| 517 |
SO_UPGRADER_INIT_CLASS(SoV2MaterialIndex); |
| 518 |
SO_REGISTER_UPGRADER(MaterialIndex, 2.0); |
| 519 |
} |
| 520 |
|
| 521 |
//////////////////////////////////////////////////////////////////////// |
| 522 |
// |
| 523 |
// Description: |
| 524 |
// This initializes the SoV2VertexProperty class. |
| 525 |
// |
| 526 |
// Use: internal |
| 527 |
|
| 528 |
void |
| 529 |
SoV2VertexProperty::initClass() |
| 530 |
// |
| 531 |
//////////////////////////////////////////////////////////////////////// |
| 532 |
{ |
| 533 |
SO_UPGRADER_INIT_CLASS(SoV2VertexProperty); |
| 534 |
SO_REGISTER_UPGRADER(VertexProperty, 2.0); |
| 535 |
} |
| 536 |
|
| 537 |
//////////////////////////////////////////////////////////////////////// |
| 538 |
// |
| 539 |
// Description: |
| 540 |
// This initializes the SoV2LOD class. |
| 541 |
// |
| 542 |
// Use: internal |
| 543 |
|
| 544 |
void |
| 545 |
SoV2LOD::initClass() |
| 546 |
// |
| 547 |
//////////////////////////////////////////////////////////////////////// |
| 548 |
{ |
| 549 |
SO_UPGRADER_INIT_CLASS(SoV2LOD); |
| 550 |
SO_REGISTER_UPGRADER(LOD, 2.0); |
| 551 |
} |