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

#include <G4XXXSceneHandler.hh>

+ Inheritance 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 G4NURBS &)
 
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 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
 

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

Definition at line 50 of file G4XXXSceneHandler.cc.

51 :
52 G4VSceneHandler(system, fSceneIdCount++, name)
53{}
static G4int fSceneIdCount

◆ ~G4XXXSceneHandler()

G4XXXSceneHandler::~G4XXXSceneHandler ( )
virtual

Definition at line 55 of file G4XXXSceneHandler.cc.

55{}

Member Function Documentation

◆ AddPrimitive() [1/8]

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}
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 G4XXXSceneHandler::AddPrimitive ( const G4NURBS )
virtual

Implements G4VSceneHandler.

Definition at line 241 of file G4XXXSceneHandler.cc.

241 {
242#ifdef G4XXXDEBUG
243 G4cout <<
244 "G4XXXSceneHandler::AddPrimitive(const G4NURBS& nurbs) called."
245 << G4endl;
246 PrintThings();
247#endif
248 //?? Don't bother implementing this. NURBS are not functional.
249}

◆ AddPrimitive() [3/8]

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.
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) {
217 {
218 break;
219 }
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
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)
const G4VisAttributes * GetVisAttributes() const
G4int GetNoFacets() const

◆ AddPrimitive() [4/8]

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}

◆ AddPrimitive() [5/8]

void G4XXXSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4XXXSceneHandler.hh.

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

◆ AddPrimitive() [6/8]

void G4XXXSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 64 of file G4XXXSceneHandler.hh.

◆ AddPrimitive() [7/8]

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}

◆ AddPrimitive() [8/8]

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}

Friends And Related Function Documentation

◆ G4XXXViewer

friend class G4XXXViewer
friend

Definition at line 43 of file G4XXXSceneHandler.hh.

Member Data Documentation

◆ fSceneIdCount

G4int G4XXXSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 69 of file G4XXXSceneHandler.hh.


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