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

#include <G4XXXStoredSceneHandler.hh>

+ Inheritance diagram for G4XXXStoredSceneHandler:

Public Member Functions

 G4XXXStoredSceneHandler (G4VGraphicsSystem &system, const G4String &name)
 
virtual ~G4XXXStoredSceneHandler ()
 
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 PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
void PostAddSolid ()
 
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)
 
void BeginPrimitives (const G4Transform3D &objectTransformation)
 
void EndPrimitives ()
 
void ClearStore ()
 
void ClearTransientStore ()
 
- 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
 

Protected Types

typedef std::list< G4StringStore
 
typedef std::list< G4String >::iterator StoreIterator
 

Protected Attributes

Store fStore
 
StoreIterator fCurrentItem
 
std::vector< StoreIteratorfPermanents
 
std::vector< StoreIteratorfTransients
 
- 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
 

Friends

class G4XXXStoredViewer
 

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 *)
 

Detailed Description

Definition at line 40 of file G4XXXStoredSceneHandler.hh.

Member Typedef Documentation

◆ Store

typedef std::list<G4String> G4XXXStoredSceneHandler::Store
protected

Definition at line 128 of file G4XXXStoredSceneHandler.hh.

◆ StoreIterator

typedef std::list<G4String>::iterator G4XXXStoredSceneHandler::StoreIterator
protected

Definition at line 129 of file G4XXXStoredSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4XXXStoredSceneHandler()

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

Definition at line 56 of file G4XXXStoredSceneHandler.cc.

◆ ~G4XXXStoredSceneHandler()

G4XXXStoredSceneHandler::~G4XXXStoredSceneHandler ( )
virtual

Definition at line 61 of file G4XXXStoredSceneHandler.cc.

61{}

Member Function Documentation

◆ AddPrimitive() [1/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Circle circle)
virtual

Implements G4VSceneHandler.

Definition at line 251 of file G4XXXStoredSceneHandler.cc.

251 {
252#ifdef G4XXXStoredDEBUG
253 G4cout <<
254 "G4XXXStoredSceneHandler::AddPrimitive(const G4Circle& circle) called.\n"
255 << circle
256 << G4endl;
257 MarkerSizeType sizeType;
258 G4double size = GetMarkerSize (circle, sizeType);
259 switch (sizeType) {
260 default:
261 case screen:
262 // Draw in screen coordinates.
263 G4cout << "screen";
264 break;
265 case world:
266 // Draw in world coordinates.
267 G4cout << "world";
268 break;
269 }
270 G4cout << " size: " << size << G4endl;
271#endif
272 // Get vis attributes - pick up defaults if none.
273 //const G4VisAttributes* pVA =
274 // fpViewer -> GetApplicableVisAttributes (circle.GetVisAttributes ());
275 //?? Process circle.
276 std::ostringstream oss;
277 oss << circle;
278 *fCurrentItem += oss.str();
279}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)

◆ AddPrimitive() [2/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polyhedron polyhedron)
virtual

Implements G4VSceneHandler.

Definition at line 311 of file G4XXXStoredSceneHandler.cc.

311 {
312#ifdef G4XXXStoredDEBUG
313 G4cout <<
314 "G4XXXStoredSceneHandler::AddPrimitive(const G4Polyhedron&) called.\n"
315 << polyhedron
316 << G4endl;
317#endif
318 //?? Process polyhedron.
319 std::ostringstream oss;
320 oss << polyhedron;
321 *fCurrentItem += oss.str();
322
323 //?? Or... here are some ideas for decomposing into polygons...
324 //Assume all facets are convex quadrilaterals.
325 //Draw each G4Facet individually
326
327 //Get colour, etc..
328 if (polyhedron.GetNoFacets() == 0) return;
329
330 // Get vis attributes - pick up defaults if none.
331 const G4VisAttributes* pVA =
332 fpViewer -> GetApplicableVisAttributes (polyhedron.GetVisAttributes ());
333
334 // Get view parameters that the user can force through the vis
335 // attributes, thereby over-riding the current view parameter.
337 //G4bool isAuxEdgeVisible = GetAuxEdgeVisible (pVA);
338
339 //Get colour, etc..
340 //const G4Colour& c = pVA -> GetColour ();
341
342 // Initial action depending on drawing style.
343 switch (drawing_style) {
345 {
346 break;
347 }
349 {
350 break;
351 }
353 {
354 break;
355 }
356 default:
357 {
358 break;
359 }
360 }
361
362 // Loop through all the facets...
363
364 // Look at G4OpenGLSceneHandler::AddPrimitive(const G4Polyhedron&)
365 // for an example of how to get facets out of a G4Polyhedron,
366 // including how to cope with triangles if that's a problem.
367}
G4VViewer * fpViewer
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)

◆ AddPrimitive() [3/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polyline polyline)
virtual

Implements G4VSceneHandler.

Definition at line 217 of file G4XXXStoredSceneHandler.cc.

217 {
218#ifdef G4XXXStoredDEBUG
219 G4cout <<
220 "G4XXXStoredSceneHandler::AddPrimitive(const G4Polyline& polyline) called.\n"
221 << polyline
222 << G4endl;
223#endif
224 // Get vis attributes - pick up defaults if none.
225 //const G4VisAttributes* pVA =
226 // fpViewer -> GetApplicableVisAttributes (polyline.GetVisAttributes ());
227 //?? Process polyline.
228 std::ostringstream oss;
229 oss << polyline;
230 *fCurrentItem += oss.str();
231}

◆ AddPrimitive() [4/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 101 of file G4XXXStoredSceneHandler.hh.

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

◆ AddPrimitive() [5/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 103 of file G4XXXStoredSceneHandler.hh.

◆ AddPrimitive() [6/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Square square)
virtual

Implements G4VSceneHandler.

Definition at line 281 of file G4XXXStoredSceneHandler.cc.

281 {
282#ifdef G4XXXStoredDEBUG
283 G4cout <<
284 "G4XXXStoredSceneHandler::AddPrimitive(const G4Square& square) called.\n"
285 << square
286 << G4endl;
287 MarkerSizeType sizeType;
288 G4double size = GetMarkerSize (square, sizeType);
289 switch (sizeType) {
290 default:
291 case screen:
292 // Draw in screen coordinates.
293 G4cout << "screen";
294 break;
295 case world:
296 // Draw in world coordinates.
297 G4cout << "world";
298 break;
299 }
300 G4cout << " size: " << size << G4endl;
301#endif
302 // Get vis attributes - pick up defaults if none.
303 //const G4VisAttributes* pVA =
304 // fpViewer -> GetApplicableVisAttributes (square.GetVisAttributes ());
305 //?? Process square.
306 std::ostringstream oss;
307 oss << square;
308 *fCurrentItem += oss.str();
309}

◆ AddPrimitive() [7/7]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Text text)
virtual

Implements G4VSceneHandler.

Definition at line 233 of file G4XXXStoredSceneHandler.cc.

233 {
234#ifdef G4XXXStoredDEBUG
235 G4cout <<
236 "G4XXXStoredSceneHandler::AddPrimitive(const G4Text& text) called.|n"
237 << text
238 << G4endl;
239#endif
240 // Get text colour - special method since default text colour is
241 // determined by the default text vis attributes, which may be
242 // specified independent of default vis attributes of other types of
243 // visible objects.
244 //const G4Colour& c = GetTextColour (text); // Picks up default if none.
245 //?? Process text.
246 std::ostringstream oss;
247 oss << text;
248 *fCurrentItem += oss.str();
249}

◆ AddSolid() [1/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 199 of file G4XXXStoredSceneHandler.cc.

199 {
200#ifdef G4XXXStoredDEBUG
201 G4cout <<
202 "G4XXXStoredSceneHandler::AddSolid(const G4Box& box) called for "
203 << box.GetName()
204 << G4endl;
205#endif
206 //?? Process your box...
207 std::ostringstream oss;
208 oss << "G4Box(" <<
212 (box.GetXHalfLength(), box.GetYHalfLength(), box.GetZHalfLength()),
213 "Length")).strip() << ')';
214 *fCurrentItem += oss.str();
215}
G4double GetYHalfLength() const
G4double GetZHalfLength() const
G4double GetXHalfLength() const
G4String strip(G4int strip_Type=trailing, char c=' ')
G4String GetName() const

◆ AddSolid() [2/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Cons cons)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 55 of file G4XXXStoredSceneHandler.hh.

virtual void AddSolid(const G4Box &)

◆ AddSolid() [3/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Ellipsoid ellipsoid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 75 of file G4XXXStoredSceneHandler.hh.

76 {G4VSceneHandler::AddSolid(ellipsoid);}

◆ AddSolid() [4/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Orb orb)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 73 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [5/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Para para)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 65 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [6/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 69 of file G4XXXStoredSceneHandler.hh.

70 {G4VSceneHandler::AddSolid(polycone);}

◆ AddSolid() [7/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 71 of file G4XXXStoredSceneHandler.hh.

72 {G4VSceneHandler::AddSolid(polyhedra);}

◆ AddSolid() [8/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Sphere sphere)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 63 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [9/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4TessellatedSolid tess)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 77 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [10/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Torus torus)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 67 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [11/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Trap trap)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 61 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [12/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Trd trd)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 59 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [13/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4Tubs tubs)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 57 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [14/14]

void G4XXXStoredSceneHandler::AddSolid ( const G4VSolid solid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 79 of file G4XXXStoredSceneHandler.hh.

◆ BeginPrimitives()

void G4XXXStoredSceneHandler::BeginPrimitives ( const G4Transform3D objectTransformation)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 163 of file G4XXXStoredSceneHandler.cc.

165{
166 G4VSceneHandler::BeginPrimitives(objectTransformation);
167
168 // If thread of control has already passed through PreAddSolid,
169 // avoid opening a graphical data base component again.
170 if (!fProcessingSolid) {
171 // Create a place for current primitive...
172 fCurrentItem = fStore.insert(fStore.end(),
173 G4String("\nBeginPrimitives:\n"));
175 fTransients.push_back(fCurrentItem);
176 } else {
177 fPermanents.push_back(fCurrentItem);
178 }
179 }
180}
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())
std::vector< StoreIterator > fTransients
std::vector< StoreIterator > fPermanents

◆ ClearStore()

void G4XXXStoredSceneHandler::ClearStore ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 369 of file G4XXXStoredSceneHandler.cc.

370{
371 fStore.clear();
372 fPermanents.clear();
373 fTransients.clear();
374}

◆ ClearTransientStore()

void G4XXXStoredSceneHandler::ClearTransientStore ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 376 of file G4XXXStoredSceneHandler.cc.

377{
378 typedef std::vector<StoreIterator>::iterator StoreIteratorIterator;
379 for (StoreIteratorIterator i = fTransients.begin();
380 i != fTransients.end(); ++i) {
381 fStore.erase(*i);
382 }
383 fTransients.clear();
384
385 // Make sure screen corresponds to graphical database...
386 if (fpViewer) {
387 fpViewer -> SetView ();
388 fpViewer -> ClearView ();
389 fpViewer -> DrawView ();
390 }
391}

◆ EndPrimitives()

void G4XXXStoredSceneHandler::EndPrimitives ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 182 of file G4XXXStoredSceneHandler.cc.

183{
184 if (!fProcessingSolid) { // Already done if so.
185 *fCurrentItem += "\nEndPrimitives\n";
186 }
188}
virtual void EndPrimitives()

◆ PostAddSolid()

void G4XXXStoredSceneHandler::PostAddSolid ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 157 of file G4XXXStoredSceneHandler.cc.

158{
159 *fCurrentItem += "\nEndSolid\n";
161}
virtual void PostAddSolid()

◆ PreAddSolid()

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

Reimplemented from G4VSceneHandler.

Definition at line 92 of file G4XXXStoredSceneHandler.cc.

95{
96 G4VSceneHandler::PreAddSolid(objectTransformation, visAttribs);
97
98 // Get user G4Atts...
99 const std::map<G4String,G4AttDef>* userAttDefs = visAttribs.GetAttDefs();
100 if (userAttDefs) {
101#ifdef G4XXXStoredDEBUG
102 const std::vector<G4AttValue>* userAttValues =
103 visAttribs.CreateAttValues();
104 G4cout << "\nProvided G4Atts:\n"
105 << G4AttCheck(userAttValues, userAttDefs);
106 // Extra checks...
107 G4AttCheck attCheck(userAttValues, userAttDefs);
108 if (attCheck.Check()) G4cout << "Error" << G4endl;
109 else {
110 std::vector<G4AttValue> standardValues;
111 std::map<G4String,G4AttDef> standardDefinitions;
112 attCheck.Standard(&standardValues, &standardDefinitions);
113 G4cout << "\nStandard G4Atts:\n"
114 << G4AttCheck(&standardValues, &standardDefinitions);
115 }
116 // End of extra checks.
117 delete userAttValues; // (Must be deleted after use.)
118#endif
119 }
120
121 // Get solid's G4Atts created by G4PhysicalVolumeModel...
122 G4PhysicalVolumeModel* pPVModel =
123 dynamic_cast<G4PhysicalVolumeModel*>(fpModel);
124 if (pPVModel) {
125 const std::map<G4String,G4AttDef>* solidAttDefs = pPVModel->GetAttDefs();
126 if (solidAttDefs) {
127#ifdef G4XXXStoredDEBUG
128 std::vector<G4AttValue>* solidAttValues =
129 pPVModel->CreateCurrentAttValues();
130 G4cout << "\nProvided G4Atts:\n"
131 << G4AttCheck(solidAttValues, solidAttDefs);
132 // Extra checks...
133 G4AttCheck attCheck(solidAttValues,solidAttDefs);
134 if (attCheck.Check()) G4cout << "Error" << G4endl;
135 else {
136 std::vector<G4AttValue> standardValues;
137 std::map<G4String,G4AttDef> standardDefinitions;
138 attCheck.Standard(&standardValues, &standardDefinitions);
139 G4cout << "\nStandard G4Atts:\n"
140 << G4AttCheck(&standardValues, &standardDefinitions);
141 }
142 // End of extra checks.
143 delete solidAttValues; // (Must be deleted after use.)
144#endif
145 }
146 }
147
148 // Create a place for current solid...
149 fCurrentItem = fStore.insert(fStore.end(), G4String("\nPreAddSolid:\n"));
151 fTransients.push_back(fCurrentItem);
152 } else {
153 fPermanents.push_back(fCurrentItem);
154 }
155}
std::vector< G4AttValue > * CreateCurrentAttValues() const
const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
const std::map< G4String, G4AttDef > * GetAttDefs() const
const std::vector< G4AttValue > * CreateAttValues() const

Friends And Related Function Documentation

◆ G4XXXStoredViewer

friend class G4XXXStoredViewer
friend

Definition at line 42 of file G4XXXStoredSceneHandler.hh.

Member Data Documentation

◆ fCurrentItem

StoreIterator G4XXXStoredSceneHandler::fCurrentItem
protected

◆ fPermanents

std::vector<StoreIterator> G4XXXStoredSceneHandler::fPermanents
protected

Definition at line 134 of file G4XXXStoredSceneHandler.hh.

Referenced by BeginPrimitives(), ClearStore(), and PreAddSolid().

◆ fSceneIdCount

G4int G4XXXStoredSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 123 of file G4XXXStoredSceneHandler.hh.

◆ fStore

Store G4XXXStoredSceneHandler::fStore
protected

◆ fTransients

std::vector<StoreIterator> G4XXXStoredSceneHandler::fTransients
protected

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