Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VTreeSceneHandler Class Reference

#include <G4VTreeSceneHandler.hh>

+ Inheritance diagram for G4VTreeSceneHandler:

Public Member Functions

 G4VTreeSceneHandler (G4VGraphicsSystem &system, const G4String &name)
 
virtual ~G4VTreeSceneHandler ()
 
void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
void PostAddSolid ()
 
virtual void AddPrimitive (const G4Polyline &)
 
virtual void AddPrimitive (const G4Text &)
 
virtual void AddPrimitive (const G4Circle &)
 
virtual void AddPrimitive (const G4Square &)
 
virtual void AddPrimitive (const G4Polyhedron &)
 
virtual void AddPrimitive (const G4Polymarker &)
 
virtual void BeginModeling ()
 
virtual void EndModeling ()
 
virtual void AddPrimitive (const G4Plotter &)
 
- Public Member Functions inherited from G4VSceneHandler
 G4VSceneHandler (G4VGraphicsSystem &system, G4int id, const G4String &name="")
 
virtual ~G4VSceneHandler ()
 
virtual void AddSolid (const G4Box &)
 
virtual void AddSolid (const G4Cons &)
 
virtual void AddSolid (const G4Orb &)
 
virtual void AddSolid (const G4Para &)
 
virtual void AddSolid (const G4Sphere &)
 
virtual void AddSolid (const G4Torus &)
 
virtual void AddSolid (const G4Trap &)
 
virtual void AddSolid (const G4Trd &)
 
virtual void AddSolid (const G4Tubs &)
 
virtual void AddSolid (const G4Ellipsoid &)
 
virtual void AddSolid (const G4Polycone &)
 
virtual void AddSolid (const G4Polyhedra &)
 
virtual void AddSolid (const G4TessellatedSolid &)
 
virtual void AddSolid (const G4VSolid &)
 
virtual void AddCompound (const G4VTrajectory &)
 
virtual void AddCompound (const G4VHit &)
 
virtual void AddCompound (const G4VDigi &)
 
virtual void AddCompound (const G4THitsMap< G4double > &)
 
virtual void AddCompound (const G4THitsMap< G4StatDouble > &)
 
virtual void AddCompound (const G4Mesh &)
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation=G4Transform3D())
 
virtual void EndPrimitives ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation=G4Transform3D())
 
virtual void EndPrimitives2D ()
 
virtual const G4VisExtentGetExtent () const
 
const G4StringGetName () const
 
G4int GetSceneHandlerId () const
 
G4int GetViewCount () const
 
G4VGraphicsSystemGetGraphicsSystem () const
 
G4SceneGetScene () const
 
const G4ViewerListGetViewerList () const
 
G4VModelGetModel () const
 
G4VViewerGetCurrentViewer () const
 
G4bool GetMarkForClearingTransientStore () const
 
G4bool IsReadyForTransients () const
 
G4bool GetTransientsDrawnThisEvent () const
 
G4bool GetTransientsDrawnThisRun () const
 
const G4Transform3DGetObjectTransformation () const
 
void SetName (const G4String &)
 
void SetCurrentViewer (G4VViewer *)
 
virtual void SetScene (G4Scene *)
 
G4ViewerListSetViewerList ()
 
void SetModel (G4VModel *)
 
void SetMarkForClearingTransientStore (G4bool)
 
void SetTransientsDrawnThisEvent (G4bool)
 
void SetTransientsDrawnThisRun (G4bool)
 
void SetObjectTransformation (const G4Transform3D &)
 
const G4ColourGetColour ()
 
const G4ColourGetColor ()
 
const G4ColourGetColour (const G4Visible &)
 
const G4ColourGetColor (const G4Visible &)
 
const G4ColourGetTextColour (const G4Text &)
 
const G4ColourGetTextColor (const G4Text &)
 
G4double GetLineWidth (const G4VisAttributes *)
 
G4ViewParameters::DrawingStyle GetDrawingStyle (const G4VisAttributes *)
 
G4int GetNumberOfCloudPoints (const G4VisAttributes *) const
 
G4bool GetAuxEdgeVisible (const G4VisAttributes *)
 
G4int GetNoOfSides (const G4VisAttributes *)
 
G4double GetMarkerSize (const G4VMarker &, MarkerSizeType &)
 
G4double GetMarkerDiameter (const G4VMarker &, MarkerSizeType &)
 
G4double GetMarkerRadius (const G4VMarker &, MarkerSizeType &)
 
G4ModelingParametersCreateModelingParameters ()
 
void DrawEvent (const G4Event *)
 
void DrawEndOfRunModels ()
 
template<class T >
void AddSolidT (const T &solid)
 
template<class T >
void AddSolidWithAuxiliaryEdges (const T &solid)
 
G4int IncrementViewCount ()
 
virtual void ClearStore ()
 
virtual void ClearTransientStore ()
 
void AddViewerToList (G4VViewer *pView)
 
void RemoveViewerFromList (G4VViewer *pView)
 
- Public Member Functions inherited from G4VGraphicsScene
 G4VGraphicsScene ()
 
virtual ~G4VGraphicsScene ()
 

Protected Attributes

const G4Transform3DfpCurrentObjectTransformation
 
std::set< G4LogicalVolume * > fDrawnLVStore
 
- Protected Attributes inherited from G4VSceneHandler
G4VGraphicsSystemfSystem
 
const G4int fSceneHandlerId
 
G4String fName
 
G4int fViewCount
 
G4ViewerList fViewerList
 
G4VViewerfpViewer
 
G4ScenefpScene
 
G4bool fMarkForClearingTransientStore
 
G4bool fReadyForTransients
 
G4bool fTransientsDrawnThisEvent
 
G4bool fTransientsDrawnThisRun
 
G4bool fProcessingSolid
 
G4bool fProcessing2D
 
G4VModelfpModel
 
G4Transform3D fObjectTransformation
 
G4int fNestingDepth
 
const G4VisAttributesfpVisAttribs
 
const G4Transform3D fIdentityTransformation
 

Static Protected Attributes

static G4int fSceneIdCount = 0
 

Additional Inherited Members

- Public Types inherited from G4VSceneHandler
enum  MarkerSizeType { world , screen }
 
- Protected Member Functions inherited from G4VSceneHandler
virtual void ProcessScene ()
 
virtual void RequestPrimitives (const G4VSolid &solid)
 
virtual G4DisplacedSolidCreateSectionSolid ()
 
virtual G4DisplacedSolidCreateCutawaySolid ()
 
void LoadAtts (const G4Visible &, G4AttHolder *)
 
void StandardSpecialMeshRendering (const G4Mesh &)
 
void Draw3DRectMeshAsDots (const G4Mesh &)
 
void Draw3DRectMeshAsSurfaces (const G4Mesh &)
 
void DrawTetMeshAsDots (const G4Mesh &)
 
void DrawTetMeshAsSurfaces (const G4Mesh &)
 
G4ThreeVector GetPointInBox (const G4ThreeVector &pos, G4double halfX, G4double halfY, G4double halfZ) const
 
G4ThreeVector GetPointInTet (const std::vector< G4ThreeVector > &vertices) const
 

Detailed Description

Definition at line 47 of file G4VTreeSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4VTreeSceneHandler()

G4VTreeSceneHandler::G4VTreeSceneHandler ( G4VGraphicsSystem & system,
const G4String & name )

Definition at line 45 of file G4VTreeSceneHandler.cc.

46 :
47 G4VSceneHandler(system, fSceneIdCount++, name),
49{}
G4VSceneHandler(G4VGraphicsSystem &system, G4int id, const G4String &name="")
const G4Transform3D * fpCurrentObjectTransformation

◆ ~G4VTreeSceneHandler()

G4VTreeSceneHandler::~G4VTreeSceneHandler ( )
virtual

Definition at line 51 of file G4VTreeSceneHandler.cc.

51{}

Member Function Documentation

◆ AddPrimitive() [1/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Circle & )
inlinevirtual

Implements G4VSceneHandler.

Definition at line 63 of file G4VTreeSceneHandler.hh.

63{}

◆ AddPrimitive() [2/7]

void G4VSceneHandler::AddPrimitive ( const G4Plotter & )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 193 of file G4VSceneHandler.cc.

512 {
513 G4warn << "WARNING: Plotter not implemented for " << fSystem.GetName() << G4endl;
514 G4warn << " Open a plotter-aware graphics system or remove plotter with" << G4endl;
515 G4warn << " /vis/scene/removeModel Plotter" << G4endl;
516}
#define G4warn
Definition G4Scene.cc:41
#define G4endl
Definition G4ios.hh:67
const G4String & GetName() const
G4VGraphicsSystem & fSystem

◆ AddPrimitive() [3/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Polyhedron & )
inlinevirtual

Implements G4VSceneHandler.

Definition at line 65 of file G4VTreeSceneHandler.hh.

65{}

◆ AddPrimitive() [4/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Polyline & )
inlinevirtual

Implements G4VSceneHandler.

Definition at line 61 of file G4VTreeSceneHandler.hh.

61{}

◆ AddPrimitive() [5/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Polymarker & )
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 66 of file G4VTreeSceneHandler.hh.

66{}

◆ AddPrimitive() [6/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Square & )
inlinevirtual

Implements G4VSceneHandler.

Definition at line 64 of file G4VTreeSceneHandler.hh.

64{}

◆ AddPrimitive() [7/7]

virtual void G4VTreeSceneHandler::AddPrimitive ( const G4Text & )
inlinevirtual

Implements G4VSceneHandler.

Definition at line 62 of file G4VTreeSceneHandler.hh.

62{}

◆ BeginModeling()

void G4VTreeSceneHandler::BeginModeling ( )
virtual

Reimplemented from G4VSceneHandler.

Reimplemented in G4ASCIITreeSceneHandler.

Definition at line 53 of file G4VTreeSceneHandler.cc.

53 {
54 G4VSceneHandler::BeginModeling(); // Required: see G4VSceneHandler.hh.
55}
virtual void BeginModeling()

Referenced by G4ASCIITreeSceneHandler::BeginModeling().

◆ EndModeling()

void G4VTreeSceneHandler::EndModeling ( )
virtual

Reimplemented from G4VSceneHandler.

Reimplemented in G4ASCIITreeSceneHandler.

Definition at line 57 of file G4VTreeSceneHandler.cc.

57 {
58 fDrawnLVStore.clear();
59 G4VSceneHandler::EndModeling(); // Required: see G4VSceneHandler.hh.
60}
virtual void EndModeling()
std::set< G4LogicalVolume * > fDrawnLVStore

Referenced by G4ASCIITreeSceneHandler::EndModeling().

◆ PostAddSolid()

void G4VTreeSceneHandler::PostAddSolid ( )
virtual

Reimplemented from G4VSceneHandler.

◆ PreAddSolid()

void G4VTreeSceneHandler::PreAddSolid ( const G4Transform3D & objectTransformation,
const G4VisAttributes & visAttribs )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4VTreeSceneHandler.cc.

64{
65 G4VSceneHandler::PreAddSolid (objectTransformation, visAttribs);
66
67 G4PhysicalVolumeModel* pPVModel =
68 dynamic_cast<G4PhysicalVolumeModel*>(fpModel);
69 if (!pPVModel) return; // Not from a G4PhysicalVolumeModel.
70
71 // This call comes from a G4PhysicalVolumeModel, drawnPVPath is
72 // the path of the current drawn (non-culled) volume in terms of
73 // drawn (non-culled) ancestors. Each node is identified by a
74 // PVNodeID object, which is a physical volume and copy number. It
75 // is a vector of PVNodeIDs corresponding to the geometry hierarchy
76 // actually selected, i.e., not culled.
78 typedef std::vector<PVNodeID> PVPath;
79 const PVPath& drawnPVPath = pPVModel->GetDrawnPVPath();
80 //G4int currentDepth = pPVModel->GetCurrentDepth();
81 //G4VPhysicalVolume* pCurrentPV = pPVModel->GetCurrentPV();
82 //G4LogicalVolume* pCurrentLV = pPVModel->GetCurrentLV();
83 //G4Material* pCurrentMaterial = pPVModel->GetCurrentMaterial();
84
85 // Actually, it is enough to store the logical volume of current
86 // physical volume...
87 fDrawnLVStore.insert
88 (drawnPVPath.back().GetPhysicalVolume()->GetLogicalVolume());
89
90 // Find mother. ri points to drawn mother, if any.
91 PVPath::const_reverse_iterator ri = ++drawnPVPath.rbegin();
92 if (ri != drawnPVPath.rend()) {
93 // This volume has a mother.
94 G4LogicalVolume* drawnMotherLV =
95 ri->GetPhysicalVolume()->GetLogicalVolume();
96 if (fDrawnLVStore.find(drawnMotherLV) != fDrawnLVStore.end()) {
97 // Mother previously encountered. Add this volume to
98 // appropriate node in scene graph tree.
99 // ...
100 } else {
101 // Mother not previously encountered. Shouldn't happen, since
102 // G4PhysicalVolumeModel sends volumes as it encounters them,
103 // i.e., mothers before daughters, in its descent of the
104 // geometry tree. Error!
105 G4warn << "ERROR: G4VTreeSceneHandler::PreAddSolid: Mother "
106 << ri->GetPhysicalVolume()->GetName()
107 << ':' << ri->GetCopyNo()
108 << " not previously encountered."
109 "\nShouldn't happen! Please report to visualization coordinator."
110 << G4endl;
111 // Continue anyway. Add to root of scene graph tree.
112 // ...
113 }
114 } else {
115 // This volume has no mother. Must be a top level un-culled
116 // volume. Add to root of scene graph tree.
117 // ...
118 }
119}
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)

Member Data Documentation

◆ fDrawnLVStore

std::set<G4LogicalVolume*> G4VTreeSceneHandler::fDrawnLVStore
protected

Definition at line 77 of file G4VTreeSceneHandler.hh.

Referenced by EndModeling(), and PreAddSolid().

◆ fpCurrentObjectTransformation

const G4Transform3D* G4VTreeSceneHandler::fpCurrentObjectTransformation
protected

Definition at line 76 of file G4VTreeSceneHandler.hh.

◆ fSceneIdCount

G4int G4VTreeSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 75 of file G4VTreeSceneHandler.hh.


The documentation for this class was generated from the following files: