Geant4 10.7.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 G4Orb &orb)
 
void AddSolid (const G4Ellipsoid &ellipsoid)
 
void AddSolid (const G4TessellatedSolid &tess)
 
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 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 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 BeginModeling ()
 
virtual void EndModeling ()
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation=G4Transform3D())
 
virtual void EndPrimitives ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation=G4Transform3D())
 
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 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 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 ()
 
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 G4Orb &)=0
 
virtual void AddSolid (const G4Para &)=0
 
virtual void AddSolid (const G4Sphere &)=0
 
virtual void AddSolid (const G4Torus &)=0
 
virtual void AddSolid (const G4Trap &)=0
 
virtual void AddSolid (const G4Trd &)=0
 
virtual void AddSolid (const G4Tubs &)=0
 
virtual void AddSolid (const G4Ellipsoid &)=0
 
virtual void AddSolid (const G4Polycone &)=0
 
virtual void AddSolid (const G4Polyhedra &)=0
 
virtual void AddSolid (const G4TessellatedSolid &)=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 AddCompound (const G4THitsMap< G4StatDouble > &)=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 const G4VisExtentGetExtent () const
 

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 G4DisplacedSolidCreateSectionSolid ()
 
virtual G4DisplacedSolidCreateCutawaySolid ()
 
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 38 of file G4XXXFileSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4XXXFileSceneHandler()

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

Definition at line 53 of file G4XXXFileSceneHandler.cc.

◆ ~G4XXXFileSceneHandler()

G4XXXFileSceneHandler::~G4XXXFileSceneHandler ( )
virtual

Definition at line 58 of file G4XXXFileSceneHandler.cc.

58{}

Member Function Documentation

◆ AddPrimitive() [1/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Circle circle)
virtual

Implements G4VSceneHandler.

Definition at line 152 of file G4XXXFileSceneHandler.cc.

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

◆ AddPrimitive() [2/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polyhedron polyhedron)
virtual

Implements G4VSceneHandler.

Definition at line 214 of file G4XXXFileSceneHandler.cc.

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

◆ AddPrimitive() [3/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polyline polyline)
virtual

Implements G4VSceneHandler.

Definition at line 116 of file G4XXXFileSceneHandler.cc.

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

◆ AddPrimitive() [4/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 99 of file G4XXXFileSceneHandler.hh.

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

◆ AddPrimitive() [5/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 101 of file G4XXXFileSceneHandler.hh.

◆ AddPrimitive() [6/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Square square)
virtual

Implements G4VSceneHandler.

Definition at line 183 of file G4XXXFileSceneHandler.cc.

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

◆ AddPrimitive() [7/7]

void G4XXXFileSceneHandler::AddPrimitive ( const G4Text text)
virtual

Implements G4VSceneHandler.

Definition at line 133 of file G4XXXFileSceneHandler.cc.

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

◆ AddSolid() [1/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 97 of file G4XXXFileSceneHandler.cc.

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

◆ AddSolid() [2/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Cons cons)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 53 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

◆ AddSolid() [3/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Ellipsoid ellipsoid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 73 of file G4XXXFileSceneHandler.hh.

74 {G4VSceneHandler::AddSolid(ellipsoid);}

◆ AddSolid() [4/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Orb orb)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 71 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [5/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Para para)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 63 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [6/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 67 of file G4XXXFileSceneHandler.hh.

68 {G4VSceneHandler::AddSolid(polycone);}

◆ AddSolid() [7/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 69 of file G4XXXFileSceneHandler.hh.

70 {G4VSceneHandler::AddSolid(polyhedra);}

◆ AddSolid() [8/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Sphere sphere)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 61 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [9/14]

void G4XXXFileSceneHandler::AddSolid ( const G4TessellatedSolid tess)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 75 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [10/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Torus torus)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 65 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [11/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Trap trap)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 59 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [12/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Trd trd)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 57 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [13/14]

void G4XXXFileSceneHandler::AddSolid ( const G4Tubs tubs)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 55 of file G4XXXFileSceneHandler.hh.

◆ AddSolid() [14/14]

void G4XXXFileSceneHandler::AddSolid ( const G4VSolid solid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 77 of file G4XXXFileSceneHandler.hh.

Friends And Related Function Documentation

◆ G4XXXFileViewer

friend class G4XXXFileViewer
friend

Definition at line 40 of file G4XXXFileSceneHandler.hh.

Member Data Documentation

◆ fSceneIdCount

G4int G4XXXFileSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 121 of file G4XXXFileSceneHandler.hh.


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