Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4XXXStoredSceneHandler.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28//
29// John Allison 7th March 2006
30// A template for a graphics driver with a store/database.
31//?? Lines beginning like this require specialisation for your driver.
32
33#ifndef G4XXXStoredSCENEHANDLER_HH
34#define G4XXXStoredSCENEHANDLER_HH
35
36#include "G4VSceneHandler.hh"
37
38#include <list>
39
41
42 friend class G4XXXStoredViewer;
43
44public:
46 const G4String& name);
48
49 ////////////////////////////////////////////////////////////////
50 // Optional virtual functions...
51 void AddSolid(const G4Box&);
52 // Further optional AddSolid functions. Explicitly invoke base
53 // class methods if not otherwise defined to avoid warnings about
54 // hiding of base class methods.
55 void AddSolid(const G4Cons& cons)
57 void AddSolid(const G4Tubs& tubs)
59 void AddSolid(const G4Trd& trd)
61 void AddSolid(const G4Trap& trap)
63 void AddSolid(const G4Sphere& sphere)
65 void AddSolid(const G4Para& para)
67 void AddSolid(const G4Torus& torus)
69 void AddSolid(const G4Polycone& polycone)
70 {G4VSceneHandler::AddSolid(polycone);}
71 void AddSolid(const G4Polyhedra& polyhedra)
72 {G4VSceneHandler::AddSolid(polyhedra);}
73 void AddSolid(const G4Orb& orb)
75 void AddSolid(const G4Ellipsoid& ellipsoid)
76 {G4VSceneHandler::AddSolid(ellipsoid);}
77 void AddSolid(const G4TessellatedSolid& tess)
79 void AddSolid(const G4VSolid& solid)
81 // More optional functions...
82 // void AddCompound(const G4VTrajectory&);
83 // void AddCompound(const G4VHit&);
84 // void AddCompound(const G4THitsMap<G4double>&);
85 // void AddCompound(const G4THitsMap<G4StatDouble>&);
86 void PreAddSolid(const G4Transform3D& objectTransformation,
87 const G4VisAttributes&);
88 void PostAddSolid();
89
90 ////////////////////////////////////////////////////////////////
91 // Required implementation of pure virtual functions...
92
93 void AddPrimitive(const G4Polyline&);
94 void AddPrimitive(const G4Text&);
95 void AddPrimitive(const G4Circle&);
96 void AddPrimitive(const G4Square&);
97 void AddPrimitive(const G4Polyhedron&);
98 // Further optional AddPrimitive methods. Explicitly invoke base
99 // class methods if not otherwise defined to avoid warnings about
100 // hiding of base class methods.
101 void AddPrimitive(const G4Polymarker& polymarker)
102 {G4VSceneHandler::AddPrimitive (polymarker);}
103 void AddPrimitive(const G4Scale& scale)
105 // Further related optional virtual functions...
106 void BeginPrimitives(const G4Transform3D& objectTransformation);
107 void EndPrimitives();
108
109 ////////////////////////////////////////////////////////////////
110 // Further optional virtual functions...
111
112 // void BeginModeling();
113 // void EndModeling();
114
115 //////////////////////////////////////////////////////////////
116 // Administration functions.
117
118 void ClearStore ();
119 void ClearTransientStore ();
120
121protected:
122
123 static G4int fSceneIdCount; // Counter for XXXStored scene handlers.
124
125 //?? Define a store for your graphics system. (For emulation, list
126 //?? has good properties - removal of items is fast and does not
127 //?? invalidate iterators to other elements.)
128 typedef std::list<G4String> Store;
129 typedef std::list<G4String>::iterator StoreIterator;
132
133 // Keep track of which items are permanent, which transient...
134 std::vector<StoreIterator> fPermanents;
135 std::vector<StoreIterator> fTransients;
136
137private:
138
139#ifdef G4XXXFileDEBUG
140 void PrintThings();
141#endif
142
143};
144
145#endif
int G4int
Definition: G4Types.hh:85
Definition: G4Box.hh:56
Definition: G4Cons.hh:78
Definition: G4Orb.hh:56
Definition: G4Para.hh:79
Definition: G4Text.hh:72
Definition: G4Trd.hh:63
Definition: G4Tubs.hh:75
virtual void AddSolid(const G4Box &)
virtual void AddPrimitive(const G4Polyline &)=0
std::list< G4String >::iterator StoreIterator
void AddPrimitive(const G4Polymarker &polymarker)
void BeginPrimitives(const G4Transform3D &objectTransformation)
std::vector< StoreIterator > fTransients
void AddPrimitive(const G4Scale &scale)
void AddSolid(const G4Ellipsoid &ellipsoid)
void AddSolid(const G4Trd &trd)
void AddSolid(const G4Sphere &sphere)
std::vector< StoreIterator > fPermanents
void AddSolid(const G4Polyhedra &polyhedra)
void AddSolid(const G4Polycone &polycone)
void AddSolid(const G4Torus &torus)
void AddSolid(const G4VSolid &solid)
void AddSolid(const G4Tubs &tubs)
void AddSolid(const G4Para &para)
void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
void AddSolid(const G4Trap &trap)
void AddPrimitive(const G4Polyline &)
void AddSolid(const G4Orb &orb)
void AddSolid(const G4TessellatedSolid &tess)
void AddSolid(const G4Cons &cons)