Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4XXXFileSceneHandler Class Reference

#include <G4XXXFileSceneHandler.hh>

Inheritance diagram for G4XXXFileSceneHandler:
Collaboration 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 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 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)
 
virtual void EndPrimitives ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives2D ()
 
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 *)
 
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 ()
 

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 ( G4VGraphicsSystem system,
const G4String name 
)

Definition at line 54 of file G4XXXFileSceneHandler.cc.

55  :
56  G4VSceneHandler(system, fSceneIdCount++, name)
57 {}
G4VSceneHandler(G4VGraphicsSystem &system, G4int id, const G4String &name="")
G4XXXFileSceneHandler::~G4XXXFileSceneHandler ( )
virtual

Definition at line 59 of file G4XXXFileSceneHandler.cc.

59 {}

Member Function Documentation

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 }
G4VViewer * fpViewer
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
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 }
G4VViewer * fpViewer
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
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 }
G4VViewer * fpViewer
G4GLOB_DLL std::ostream G4cout
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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 }
G4VViewer * fpViewer
G4GLOB_DLL std::ostream G4cout
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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.
241  G4ViewParameters::DrawingStyle drawing_style = GetDrawingStyle (pVA);
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) {
249  case (G4ViewParameters::hsr):
250  {
251  break;
252  }
253  case (G4ViewParameters::hlr):
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 }
G4VViewer * fpViewer
G4GLOB_DLL std::ostream G4cout
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 98 of file G4XXXFileSceneHandler.hh.

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

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 100 of file G4XXXFileSceneHandler.hh.

virtual void AddPrimitive(const G4Polyline &)=0

Here is the call graph for this function:

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(" <<
108  G4String
109  (G4BestUnit
111  (box.GetXHalfLength(), box.GetYHalfLength(), box.GetZHalfLength()),
112  "Length")).strip() << ')';
113  dynamic_cast<G4XXXFileViewer*>(fpViewer)->
114  GetFileWriter().WriteItem(oss.str());
115 }
G4String GetName() const
G4double GetXHalfLength() const
G4VViewer * fpViewer
G4double GetZHalfLength() const
G4GLOB_DLL std::ostream G4cout
G4double GetYHalfLength() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Cons cons)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 54 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Tubs tubs)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 56 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Trd trd)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 58 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Trap trap)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 60 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Sphere sphere)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4XXXFileSceneHandler.hh.

63  {G4VSceneHandler::AddSolid(sphere);}
virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Para para)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 64 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Torus torus)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 66 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 68 of file G4XXXFileSceneHandler.hh.

69  {G4VSceneHandler::AddSolid(polycone);}
virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 70 of file G4XXXFileSceneHandler.hh.

71  {G4VSceneHandler::AddSolid(polyhedra);}
virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Orb orb)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 72 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4Ellipsoid ellipsoid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 74 of file G4XXXFileSceneHandler.hh.

75  {G4VSceneHandler::AddSolid(ellipsoid);}
virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

void G4XXXFileSceneHandler::AddSolid ( const G4VSolid solid)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 76 of file G4XXXFileSceneHandler.hh.

virtual void AddSolid(const G4Box &)

Here is the call graph for this function:

Friends And Related Function Documentation

friend class G4XXXFileViewer
friend

Definition at line 41 of file G4XXXFileSceneHandler.hh.

Member Data Documentation

G4int G4XXXFileSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 120 of file G4XXXFileSceneHandler.hh.


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