Changeset 688 for trunk/geant4/visualization/management
- Timestamp:
- Jan 15, 2008, 2:19:33 PM (17 years ago)
- Location:
- trunk/geant4/visualization/management
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/management/History
r632 r688 1 $Id: History,v 1.10 4 2007/11/30 14:47:30 lgarnierExp $1 $Id: History,v 1.105 2008/01/04 22:03:46 allison Exp $ 2 2 3 3 ------------------------------------------------------------------- … … 26 26 History file for visualization management sub-category 27 27 ------------------------------------------------------ 28 29 4th January 2008 John Allison (visman-V09-01-00) 30 - Implemented extended 2D interface. 28 31 29 32 30th November 2007 Laurent Garnier -
trunk/geant4/visualization/management/include/G4VSceneHandler.hh
r593 r688 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.hh,v 1. 39 2007/01/11 16:38:14allison Exp $28 // GEANT4 tag $Name: geant4-09-00-ref-01$27 // $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 164 164 // } 165 165 166 virtual void BeginPrimitives2D (); 166 virtual void BeginPrimitives2D 167 (const G4Transform3D& objectTransformation); 167 168 // The x,y coordinates of the primitives passed to AddPrimitive are 168 169 // intrepreted as screen coordinates, -1 < x,y < 1. The -
trunk/geant4/visualization/management/include/G4VisManager.hh
r593 r688 25 25 // 26 26 // 27 // $Id: G4VisManager.hh,v 1.6 7 2007/07/10 17:49:27allison Exp $28 // GEANT4 tag $Name: geant4-09-00-ref-01$27 // $Id: G4VisManager.hh,v 1.68 2008/01/04 22:03:46 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 250 250 const G4Transform3D& objectTransformation = G4Transform3D()); 251 251 252 void Draw2D (const G4Text&); 252 virtual void Draw2D (const G4Circle&, 253 const G4Transform3D& objectTransformation = G4Transform3D()); 254 255 virtual void Draw2D (const G4NURBS&, 256 const G4Transform3D& objectTransformation = G4Transform3D()); 257 258 virtual void Draw2D (const G4Polyhedron&, 259 const G4Transform3D& objectTransformation = G4Transform3D()); 260 261 virtual void Draw2D (const G4Polyline&, 262 const G4Transform3D& objectTransformation = G4Transform3D()); 263 264 virtual void Draw2D (const G4Polymarker&, 265 const G4Transform3D& objectTransformation = G4Transform3D()); 266 267 virtual void Draw2D (const G4Square&, 268 const G4Transform3D& objectTransformation = G4Transform3D()); 269 270 virtual void Draw2D (const G4Text&, 271 const G4Transform3D& objectTransformation = G4Transform3D()); 253 272 254 273 //////////////////////////////////////////////////////////////////// -
trunk/geant4/visualization/management/src/G4VSceneHandler.cc
r593 r688 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.cc,v 1.8 2 2007/05/16 15:47:44allison Exp $28 // GEANT4 tag $Name: geant4-09-00-ref-01$27 // $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 159 159 } 160 160 161 void G4VSceneHandler::BeginPrimitives2D () { 161 void G4VSceneHandler::BeginPrimitives2D 162 (const G4Transform3D& objectTransformation) { 162 163 fNestingDepth++; 163 164 if (fNestingDepth > 1) 164 165 G4Exception("G4VSceneHandler::BeginPrimitives2D: Nesting detected." 165 166 "\n It is illegal to nest Begin/EndPrimitives."); 166 // Not actually required for 2D operations but some drivers do an 167 // initial transformation... 168 fpObjectTransformation = &fIdentityTransformation; 167 fpObjectTransformation = &objectTransformation; 169 168 } 170 169 -
trunk/geant4/visualization/management/src/G4VisManager.cc
r632 r688 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VisManager.cc,v 1.11 4 2007/11/10 14:59:46 allison Exp $26 // $Id: G4VisManager.cc,v 1.115 2008/01/04 22:03:46 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 505 505 } 506 506 507 void G4VisManager::Draw2D (const G4Text& text) 507 void G4VisManager::Draw2D (const G4Circle& circle, 508 const G4Transform3D& objectTransform) 508 509 { 509 510 if (IsValidView()) { 510 511 ClearTransientStoreIfMarked(); 511 fpSceneHandler -> BeginPrimitives2D(); 512 fpSceneHandler -> BeginPrimitives2D(objectTransform); 513 fpSceneHandler -> AddPrimitive(circle); 514 fpSceneHandler -> EndPrimitives2D(); 515 } 516 } 517 518 void G4VisManager::Draw2D (const G4NURBS& nurbs, 519 const G4Transform3D& objectTransform) 520 { 521 if (IsValidView()) { 522 ClearTransientStoreIfMarked(); 523 fpSceneHandler -> BeginPrimitives2D(objectTransform); 524 fpSceneHandler -> AddPrimitive(nurbs); 525 fpSceneHandler -> EndPrimitives2D(); 526 } 527 } 528 529 void G4VisManager::Draw2D (const G4Polyhedron& polyhedron, 530 const G4Transform3D& objectTransform) 531 { 532 if (IsValidView()) { 533 ClearTransientStoreIfMarked(); 534 fpSceneHandler -> BeginPrimitives2D(objectTransform); 535 fpSceneHandler -> AddPrimitive(polyhedron); 536 fpSceneHandler -> EndPrimitives2D(); 537 } 538 } 539 540 void G4VisManager::Draw2D (const G4Polyline& line, 541 const G4Transform3D& objectTransform) 542 { 543 if (IsValidView()) { 544 ClearTransientStoreIfMarked(); 545 fpSceneHandler -> BeginPrimitives2D(objectTransform); 546 fpSceneHandler -> AddPrimitive(line); 547 fpSceneHandler -> EndPrimitives2D(); 548 } 549 } 550 551 void G4VisManager::Draw2D (const G4Polymarker& polymarker, 552 const G4Transform3D& objectTransform) 553 { 554 if (IsValidView()) { 555 ClearTransientStoreIfMarked(); 556 fpSceneHandler -> BeginPrimitives2D(objectTransform); 557 fpSceneHandler -> AddPrimitive(polymarker); 558 fpSceneHandler -> EndPrimitives2D(); 559 } 560 } 561 562 void G4VisManager::Draw2D (const G4Square& square, 563 const G4Transform3D& objectTransform) 564 { 565 if (IsValidView()) { 566 ClearTransientStoreIfMarked(); 567 fpSceneHandler -> BeginPrimitives2D(objectTransform); 568 fpSceneHandler -> AddPrimitive(square); 569 fpSceneHandler -> EndPrimitives2D(); 570 } 571 } 572 573 void G4VisManager::Draw2D (const G4Text& text, 574 const G4Transform3D& objectTransform) 575 { 576 if (IsValidView()) { 577 ClearTransientStoreIfMarked(); 578 fpSceneHandler -> BeginPrimitives2D(objectTransform); 512 579 fpSceneHandler -> AddPrimitive(text); 513 580 fpSceneHandler -> EndPrimitives2D();
Note: See TracChangeset
for help on using the changeset viewer.