Geant4 9.6.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 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 G4NURBS &)
 
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 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
 

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

Detailed Description

Definition at line 41 of file G4XXXStoredSceneHandler.hh.

Member Typedef Documentation

◆ Store

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

Definition at line 123 of file G4XXXStoredSceneHandler.hh.

◆ StoreIterator

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

Definition at line 124 of file G4XXXStoredSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4XXXStoredSceneHandler()

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

Definition at line 57 of file G4XXXStoredSceneHandler.cc.

◆ ~G4XXXStoredSceneHandler()

G4XXXStoredSceneHandler::~G4XXXStoredSceneHandler ( )
virtual

Definition at line 62 of file G4XXXStoredSceneHandler.cc.

62{}

Member Function Documentation

◆ AddPrimitive() [1/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Circle circle)
virtual

Implements G4VSceneHandler.

Definition at line 252 of file G4XXXStoredSceneHandler.cc.

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

◆ AddPrimitive() [2/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4NURBS )
virtual

Implements G4VSceneHandler.

Definition at line 370 of file G4XXXStoredSceneHandler.cc.

370 {
371#ifdef G4XXXStoredDEBUG
372 G4cout <<
373 "G4XXXStoredSceneHandler::AddPrimitive(const G4NURBS& nurbs) called."
374 << G4endl;
375#endif
376 //?? Don't bother implementing this. NURBS are not functional.
377}

◆ AddPrimitive() [3/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polyhedron polyhedron)
virtual

Implements G4VSceneHandler.

Definition at line 312 of file G4XXXStoredSceneHandler.cc.

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

◆ AddPrimitive() [4/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polyline polyline)
virtual

Implements G4VSceneHandler.

Definition at line 218 of file G4XXXStoredSceneHandler.cc.

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

◆ AddPrimitive() [5/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 96 of file G4XXXStoredSceneHandler.hh.

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

◆ AddPrimitive() [6/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 98 of file G4XXXStoredSceneHandler.hh.

◆ AddPrimitive() [7/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Square square)
virtual

Implements G4VSceneHandler.

Definition at line 282 of file G4XXXStoredSceneHandler.cc.

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

◆ AddPrimitive() [8/8]

void G4XXXStoredSceneHandler::AddPrimitive ( const G4Text text)
virtual

Implements G4VSceneHandler.

Definition at line 234 of file G4XXXStoredSceneHandler.cc.

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

◆ AddSolid() [1/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 200 of file G4XXXStoredSceneHandler.cc.

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

◆ AddSolid() [2/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Cons cons)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 56 of file G4XXXStoredSceneHandler.hh.

virtual void AddSolid(const G4Box &)

◆ AddSolid() [3/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Para para)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 66 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [4/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 70 of file G4XXXStoredSceneHandler.hh.

71 {G4VSceneHandler::AddSolid(polycone);}

◆ AddSolid() [5/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 72 of file G4XXXStoredSceneHandler.hh.

73 {G4VSceneHandler::AddSolid(polyhedra);}

◆ AddSolid() [6/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Sphere sphere)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 64 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [7/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Torus torus)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 68 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [8/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Trap trap)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [9/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Trd trd)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 60 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [10/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4Tubs tubs)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 58 of file G4XXXStoredSceneHandler.hh.

◆ AddSolid() [11/11]

void G4XXXStoredSceneHandler::AddSolid ( const G4VSolid solid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 74 of file G4XXXStoredSceneHandler.hh.

◆ BeginPrimitives()

void G4XXXStoredSceneHandler::BeginPrimitives ( const G4Transform3D objectTransformation)
virtual

Reimplemented from G4VSceneHandler.

Definition at line 164 of file G4XXXStoredSceneHandler.cc.

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

◆ ClearStore()

void G4XXXStoredSceneHandler::ClearStore ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 379 of file G4XXXStoredSceneHandler.cc.

380{
381 fStore.clear();
382 fPermanents.clear();
383 fTransients.clear();
384}

◆ ClearTransientStore()

void G4XXXStoredSceneHandler::ClearTransientStore ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 386 of file G4XXXStoredSceneHandler.cc.

387{
388 typedef std::vector<StoreIterator>::iterator StoreIteratorIterator;
389 for (StoreIteratorIterator i = fTransients.begin();
390 i != fTransients.end(); ++i) {
391 fStore.erase(*i);
392 }
393 fTransients.clear();
394
395 // Make sure screen corresponds to graphical database...
396 if (fpViewer) {
397 fpViewer -> SetView ();
398 fpViewer -> ClearView ();
399 fpViewer -> DrawView ();
400 }
401}

◆ EndPrimitives()

void G4XXXStoredSceneHandler::EndPrimitives ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 183 of file G4XXXStoredSceneHandler.cc.

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

◆ PostAddSolid()

void G4XXXStoredSceneHandler::PostAddSolid ( )
virtual

Reimplemented from G4VSceneHandler.

Definition at line 158 of file G4XXXStoredSceneHandler.cc.

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

◆ PreAddSolid()

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

Reimplemented from G4VSceneHandler.

Definition at line 93 of file G4XXXStoredSceneHandler.cc.

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

Member Data Documentation

◆ fCurrentItem

StoreIterator G4XXXStoredSceneHandler::fCurrentItem
protected

◆ fPermanents

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

Definition at line 129 of file G4XXXStoredSceneHandler.hh.

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

◆ fSceneIdCount

G4int G4XXXStoredSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 118 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: