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

#include <G4XXXFileSceneHandler.hh>

+ Inheritance diagram for G4XXXFileSceneHandler:

Public Member Functions

 G4XXXFileSceneHandler (G4VGraphicsSystem &system, const G4String &name)
 
virtual ~G4XXXFileSceneHandler ()
 
void AddSolid (const G4Box &)
 
void AddSolid (const G4Cons &cons)
 
void AddSolid (const G4Tubs &tubs)
 
void AddSolid (const G4Trd &trd)
 
void AddSolid (const G4Trap &trap)
 
void AddSolid (const G4Sphere &sphere)
 
void AddSolid (const G4Para &para)
 
void AddSolid (const G4Torus &torus)
 
void AddSolid (const G4Polycone &polycone)
 
void AddSolid (const G4Polyhedra &polyhedra)
 
void AddSolid (const G4VSolid &solid)
 
void AddPrimitive (const G4Polyline &)
 
void AddPrimitive (const G4Text &)
 
void AddPrimitive (const G4Circle &)
 
void AddPrimitive (const G4Square &)
 
void AddPrimitive (const G4Polyhedron &)
 
void AddPrimitive (const G4NURBS &)
 
void AddPrimitive (const G4Polymarker &polymarker)
 
void AddPrimitive (const G4Scale &scale)
 
- Public Member Functions inherited from G4VSceneHandler
 G4VSceneHandler (G4VGraphicsSystem &system, G4int id, const G4String &name="")
 
virtual ~G4VSceneHandler ()
 
virtual void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
virtual void PostAddSolid ()
 
virtual void AddSolid (const G4Box &)
 
virtual void AddSolid (const G4Cons &)
 
virtual void AddSolid (const G4Tubs &)
 
virtual void AddSolid (const G4Trd &)
 
virtual void AddSolid (const G4Trap &)
 
virtual void AddSolid (const G4Sphere &)
 
virtual void AddSolid (const G4Para &)
 
virtual void AddSolid (const G4Torus &)
 
virtual void AddSolid (const G4Polycone &)
 
virtual void AddSolid (const G4Polyhedra &)
 
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 BeginModeling ()
 
virtual void EndModeling ()
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives2D ()
 
virtual void AddPrimitive (const G4Polyline &)=0
 
virtual void AddPrimitive (const G4Scale &)
 
virtual void AddPrimitive (const G4Text &)=0
 
virtual void AddPrimitive (const G4Circle &)=0
 
virtual void AddPrimitive (const G4Square &)=0
 
virtual void AddPrimitive (const G4Polymarker &)
 
virtual void AddPrimitive (const G4Polyhedron &)=0
 
virtual void AddPrimitive (const G4NURBS &)=0
 
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 G4Visible &)
 
const G4ColourGetColor (const G4Visible &)
 
const G4ColourGetTextColour (const G4Text &)
 
const G4ColourGetTextColor (const G4Text &)
 
G4double GetLineWidth (const G4VisAttributes *)
 
G4ViewParameters::DrawingStyle GetDrawingStyle (const G4VisAttributes *)
 
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 ()
 
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 ()
 
virtual void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)=0
 
virtual void PostAddSolid ()=0
 
virtual void AddSolid (const G4Box &)=0
 
virtual void AddSolid (const G4Cons &)=0
 
virtual void AddSolid (const G4Tubs &)=0
 
virtual void AddSolid (const G4Trd &)=0
 
virtual void AddSolid (const G4Trap &)=0
 
virtual void AddSolid (const G4Sphere &)=0
 
virtual void AddSolid (const G4Para &)=0
 
virtual void AddSolid (const G4Torus &)=0
 
virtual void AddSolid (const G4Polycone &)=0
 
virtual void AddSolid (const G4Polyhedra &)=0
 
virtual void AddSolid (const G4VSolid &)=0
 
virtual void AddCompound (const G4VTrajectory &)=0
 
virtual void AddCompound (const G4VHit &)=0
 
virtual void AddCompound (const G4VDigi &)=0
 
virtual void AddCompound (const G4THitsMap< G4double > &)=0
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation=G4Transform3D())=0
 
virtual void EndPrimitives ()=0
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation=G4Transform3D())=0
 
virtual void EndPrimitives2D ()=0
 
virtual void AddPrimitive (const G4Polyline &)=0
 
virtual void AddPrimitive (const G4Scale &)=0
 
virtual void AddPrimitive (const G4Text &)=0
 
virtual void AddPrimitive (const G4Circle &)=0
 
virtual void AddPrimitive (const G4Square &)=0
 
virtual void AddPrimitive (const G4Polymarker &)=0
 
virtual void AddPrimitive (const G4Polyhedron &)=0
 
virtual void AddPrimitive (const G4NURBS &)=0
 

Static Protected Attributes

static G4int fSceneIdCount = 0
 

Friends

class G4XXXFileViewer
 

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 G4VSolidCreateSectionSolid ()
 
virtual G4VSolidCreateCutawaySolid ()
 
void LoadAtts (const G4Visible &, G4AttHolder *)
 
- 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
 

Detailed Description

Definition at line 39 of file G4XXXFileSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4XXXFileSceneHandler()

G4XXXFileSceneHandler::G4XXXFileSceneHandler ( G4VGraphicsSystem system,
const G4String name 
)

Definition at line 54 of file G4XXXFileSceneHandler.cc.

◆ ~G4XXXFileSceneHandler()

G4XXXFileSceneHandler::~G4XXXFileSceneHandler ( )
virtual

Definition at line 59 of file G4XXXFileSceneHandler.cc.

59{}

Member Function Documentation

◆ AddPrimitive() [1/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Circle circle)
virtual

Implements G4VSceneHandler.

Definition at line 153 of file G4XXXFileSceneHandler.cc.

153 {
154#ifdef G4XXXFileDEBUG
155 G4cout <<
156 "G4XXXFileSceneHandler::AddPrimitive(const G4Circle& circle) called.\n "
157 << circle
158 << G4endl;
159 MarkerSizeType sizeType;
160 G4double size = GetMarkerSize (circle, sizeType);
161 switch (sizeType) {
162 default:
163 case screen:
164 // Draw in screen coordinates.
165 G4cout << "screen";
166 break;
167 case world:
168 // Draw in world coordinates.
169 G4cout << "world";
170 break;
171 }
172 G4cout << " size: " << size << G4endl;
173#endif
174 // Get vis attributes - pick up defaults if none.
175 //const G4VisAttributes* pVA =
176 // fpViewer -> GetApplicableVisAttributes (circle.GetVisAttributes ());
177 //?? Process circle.
178 std::ostringstream oss;
179 oss << circle;
180 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
181 GetFileWriter().WriteItem(oss.str());
182}
double G4double
Definition: G4Types.hh:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
G4VViewer * fpViewer

◆ AddPrimitive() [2/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4NURBS )
virtual

Implements G4VSceneHandler.

Definition at line 274 of file G4XXXFileSceneHandler.cc.

274 {
275#ifdef G4XXXFileDEBUG
276 G4cout <<
277 "G4XXXFileSceneHandler::AddPrimitive(const G4NURBS& nurbs) called."
278 << G4endl;
279#endif
280 //?? Don't bother implementing this. NURBS are not functional.
281}

◆ AddPrimitive() [3/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polyhedron polyhedron)
virtual

Implements G4VSceneHandler.

Definition at line 215 of file G4XXXFileSceneHandler.cc.

215 {
216#ifdef G4XXXFileDEBUG
217 G4cout <<
218"G4XXXFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) called.\n"
219 << polyhedron
220 << G4endl;
221#endif
222 //?? Process polyhedron.
223 std::ostringstream oss;
224 oss << polyhedron;
225 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
226 GetFileWriter().WriteItem(oss.str());
227
228 //?? Or... here are some ideas for decomposing into polygons...
229 //Assume all facets are convex quadrilaterals.
230 //Draw each G4Facet individually
231
232 //Get colour, etc..
233 if (polyhedron.GetNoFacets() == 0) return;
234
235 // Get vis attributes - pick up defaults if none.
236 const G4VisAttributes* pVA =
237 fpViewer -> GetApplicableVisAttributes (polyhedron.GetVisAttributes ());
238
239 // Get view parameters that the user can force through the vis
240 // attributes, thereby over-riding the current view parameter.
242 //G4bool isAuxEdgeVisible = GetAuxEdgeVisible (pVA);
243
244 //Get colour, etc..
245 //const G4Colour& c = pVA -> GetColour ();
246
247 // Initial action depending on drawing style.
248 switch (drawing_style) {
250 {
251 break;
252 }
254 {
255 break;
256 }
258 {
259 break;
260 }
261 default:
262 {
263 break;
264 }
265 }
266
267 // Loop through all the facets...
268
269 // Look at G4OpenGLSceneHandler::AddPrimitive(const G4Polyhedron&)
270 // for an example of how to get facets out of a G4Polyhedron,
271 // including how to cope with triangles if that's a problem.
272}
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)

◆ AddPrimitive() [4/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polyline polyline)
virtual

Implements G4VSceneHandler.

Definition at line 117 of file G4XXXFileSceneHandler.cc.

117 {
118#ifdef G4XXXFileDEBUG
119 G4cout <<
120 "G4XXXFileSceneHandler::AddPrimitive(const G4Polyline& polyline) called.\n"
121 << polyline
122 << G4endl;
123#endif
124 // Get vis attributes - pick up defaults if none.
125 //const G4VisAttributes* pVA =
126 // fpViewer -> GetApplicableVisAttributes (polyline.GetVisAttributes ());
127 //?? Process polyline.
128 std::ostringstream oss;
129 oss << polyline;
130 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
131 GetFileWriter().WriteItem(oss.str());
132}

◆ AddPrimitive() [5/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 94 of file G4XXXFileSceneHandler.hh.

95 {G4VSceneHandler::AddPrimitive (polymarker);}
virtual void AddPrimitive(const G4Polyline &)=0

◆ AddPrimitive() [6/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 96 of file G4XXXFileSceneHandler.hh.

◆ AddPrimitive() [7/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Square square)
virtual

Implements G4VSceneHandler.

Definition at line 184 of file G4XXXFileSceneHandler.cc.

184 {
185#ifdef G4XXXFileDEBUG
186 G4cout <<
187 "G4XXXFileSceneHandler::AddPrimitive(const G4Square& square) called.\n"
188 << square
189 << G4endl;
190 MarkerSizeType sizeType;
191 G4double size = GetMarkerSize (square, sizeType);
192 switch (sizeType) {
193 default:
194 case screen:
195 // Draw in screen coordinates.
196 G4cout << "screen";
197 break;
198 case world:
199 // Draw in world coordinates.
200 G4cout << "world";
201 break;
202 }
203 G4cout << " size: " << size << G4endl;
204#endif
205 // Get vis attributes - pick up defaults if none.
206 //const G4VisAttributes* pVA =
207 // fpViewer -> GetApplicableVisAttributes (square.GetVisAttributes ());
208 //?? Process square.
209 std::ostringstream oss;
210 oss << square;
211 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
212 GetFileWriter().WriteItem(oss.str());
213}

◆ AddPrimitive() [8/8]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Text text)
virtual

Implements G4VSceneHandler.

Definition at line 134 of file G4XXXFileSceneHandler.cc.

134 {
135#ifdef G4XXXFileDEBUG
136 G4cout <<
137 "G4XXXFileSceneHandler::AddPrimitive(const G4Text& text) called.\n"
138 << text
139 << G4endl;
140#endif
141 // Get text colour - special method since default text colour is
142 // determined by the default text vis attributes, which may be
143 // specified independent of default vis attributes of other types of
144 // visible objects.
145 //const G4Colour& c = GetTextColour (text); // Picks up default if none.
146 //?? Process text.
147 std::ostringstream oss;
148 oss << text;
149 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
150 GetFileWriter().WriteItem(oss.str());
151}

◆ AddSolid() [1/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 98 of file G4XXXFileSceneHandler.cc.

98 {
99#ifdef G4XXXFileDEBUG
100 G4cout <<
101 "G4XXXFileSceneHandler::AddSolid(const G4Box& box) called for "
102 << box.GetName()
103 << G4endl;
104#endif
105 //?? Process your box...
106 std::ostringstream oss;
107 oss << "G4Box(" <<
111 (box.GetXHalfLength(), box.GetYHalfLength(), box.GetZHalfLength()),
112 "Length")).strip() << ')';
113 dynamic_cast<G4XXXFileViewer*>(fpViewer)->
114 GetFileWriter().WriteItem(oss.str());
115}
G4double GetYHalfLength() const
G4double GetZHalfLength() const
G4double GetXHalfLength() const
G4String strip(G4int strip_Type=trailing, char c=' ')
G4String GetName() const

◆ AddSolid() [2/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Cons cons)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 54 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

◆ AddSolid() [3/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Para para)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 64 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [4/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 68 of file G4XXXFileSceneHandler.hh.

69 {G4VSceneHandler::AddSolid(polycone);}

◆ AddSolid() [5/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 70 of file G4XXXFileSceneHandler.hh.

71 {G4VSceneHandler::AddSolid(polyhedra);}

◆ AddSolid() [6/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Sphere sphere)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [7/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Torus torus)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 66 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [8/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Trap trap)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 60 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [9/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Trd trd)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 58 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [10/11]

void G4XXXFileSceneHandler::AddSolid ( const G4Tubs tubs)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 56 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [11/11]

void G4XXXFileSceneHandler::AddSolid ( const G4VSolid solid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 72 of file G4XXXFileSceneHandler.hh.

Friends And Related Function Documentation

◆ G4XXXFileViewer

friend class G4XXXFileViewer
friend

Definition at line 41 of file G4XXXFileSceneHandler.hh.

Member Data Documentation

◆ fSceneIdCount

G4int G4XXXFileSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 116 of file G4XXXFileSceneHandler.hh.


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