Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4XXXSceneHandler Class Reference

#include <G4XXXSceneHandler.hh>

Inheritance diagram for G4XXXSceneHandler:
Collaboration diagram for G4XXXSceneHandler:

Public Member Functions

 G4XXXSceneHandler (G4VGraphicsSystem &system, const G4String &name)
 
virtual ~G4XXXSceneHandler ()
 
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 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)
 
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 G4XXXViewer
 

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 41 of file G4XXXSceneHandler.hh.

Constructor & Destructor Documentation

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

Definition at line 50 of file G4XXXSceneHandler.cc.

51  :
52  G4VSceneHandler(system, fSceneIdCount++, name)
53 {}
G4VSceneHandler(G4VGraphicsSystem &system, G4int id, const G4String &name="")
static G4int fSceneIdCount
G4XXXSceneHandler::~G4XXXSceneHandler ( )
virtual

Definition at line 55 of file G4XXXSceneHandler.cc.

55 {}

Member Function Documentation

void G4XXXSceneHandler::AddPrimitive ( const G4Polyline )
virtual

Implements G4VSceneHandler.

Definition at line 85 of file G4XXXSceneHandler.cc.

89  {
90 #ifdef G4XXXDEBUG
91  G4cout <<
92  "G4XXXSceneHandler::AddPrimitive(const G4Polyline& polyline) called.\n"
93  << polyline
94  << G4endl;
95  PrintThings();
96 #endif
97  // Get vis attributes - pick up defaults if none.
98  //const G4VisAttributes* pVA =
99  // fpViewer -> GetApplicableVisAttributes (polyline.GetVisAttributes ());
100  //?? Process polyline.
101 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void G4XXXSceneHandler::AddPrimitive ( const G4Text )
virtual

Implements G4VSceneHandler.

Definition at line 103 of file G4XXXSceneHandler.cc.

107  {
108 #ifdef G4XXXDEBUG
109  G4cout <<
110  "G4XXXSceneHandler::AddPrimitive(const G4Text& text) called.\n"
111  << text
112  << G4endl;
113  PrintThings();
114 #endif
115  // Get text colour - special method since default text colour is
116  // determined by the default text vis attributes, which may be
117  // specified independent of default vis attributes of other types of
118  // visible objects.
119  //const G4Colour& c = GetTextColour (text); // Picks up default if none.
120  //?? Process text.
121 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void G4XXXSceneHandler::AddPrimitive ( const G4Circle )
virtual

Implements G4VSceneHandler.

Definition at line 123 of file G4XXXSceneHandler.cc.

127  {
128 #ifdef G4XXXDEBUG
129  G4cout <<
130  "G4XXXSceneHandler::AddPrimitive(const G4Circle& circle) called.\n"
131  << circle
132  << G4endl;
133  MarkerSizeType sizeType;
134  G4double size = GetMarkerSize (circle, sizeType);
135  switch (sizeType) {
136  default:
137  case screen:
138  // Draw in screen coordinates.
139  G4cout << "screen";
140  break;
141  case world:
142  // Draw in world coordinates.
143  G4cout << "world";
144  break;
145  }
146  G4cout << " size: " << size << G4endl;
147  PrintThings();
148 #endif
149  // Get vis attributes - pick up defaults if none.
150  //const G4VisAttributes* pVA =
151  // fpViewer -> GetApplicableVisAttributes (circle.GetVisAttributes ());
152  //?? Process circle.
153 }
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 G4XXXSceneHandler::AddPrimitive ( const G4Square )
virtual

Implements G4VSceneHandler.

Definition at line 155 of file G4XXXSceneHandler.cc.

159  {
160 #ifdef G4XXXDEBUG
161  G4cout <<
162  "G4XXXSceneHandler::AddPrimitive(const G4Square& square) called.\n"
163  << square
164  << G4endl;
165  MarkerSizeType sizeType;
166  G4double size = GetMarkerSize (square, sizeType);
167  switch (sizeType) {
168  default:
169  case screen:
170  // Draw in screen coordinates.
171  G4cout << "screen";
172  break;
173  case world:
174  // Draw in world coordinates.
175  G4cout << "world";
176  break;
177  }
178  G4cout << " size: " << size << G4endl;
179  PrintThings();
180 #endif
181  // Get vis attributes - pick up defaults if none.
182  //const G4VisAttributes* pVA =
183  // fpViewer -> GetApplicableVisAttributes (square.GetVisAttributes ());
184  //?? Process square.
185 }
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 G4XXXSceneHandler::AddPrimitive ( const G4Polyhedron polyhedron)
virtual

Implements G4VSceneHandler.

Definition at line 187 of file G4XXXSceneHandler.cc.

187  {
188 #ifdef G4XXXDEBUG
189  G4cout <<
190  "G4XXXSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) called.\n"
191  << polyhedron
192  << G4endl;
193  PrintThings();
194 #endif
195  //?? Process polyhedron. Here are some ideas...
196  //Assume all facets are convex quadrilaterals.
197  //Draw each G4Facet individually
198 
199  //Get colour, etc..
200  if (polyhedron.GetNoFacets() == 0) return;
201 
202  // Get vis attributes - pick up defaults if none.
203  const G4VisAttributes* pVA =
204  fpViewer -> GetApplicableVisAttributes (polyhedron.GetVisAttributes ());
205 
206  // Get view parameters that the user can force through the vis
207  // attributes, thereby over-riding the current view parameter.
208  G4ViewParameters::DrawingStyle drawing_style = GetDrawingStyle (pVA);
209  //G4bool isAuxEdgeVisible = GetAuxEdgeVisible (pVA);
210 
211  //Get colour, etc..
212  //const G4Colour& c = pVA -> GetColour ();
213 
214  // Initial action depending on drawing style.
215  switch (drawing_style) {
216  case (G4ViewParameters::hsr):
217  {
218  break;
219  }
220  case (G4ViewParameters::hlr):
221  {
222  break;
223  }
225  {
226  break;
227  }
228  default:
229  {
230  break;
231  }
232  }
233 
234  // Loop through all the facets...
235 
236  // Look at G4OpenGLSceneHandler::AddPrimitive(const G4Polyhedron&)
237  // for an example of how to get facets out of a G4Polyhedron,
238  // including how to cope with triangles if that's a problem.
239 }
G4VViewer * fpViewer
const G4VisAttributes * GetVisAttributes() const
G4GLOB_DLL std::ostream G4cout
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)
#define G4endl
Definition: G4ios.hh:61
G4int GetNoFacets() const

Here is the call graph for this function:

void G4XXXSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 61 of file G4XXXSceneHandler.hh.

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

Here is the call graph for this function:

void G4XXXSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 63 of file G4XXXSceneHandler.hh.

virtual void AddPrimitive(const G4Polyline &)=0

Here is the call graph for this function:

Friends And Related Function Documentation

friend class G4XXXViewer
friend

Definition at line 43 of file G4XXXSceneHandler.hh.

Member Data Documentation

G4int G4XXXSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 68 of file G4XXXSceneHandler.hh.


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