![]() |
![]() |
#include "VisGeant4/VisG4Volumes/interface/VisG4VolumeTwig.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4Navigator.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4VolumePicker.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialFilter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialCacheFilter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialMiscFilter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialDensityFilter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialFalseColorFilter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4Filter.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4FilterCache.h"
#include "VisGeant4/VisG4Volumes/interface/VisG4MaterialNameFilter.h"
#include "VisGeant4/VisG4Volumes/interface/xtypeinfo.h"
#include "VisGeant4/VisG4Core/interface/VisG4Path.h"
#include "VisGeant4/VisG4Core/interface/VisG4VisSceneHandler.h"
#include "Iguana/GLModels/interface/IgCommon3DReps.h"
#include "Iguana/GLModels/interface/Ig3DModel.h"
#include "Iguana/GLModels/interface/Ig3DRep.h"
#include "Iguana/GLModels/interface/IgRPhiModel.h"
#include "Iguana/GLModels/interface/IgRPhiRep.h"
#include "Iguana/GLModels/interface/IgRZModel.h"
#include "Iguana/GLModels/interface/IgRZRep.h"
#include "Iguana/GLModels/interface/xtypeinfo.h"
#include "Iguana/Models/interface/IgTextModel.h"
#include "Iguana/Models/interface/IgSimpleTextRep.h"
#include "Iguana/Models/interface/xtypeinfo.h"
#include "Iguana/Framework/interface/IgRepContext.h"
#include "Iguana/Framework/interface/IgRepSet.h"
#include "Iguana/Framework/interface/IgBrowserMethods.h"
#include "Iguana/Framework/interface/xtypeinfo.h"
#include <classlib/utils/DebugAids.h>
#include <classlib/utils/Log.h>
#include <Inventor/nodes/SoMaterial.h>
#include <G4ModelingParameters.hh>
#include <G4VPhysicalVolume.hh>
#include <G4LogicalVolume.hh>
#include <G4VisAttributes.hh>
#include <G4Material.hh>
#include <G4VSensitiveDetector.hh>
#include <G4VSolid.hh>
#include <G4Box.hh>
#include <G4Cons.hh>
#include <G4Polycone.hh>
#include <G4Polyhedra.hh>
#include <G4Torus.hh>
#include <G4Trap.hh>
#include <G4Trd.hh>
#include <G4Tubs.hh>
#include <sstream>
Go to the source code of this file.
Functions | |
void | drawSolidParts (VisG4VisSceneHandler *handler, G4VSolid *solid, int depth=0) |
void | drawVolumeTwig (VisG4VolumeTwig *twig, IgRZRep *rep) |
void | drawVolumeTwig (VisG4VolumeTwig *twig, IgRPhiRep *rep) |
void | drawVolumeTwig (VisG4VolumeTwig *twig, Ig3DRep *rep) |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4VolumeTwig *twig, IgTextRep *rep, unsigned)) | |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4VolumeTwig *twig, IgRZRep *rep, unsigned mask)) | |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4VolumeTwig *twig, IgRPhiRep *rep, unsigned mask)) | |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4VolumeTwig *twig, Ig3DRep *rep, unsigned mask)) | |
Variables | |
lat::logflag | LFG4vis |
void drawSolidParts | ( | VisG4VisSceneHandler * | handler, | |
G4VSolid * | solid, | |||
int | depth = 0 | |||
) |
Definition at line 295 of file VisG4VolumeTwig.cc.
00296 { 00297 G4VSolid *b0, *b1; 00298 00299 if ((b0 = solid->GetConstituentSolid (0))) 00300 { 00301 VERIFY (b1 = solid->GetConstituentSolid (1)); 00302 drawSolidParts (handler, b0, depth+1); 00303 drawSolidParts (handler, b1, depth+1); 00304 } 00305 00306 if (depth > 0) 00307 solid->DescribeYourselfTo (*handler); 00308 }
void drawVolumeTwig | ( | VisG4VolumeTwig * | twig, | |
IgRZRep * | rep | |||
) |
Definition at line 499 of file VisG4VolumeTwig.cc.
References VisG4VisSceneHandler::addMaterial(), VisG4VisSceneHandler::addStyle(), VisG4VisSceneHandler::addTransform(), VisG4VolumePicker::apply(), ASSERT, VisG4VisSceneHandler::beginObject(), Ig3DBaseRep::clear(), bookConverter::compute(), VisG4VisSceneHandler::defineBounds(), VisG4VisSceneHandler::endObject(), IgTwig::fullName(), i, VisG4VisSceneHandler::instance(), lv, Ig3DBaseRep::node(), IgTwig::parent(), VisG4VolumeTwig::path(), VisG4VolumeTwig::paths(), pv, IgTwig::root(), VisG4VolumeTwig::volume(), and x.
00500 { 00501 00502 // Process each path assigned to the twig. We create exactly one 00503 // SoSeparator for each path so it is easy to correlate the two 00504 // later on. Note that the volume has a separate path for each 00505 // replica associated with it, not just path for every physical 00506 // volume copy. 00507 00508 // Render the twig. We create a temporary volume model and render 00509 // that to our special scene handler. FIXME: Check that G4 thread 00510 // is available! NB: This is executed in the GUI thread. 00511 00512 // Zap any existing representations 00513 rep->clear (); 00514 00515 // Dig out some common variables. 00516 VisG4VolumeTwig *root = twig; 00517 while (VisG4VolumeTwig *x = dynamic_cast<VisG4VolumeTwig *> (root->parent())) 00518 root = x; 00519 00520 VisG4VisSceneHandler *handler = VisG4VisSceneHandler::instance (); 00521 G4VPhysicalVolume *volume = root->volume (); 00522 00523 ASSERT (handler); 00524 ASSERT (volume); 00525 ASSERT (root); 00526 00527 // FIXME: This isn't really true -- there could be something else 00528 // in the view volume beyond the volumes. At the moment we need 00529 // this only for G4Scale and markers, neither of which are likely 00530 // to be used, so this isn't a catastrophy. Need to rethink this 00531 // part entirely. (FIXME: Move to geometry update?) 00532 handler->defineBounds (volume->GetLogicalVolume () 00533 ->GetSolid ()->GetExtent ()); 00534 00535 for (unsigned i = 0; i < twig->paths (); ++i) 00536 { 00537 bool replica = false; 00538 G4VPhysicalVolume *pv = volume; 00539 G4LogicalVolume *lv = 0; 00540 G4VSolid *solid = 0; 00541 G4Transform3D pos; 00542 00543 VisG4VolumePicker::apply (twig->path (i), pv, lv, solid, pos, replica); 00544 00545 ASSERT (solid); 00546 ASSERT (pv); 00547 ASSERT (lv); 00548 00549 // Create a VisSoMaterialDetails structure which describes the current twig 00550 VisSoMaterialDetails details; 00551 details << VisG4MaterialDetails (lv->GetMaterial ()); 00552 details << VisG4PVDetails (pv); 00553 details << VisG4PathDetails (twig->fullName ()); 00554 00555 // Skip if the filter rejects 00556 if (VisG4VolumeTwig::m_visualizationFilter 00557 && ! VisG4VolumeTwig::m_visualizationFilter->compute (details)) 00558 continue; 00559 00560 SoSeparator *sep = new SoSeparator; 00561 rep->node ()->addChild (sep); 00562 00563 // Set object context. 00564 handler->beginObject (sep, replica ? 0 : pv); 00565 00566 // Add transformation for this object. 00567 handler->addTransform (pos); 00568 00569 // To show boolean constituents in white wireframe: 00570 // handler->AddStyle (G4ViewParameters::wireframe); 00571 // handler->AddMaterial (G4Colour (1., 1., 1., 1.)); 00572 // drawSolidParts (handler, solid); 00573 00574 // Add colour and styles. (FIXME: Move to and use a real 00575 // visualisation preferences service, and make it cache 00576 // materials and other style information as much as possible 00577 // -- switching materials is very bad for render performance, 00578 // and what's worse, we tend to reuse the same material lot.) 00579 handler->addStyle (lv->GetVisAttributes ()); 00580 00581 // Get the G4 material and check if there is a SoMaterial already in the cache. 00582 handler->addMaterial (VisG4VolumeTwig::m_materialFilter->getSoMaterial (details, 0)); 00583 00584 // Draw the solid itself. 00585 solid->DescribeYourselfTo (*handler); 00586 00587 // Quit object context. 00588 handler->endObject (); 00589 } 00590 }
void drawVolumeTwig | ( | VisG4VolumeTwig * | twig, | |
IgRPhiRep * | rep | |||
) |
Definition at line 405 of file VisG4VolumeTwig.cc.
References VisG4VisSceneHandler::addMaterial(), VisG4VisSceneHandler::addStyle(), VisG4VisSceneHandler::addTransform(), VisG4VolumePicker::apply(), ASSERT, VisG4VisSceneHandler::beginObject(), Ig3DBaseRep::clear(), bookConverter::compute(), VisG4VisSceneHandler::defineBounds(), VisG4VisSceneHandler::endObject(), IgTwig::fullName(), i, VisG4VisSceneHandler::instance(), lv, Ig3DBaseRep::node(), IgTwig::parent(), VisG4VolumeTwig::path(), VisG4VolumeTwig::paths(), pv, IgTwig::root(), VisG4VolumeTwig::volume(), and x.
00406 { 00407 00408 // Process each path assigned to the twig. We create exactly one 00409 // SoSeparator for each path so it is easy to correlate the two 00410 // later on. Note that the volume has a separate path for each 00411 // replica associated with it, not just path for every physical 00412 // volume copy. 00413 00414 // Render the twig. We create a temporary volume model and render 00415 // that to our special scene handler. FIXME: Check that G4 thread 00416 // is available! NB: This is executed in the GUI thread. 00417 00418 // Zap any existing representations 00419 rep->clear (); 00420 00421 // Dig out some common variables. 00422 VisG4VolumeTwig *root = twig; 00423 while (VisG4VolumeTwig *x = dynamic_cast<VisG4VolumeTwig *> (root->parent())) 00424 root = x; 00425 00426 VisG4VisSceneHandler *handler = VisG4VisSceneHandler::instance (); 00427 G4VPhysicalVolume *volume = root->volume (); 00428 00429 ASSERT (handler); 00430 ASSERT (volume); 00431 ASSERT (root); 00432 00433 // FIXME: This isn't really true -- there could be something else 00434 // in the view volume beyond the volumes. At the moment we need 00435 // this only for G4Scale and markers, neither of which are likely 00436 // to be used, so this isn't a catastrophy. Need to rethink this 00437 // part entirely. (FIXME: Move to geometry update?) 00438 handler->defineBounds (volume->GetLogicalVolume () 00439 ->GetSolid ()->GetExtent ()); 00440 00441 for (unsigned i = 0; i < twig->paths (); ++i) 00442 { 00443 bool replica = false; 00444 G4VPhysicalVolume *pv = volume; 00445 G4LogicalVolume *lv = 0; 00446 G4VSolid *solid = 0; 00447 G4Transform3D pos; 00448 00449 VisG4VolumePicker::apply (twig->path (i), pv, lv, solid, pos, replica); 00450 00451 ASSERT (solid); 00452 ASSERT (pv); 00453 ASSERT (lv); 00454 00455 // Create a VisSoMaterialDetails structure which describes the current twig 00456 VisSoMaterialDetails details; 00457 details << VisG4MaterialDetails (lv->GetMaterial ()); 00458 details << VisG4PVDetails (pv); 00459 details << VisG4PathDetails (twig->fullName ()); 00460 00461 // Skip if the filter rejects 00462 if (VisG4VolumeTwig::m_visualizationFilter 00463 && ! VisG4VolumeTwig::m_visualizationFilter->compute (details)) 00464 continue; 00465 00466 SoSeparator *sep = new SoSeparator; 00467 rep->node ()->addChild (sep); 00468 00469 // Set object context. 00470 handler->beginObject (sep, replica ? 0 : pv); 00471 00472 // Add transformation for this object. 00473 handler->addTransform (pos); 00474 00475 // To show boolean constituents in white wireframe: 00476 // handler->AddStyle (G4ViewParameters::wireframe); 00477 // handler->AddMaterial (G4Colour (1., 1., 1., 1.)); 00478 // drawSolidParts (handler, solid); 00479 00480 // Add colour and styles. (FIXME: Move to and use a real 00481 // visualisation preferences service, and make it cache 00482 // materials and other style information as much as possible 00483 // -- switching materials is very bad for render performance, 00484 // and what's worse, we tend to reuse the same material lot.) 00485 handler->addStyle (lv->GetVisAttributes ()); 00486 00487 // Get the G4 material and check if there is a SoMaterial already in the cache. 00488 handler->addMaterial (VisG4VolumeTwig::m_materialFilter->getSoMaterial (details, 0)); 00489 00490 // Draw the solid itself. 00491 solid->DescribeYourselfTo (*handler); 00492 00493 // Quit object context. 00494 handler->endObject (); 00495 } 00496 }
void drawVolumeTwig | ( | VisG4VolumeTwig * | twig, | |
Ig3DRep * | rep | |||
) |
Definition at line 311 of file VisG4VolumeTwig.cc.
References VisG4VisSceneHandler::addMaterial(), VisG4VisSceneHandler::addStyle(), VisG4VisSceneHandler::addTransform(), VisG4VolumePicker::apply(), ASSERT, VisG4VisSceneHandler::beginObject(), Ig3DBaseRep::clear(), bookConverter::compute(), VisG4VisSceneHandler::defineBounds(), VisG4VisSceneHandler::endObject(), IgTwig::fullName(), i, VisG4VisSceneHandler::instance(), lv, Ig3DBaseRep::node(), IgTwig::parent(), VisG4VolumeTwig::path(), VisG4VolumeTwig::paths(), pv, IgTwig::root(), VisG4VolumeTwig::volume(), and x.
Referenced by MMM_DEFUN_FUNC().
00312 { 00313 00314 // Process each path assigned to the twig. We create exactly one 00315 // SoSeparator for each path so it is easy to correlate the two 00316 // later on. Note that the volume has a separate path for each 00317 // replica associated with it, not just path for every physical 00318 // volume copy. 00319 00320 // Render the twig. We create a temporary volume model and render 00321 // that to our special scene handler. FIXME: Check that G4 thread 00322 // is available! NB: This is executed in the GUI thread. 00323 00324 // Zap any existing representations 00325 rep->clear (); 00326 00327 // Dig out some common variables. 00328 VisG4VolumeTwig *root = twig; 00329 while (VisG4VolumeTwig *x = dynamic_cast<VisG4VolumeTwig *> (root->parent())) 00330 root = x; 00331 00332 VisG4VisSceneHandler *handler = VisG4VisSceneHandler::instance (); 00333 G4VPhysicalVolume *volume = root->volume (); 00334 00335 ASSERT (handler); 00336 ASSERT (volume); 00337 ASSERT (root); 00338 00339 // FIXME: This isn't really true -- there could be something else 00340 // in the view volume beyond the volumes. At the moment we need 00341 // this only for G4Scale and markers, neither of which are likely 00342 // to be used, so this isn't a catastrophy. Need to rethink this 00343 // part entirely. (FIXME: Move to geometry update?) 00344 handler->defineBounds (volume->GetLogicalVolume () 00345 ->GetSolid ()->GetExtent ()); 00346 00347 for (unsigned i = 0; i < twig->paths (); ++i) 00348 { 00349 bool replica = false; 00350 G4VPhysicalVolume *pv = volume; 00351 G4LogicalVolume *lv = 0; 00352 G4VSolid *solid = 0; 00353 G4Transform3D pos; 00354 00355 VisG4VolumePicker::apply (twig->path (i), pv, lv, solid, pos, replica); 00356 00357 ASSERT (solid); 00358 ASSERT (pv); 00359 ASSERT (lv); 00360 00361 // Create a VisSoMaterialDetails structure which describes the current twig 00362 VisSoMaterialDetails details; 00363 details << VisG4MaterialDetails (lv->GetMaterial ()); 00364 details << VisG4PVDetails (pv); 00365 details << VisG4PathDetails (twig->fullName ()); 00366 00367 // Skip if the filter rejects 00368 if (VisG4VolumeTwig::m_visualizationFilter 00369 && ! VisG4VolumeTwig::m_visualizationFilter->compute (details)) 00370 continue; 00371 00372 SoSeparator *sep = new SoSeparator; 00373 rep->node ()->addChild (sep); 00374 00375 // Set object context. 00376 handler->beginObject (sep, replica ? 0 : pv); 00377 00378 // Add transformation for this object. 00379 handler->addTransform (pos); 00380 00381 // To show boolean constituents in white wireframe: 00382 // handler->AddStyle (G4ViewParameters::wireframe); 00383 // handler->AddMaterial (G4Colour (1., 1., 1., 1.)); 00384 // drawSolidParts (handler, solid); 00385 00386 // Add colour and styles. (FIXME: Move to and use a real 00387 // visualisation preferences service, and make it cache 00388 // materials and other style information as much as possible 00389 // -- switching materials is very bad for render performance, 00390 // and what's worse, we tend to reuse the same material lot.) 00391 handler->addStyle (lv->GetVisAttributes ()); 00392 00393 // Get the G4 material and check if there is a SoMaterial already in the cache. 00394 handler->addMaterial (VisG4VolumeTwig::m_materialFilter->getSoMaterial (details, 0)); 00395 00396 // Draw the solid itself. 00397 solid->DescribeYourselfTo (*handler); 00398 00399 // Quit object context. 00400 handler->endObject (); 00401 } 00402 }
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4VolumeTwig *twig, IgTextRep *rep, unsigned) | ||||
) |
Definition at line 643 of file VisG4VolumeTwig.cc.
References g, i, lv, r, IgTextRep::setText(), t, and VisG4VolumeTwig::volume().
00645 { 00646 // FIXME: HTML-quote text! 00647 // FIXME: Add physical volume information 00648 G4LogicalVolume *lv = twig->volume ()->GetLogicalVolume (); 00649 G4VSolid *solid = lv->GetSolid (); 00650 G4Material *material = lv->GetMaterial (); 00651 G4RotationMatrix *r = twig->volume ()->GetRotation (); 00652 G4ThreeVector t = twig->volume ()->GetTranslation (); 00653 00654 std::ostringstream text; 00655 00656 text << "<table width='100%'><tr><td>Name</td><td>" 00657 << lv->GetName () 00658 << "</td><tr><td>Copy #</td><td>" 00659 << twig->volume ()->GetCopyNo () 00660 << "</td><tr><td>Replicated</td><td>" 00661 << (twig->volume ()->IsReplicated () ? "Yes" : "No") 00662 // FIXME: show parametrisation info 00663 00664 << "</td><tr><td>Position</td><td>" 00665 << "(" << t.x () << ", " << t.y () << ", " << t.z () << ")" 00666 << "</td><tr><td>Rotation</td><td>"; 00667 00668 if (r) 00669 r->print (text); 00670 else 00671 text << "(None)"; 00672 00673 text << "</td><tr><td>Material</td><td>" 00674 << (material ? material->GetName () : G4String ("(None)")) 00675 << "</td></tr><tr><td>Density</td><td>" 00676 << (material ? material->GetDensity () / g*cm*cm*cm : 0.) 00677 << "</td></tr><tr><td>Sensitive</td><td>" 00678 << (lv->GetSensitiveDetector () 00679 ? lv->GetSensitiveDetector ()->GetFullPathName () 00680 : G4String ("(not sensitive)")) 00681 << "</td></tr><tr><td>Solid Type</td><td>" 00682 << solid->GetEntityType () 00683 << "</td></tr><tr><td>Solid Name</td><td>" 00684 << solid->GetName () 00685 << "</td></tr><tr><td>Solid Parameters</td><td> </td></tr>"; 00686 00687 // FIXME: This should be encapsulated, and use something like 00688 // Martin Liendl's SolidAnalyser or (why not?) a multimethod. 00689 if (G4Box *box = dynamic_cast<G4Box *> (solid)) 00690 text << "<tr><td> x/2</td><td>" 00691 << box->GetXHalfLength () << "</td></tr>" 00692 << "<tr><td> y/2</td><td>" 00693 << box->GetYHalfLength () << "</td></tr>" 00694 << "<tr><td> z/2</td><td>" 00695 << box->GetZHalfLength () << "</td></tr>"; 00696 else if (G4Cons *cons = dynamic_cast<G4Cons *> (solid)) 00697 text << "<tr><td> z/2</td><td>" 00698 << cons->GetZHalfLength () << "</td></tr>" 00699 << "<tr><td> rInZ-</td><td>" 00700 << cons->GetInnerRadiusMinusZ () << "</td></tr>" 00701 << "<tr><td> rInZ+</td><td>" 00702 << cons->GetInnerRadiusPlusZ () << "</td></tr>" 00703 << "<tr><td> rOutZ-</td><td>" 00704 << cons->GetOuterRadiusMinusZ () << "</td></tr>" 00705 << "<tr><td> rOutZ+</td><td>" 00706 << cons->GetOuterRadiusPlusZ () << "</td></tr>" 00707 << "<tr><td> startPhi</td><td>" 00708 << cons->GetStartPhiAngle () << "</td></tr>" 00709 << "<tr><td> deltaPhi</td><td>" 00710 << cons->GetDeltaPhiAngle () << "</td></tr>"; 00711 else if (G4Polycone *pcon = dynamic_cast<G4Polycone *> (solid)) 00712 { 00713 int nr = pcon->GetNumRZCorner(); 00714 text << "<tr><td> startPhi</td><td>" 00715 << pcon->GetStartPhi () << "</td></tr>" 00716 << "<tr><td> endPhi</td><td>" 00717 << pcon->GetEndPhi () << "</td></tr>" 00718 << "<tr><td> nrRZ</td><td>" 00719 << nr << "</td></tr>"; 00720 00721 for (int i = 0; i < nr; ++i) 00722 text << "<tr><td> z" << i << "</td><td>" 00723 << pcon->GetCorner (i).z << "</td></tr>" 00724 << "<tr><td> r" << i << "</td><td>" 00725 << pcon->GetCorner (i).r << "</td></tr>"; 00726 } 00727 else if (G4Polyhedra *phed = dynamic_cast<G4Polyhedra *> (solid)) 00728 { 00729 int nr = phed->GetNumRZCorner(); 00730 text << "<tr><td> startPhi</td><td>" 00731 << phed->GetStartPhi () << "</td></tr>" 00732 << "<tr><td> endPhi</td><td>" 00733 << phed->GetEndPhi () << "</td></tr>" 00734 << "<tr><td> sides</td><td>" 00735 << phed->GetNumSide () << "</td></tr>" 00736 << "<tr><td> nrRZ</td><td>" 00737 << nr << "</td></tr>"; 00738 00739 for (int i = 0; i < nr; ++i) 00740 text << "<tr><td> z" << i << "</td><td>" 00741 << phed->GetCorner (i).z << "</td></tr>" 00742 << "<tr><td> r" << i << "</td><td>" 00743 << phed->GetCorner (i).r << "</td></tr>"; 00744 } 00745 else if (G4Torus *torus = dynamic_cast<G4Torus *> (solid)) 00746 text << "<tr><td> R min</td><td>" 00747 << torus->GetRmin () << "</td></tr>" 00748 << "<tr><td> R max</td><td>" 00749 << torus->GetRmax () << "</td></tr>" 00750 << "<tr><td> R tor</td><td>" 00751 << torus->GetRtor () << "</td></tr>" 00752 << "<tr><td> start Phi (radians)</td><td>" 00753 << torus->GetSPhi () << "</td></tr>" 00754 << "<tr><td> Delta angle of the segment (radians)</td><td>" 00755 << torus->GetDPhi () << "</td></tr>"; 00756 else if (G4Trap *trap = dynamic_cast<G4Trap *> (solid)) 00757 text << "<tr><td> z/2</td><td>" 00758 << trap->GetZHalfLength () << "</td></tr>" 00759 << "<tr><td> x1/2</td><td>" 00760 << trap->GetXHalfLength1 () << "</td></tr>" 00761 << "<tr><td> x2/2</td><td>" 00762 << trap->GetXHalfLength2 () << "</td></tr>" 00763 << "<tr><td> y1/2</td><td>" 00764 << trap->GetYHalfLength1 () << "</td></tr>" 00765 << "<tr><td> tanAlpha_1</td><td>" 00766 << trap->GetTanAlpha1 () << "</td></tr>" 00767 << "<tr><td> x3/2</td><td>" 00768 << trap->GetXHalfLength3 () << "</td></tr>" 00769 << "<tr><td> x4/2</td><td>" 00770 << trap->GetXHalfLength4 () << "</td></tr>" 00771 << "<tr><td> y2/2</td><td>" 00772 << trap->GetYHalfLength2 () << "</td></tr>" 00773 << "<tr><td> tanAlpha_2</td><td>" 00774 << trap->GetTanAlpha2 () << "</td></tr>"; 00775 else if (G4Trd *trd = dynamic_cast<G4Trd *> (solid)) 00776 text << "<tr><td> z/2</td><td>" 00777 << trd->GetZHalfLength () << "</td></tr>" 00778 00779 << "<tr><td> x1/2</td><td>" 00780 << trd->GetXHalfLength1 () << "</td></tr>" 00781 << "<tr><td> x2/2</td><td>" 00782 << trd->GetXHalfLength2 () << "</td></tr>" 00783 << "<tr><td> y1/2</td><td>" 00784 << trd->GetYHalfLength1 () << "</td></tr>" 00785 << "<tr><td> y2/2</td><td>" 00786 << trd->GetYHalfLength2 () << "</td></tr>"; 00787 else if (G4Tubs *tubs = dynamic_cast<G4Tubs *> (solid)) 00788 text << "<tr><td> z/2</td><td>" 00789 << tubs->GetZHalfLength () << "</td></tr>" 00790 << "<tr><td> rIn</td><td>" 00791 << tubs->GetInnerRadius () << "</td></tr>" 00792 << "<tr><td> rOut</td><td>" 00793 << tubs->GetOuterRadius () << "</td></tr>" 00794 << "<tr><td> startPhi</td><td>" 00795 << tubs->GetStartPhiAngle () << "</td></tr>" 00796 << "<tr><td> deltaPhi</td><td>" 00797 << tubs->GetDeltaPhiAngle () << "</td></tr>"; 00798 else 00799 text << "<tr><td> (not known)</td><td> </td></tr>"; 00800 00801 text << "</table>"; 00802 00803 rep->setText (text.str ()); 00804 }
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4VolumeTwig *twig, IgRZRep *rep, unsigned mask) | ||||
) |
Definition at line 626 of file VisG4VolumeTwig.cc.
References drawVolumeTwig(), IgTwig::FLAGS_MASK, Ig3DBaseRep::node(), IgTwig::SELF_MASK, and IgTwig::visible().
00628 { 00629 // Do most of the hard work in the base class implementation. 00630 mmm_doUpdate ((IgTwig *) twig, rep, mask); 00631 00632 // Skip the update if possible. We only render if the object is 00633 // visible, and either SELF_MASK is set (object was changed), or 00634 // if FLAGS_MASK is set and the rep has no content (either never 00635 // created or zapped). 00636 if (twig->visible () && 00637 (((mask & IgTwig::FLAGS_MASK) 00638 && rep->node ()->getNumChildren () == 0) 00639 || (mask & IgTwig::SELF_MASK))) 00640 drawVolumeTwig (twig, rep); 00641 }
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4VolumeTwig *twig, IgRPhiRep *rep, unsigned mask) | ||||
) |
Definition at line 609 of file VisG4VolumeTwig.cc.
References drawVolumeTwig(), IgTwig::FLAGS_MASK, Ig3DBaseRep::node(), IgTwig::SELF_MASK, and IgTwig::visible().
00611 { 00612 // Do most of the hard work in the base class implementation. 00613 mmm_doUpdate ((IgTwig *) twig, rep, mask); 00614 00615 // Skip the update if possible. We only render if the object is 00616 // visible, and either SELF_MASK is set (object was changed), or 00617 // if FLAGS_MASK is set and the rep has no content (either never 00618 // created or zapped). 00619 if (twig->visible () && 00620 (((mask & IgTwig::FLAGS_MASK) 00621 && rep->node ()->getNumChildren () == 0) 00622 || (mask & IgTwig::SELF_MASK))) 00623 drawVolumeTwig (twig, rep); 00624 }
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4VolumeTwig *twig, Ig3DRep *rep, unsigned mask) | ||||
) |
Definition at line 592 of file VisG4VolumeTwig.cc.
References drawVolumeTwig(), IgTwig::FLAGS_MASK, Ig3DBaseRep::node(), IgTwig::SELF_MASK, and IgTwig::visible().
00594 { 00595 // Do most of the hard work in the base class implementation. 00596 mmm_doUpdate ((IgTwig *) twig, rep, mask); 00597 00598 // Skip the update if possible. We only render if the object is 00599 // visible, and either SELF_MASK is set (object was changed), or 00600 // if FLAGS_MASK is set and the rep has no content (either never 00601 // created or zapped). 00602 if (twig->visible () && 00603 (((mask & IgTwig::FLAGS_MASK) 00604 && rep->node ()->getNumChildren () == 0) 00605 || (mask & IgTwig::SELF_MASK))) 00606 drawVolumeTwig (twig, rep); 00607 }