- Timestamp:
- Dec 22, 2010, 11:33:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/management/src/G4VisManager.cc
r1337 r1346 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VisManager.cc,v 1.1 29 2010/06/03 10:16:11 allisonExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4VisManager.cc,v 1.131 2010/12/14 15:53:28 gcosmo Exp $ 27 // GEANT4 tag $Name: $ 28 28 // 29 29 // … … 466 466 const G4Transform3D& objectTransform) { 467 467 if (IsValidView ()) { 468 #ifdef G4DEBUG_VIS_MANAGEMENT 469 printf("G4VisManager::Draw circle\n"); 470 #endif 468 471 ClearTransientStoreIfMarked(); 469 472 fpSceneHandler -> BeginPrimitives (objectTransform); … … 476 479 const G4Transform3D& objectTransform) { 477 480 if (IsValidView ()) { 481 #ifdef G4DEBUG_VIS_MANAGEMENT 482 printf("G4VisManager::Draw nurbs\n"); 483 #endif 478 484 ClearTransientStoreIfMarked(); 479 485 fpSceneHandler -> BeginPrimitives (objectTransform); … … 486 492 const G4Transform3D& objectTransform) { 487 493 if (IsValidView ()) { 494 #ifdef G4DEBUG_VIS_MANAGEMENT 495 printf("G4VisManager::Draw polyhedron\n"); 496 #endif 488 497 ClearTransientStoreIfMarked(); 489 498 fpSceneHandler -> BeginPrimitives (objectTransform); … … 496 505 const G4Transform3D& objectTransform) { 497 506 if (IsValidView ()) { 507 #ifdef G4DEBUG_VIS_MANAGEMENT 508 printf("G4VisManager::Draw line\n"); 509 #endif 498 510 ClearTransientStoreIfMarked(); 499 511 fpSceneHandler -> BeginPrimitives (objectTransform); … … 506 518 const G4Transform3D& objectTransform) { 507 519 if (IsValidView ()) { 520 #ifdef G4DEBUG_VIS_MANAGEMENT 521 printf("G4VisManager::Draw polymarker\n"); 522 #endif 508 523 ClearTransientStoreIfMarked(); 509 524 fpSceneHandler -> BeginPrimitives (objectTransform); … … 516 531 const G4Transform3D& objectTransform) { 517 532 if (IsValidView ()) { 533 #ifdef G4DEBUG_VIS_MANAGEMENT 534 printf("G4VisManager::Draw scale\n"); 535 #endif 518 536 ClearTransientStoreIfMarked(); 519 537 fpSceneHandler -> BeginPrimitives (objectTransform); … … 526 544 const G4Transform3D& objectTransform) { 527 545 if (IsValidView ()) { 546 #ifdef G4DEBUG_VIS_MANAGEMENT 547 printf("G4VisManager::Draw square\n"); 548 #endif 528 549 ClearTransientStoreIfMarked(); 529 550 fpSceneHandler -> BeginPrimitives (objectTransform); … … 536 557 const G4Transform3D& objectTransform) { 537 558 if (IsValidView ()) { 559 #ifdef G4DEBUG_VIS_MANAGEMENT 560 printf("G4VisManager::Draw text ______________________________\n"); 561 #endif 538 562 ClearTransientStoreIfMarked(); 539 563 fpSceneHandler -> BeginPrimitives (objectTransform); … … 547 571 { 548 572 if (IsValidView()) { 573 #ifdef G4DEBUG_VIS_MANAGEMENT 574 printf("G4VisManager::Draw2d circle\n"); 575 #endif 549 576 ClearTransientStoreIfMarked(); 550 577 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 558 585 { 559 586 if (IsValidView()) { 587 #ifdef G4DEBUG_VIS_MANAGEMENT 588 printf("G4VisManager::Draw2d nurbs\n"); 589 #endif 560 590 ClearTransientStoreIfMarked(); 561 591 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 569 599 { 570 600 if (IsValidView()) { 601 #ifdef G4DEBUG_VIS_MANAGEMENT 602 printf("G4VisManager::Draw2d polyhedron\n"); 603 #endif 571 604 ClearTransientStoreIfMarked(); 572 605 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 580 613 { 581 614 if (IsValidView()) { 615 #ifdef G4DEBUG_VIS_MANAGEMENT 616 printf("G4VisManager::Draw2d line\n"); 617 #endif 582 618 ClearTransientStoreIfMarked(); 583 619 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 591 627 { 592 628 if (IsValidView()) { 629 #ifdef G4DEBUG_VIS_MANAGEMENT 630 printf("G4VisManager::Draw2d polymarker\n"); 631 #endif 593 632 ClearTransientStoreIfMarked(); 594 633 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 602 641 { 603 642 if (IsValidView()) { 643 #ifdef G4DEBUG_VIS_MANAGEMENT 644 printf("G4VisManager::Draw2d square\n"); 645 #endif 604 646 ClearTransientStoreIfMarked(); 605 647 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 613 655 { 614 656 if (IsValidView()) { 657 #ifdef G4DEBUG_VIS_MANAGEMENT 658 printf("G4VisManager::Draw2d text _____________________________\n"); 659 #endif 615 660 ClearTransientStoreIfMarked(); 616 661 fpSceneHandler -> BeginPrimitives2D(objectTransform); … … 622 667 void G4VisManager::Draw (const G4VHit& hit) { 623 668 if (IsValidView ()) { 669 #ifdef G4DEBUG_VIS_MANAGEMENT 670 printf("G4VisManager::Draw hit\n"); 671 #endif 624 672 ClearTransientStoreIfMarked(); 625 673 fpSceneHandler -> AddCompound (hit); … … 629 677 void G4VisManager::Draw (const G4VDigi& digi) { 630 678 if (IsValidView ()) { 679 #ifdef G4DEBUG_VIS_MANAGEMENT 680 printf("G4VisManager::Draw digi\n"); 681 #endif 631 682 ClearTransientStoreIfMarked(); 632 683 fpSceneHandler -> AddCompound (digi); … … 637 688 G4int i_mode) { 638 689 if (IsValidView ()) { 690 #ifdef G4DEBUG_VIS_MANAGEMENT 691 printf("G4VisManager::Draw traj\n"); 692 #endif 639 693 ClearTransientStoreIfMarked(); 640 694 fpSceneHandler -> SetModel (&dummyTrajectoriesModel); … … 649 703 // Find corresponding solid. 650 704 G4VSolid* pSol = logicalVol.GetSolid (); 705 #ifdef G4DEBUG_VIS_MANAGEMENT 706 printf("G4VisManager::Draw logicalVol\n"); 707 #endif 651 708 Draw (*pSol, attribs, objectTransform); 652 709 } … … 656 713 const G4Transform3D& objectTransform) { 657 714 if (IsValidView ()) { 715 #ifdef G4DEBUG_VIS_MANAGEMENT 716 printf("G4VisManager::Draw2d solid\n"); 717 #endif 658 718 ClearTransientStoreIfMarked(); 659 719 fpSceneHandler -> PreAddSolid (objectTransform, attribs); … … 1061 1121 } 1062 1122 } 1063 IsValidView (); // Checks. 1123 if (!IsValidView ()) { 1124 if (fVerbosity >= warnings) { 1125 G4cout << 1126 "WARNING: Problem setting scene handler - please report circumstances." 1127 << G4endl; 1128 } 1129 } 1064 1130 } 1065 1131 else { … … 1084 1150 fpScene = fpSceneHandler -> GetScene (); 1085 1151 fpGraphicsSystem = fpSceneHandler -> GetGraphicsSystem (); 1086 IsValidView (); // Checks. 1152 if (!IsValidView ()) { 1153 if (fVerbosity >= warnings) { 1154 G4cout << 1155 "WARNING: Problem setting viewer - please report circumstances." 1156 << G4endl; 1157 } 1158 } 1087 1159 } 1088 1160 … … 1345 1417 1346 1418 ClearTransientStoreIfMarked(); 1419 #ifdef G4DEBUG_VIS_MANAGEMENT 1420 printf("G4VisManager::EndOfEvent DrawEvent ---------------------\n"); 1421 #endif 1347 1422 fpSceneHandler->DrawEvent(currentEvent); 1348 1423 … … 1569 1644 else verbosity = Verbosity(intVerbosity); 1570 1645 return verbosity; 1646 } 1647 1648 G4VisManager::Verbosity G4VisManager::GetVerbosity () { 1649 return fVerbosity; 1571 1650 } 1572 1651
Note: See TracChangeset
for help on using the changeset viewer.