Geant4 10.7.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 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 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
 

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 G4DisplacedSolidCreateSectionSolid ()
 
virtual G4DisplacedSolidCreateCutawaySolid ()
 
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 40 of file G4XXXSceneHandler.hh.

Constructor & Destructor Documentation

◆ G4XXXSceneHandler()

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

Definition at line 49 of file G4XXXSceneHandler.cc.

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

◆ ~G4XXXSceneHandler()

G4XXXSceneHandler::~G4XXXSceneHandler ( )
virtual

Definition at line 54 of file G4XXXSceneHandler.cc.

54{}

Member Function Documentation

◆ AddPrimitive() [1/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Circle )
virtual

Implements G4VSceneHandler.

Definition at line 122 of file G4XXXSceneHandler.cc.

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

Implements G4VSceneHandler.

Definition at line 186 of file G4XXXSceneHandler.cc.

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

◆ AddPrimitive() [3/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Polyline )
virtual

Implements G4VSceneHandler.

Definition at line 84 of file G4XXXSceneHandler.cc.

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

◆ AddPrimitive() [4/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 60 of file G4XXXSceneHandler.hh.

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

◆ AddPrimitive() [5/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 62 of file G4XXXSceneHandler.hh.

◆ AddPrimitive() [6/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Square )
virtual

Implements G4VSceneHandler.

Definition at line 154 of file G4XXXSceneHandler.cc.

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

◆ AddPrimitive() [7/7]

void G4XXXSceneHandler::AddPrimitive ( const G4Text )
virtual

Implements G4VSceneHandler.

Definition at line 102 of file G4XXXSceneHandler.cc.

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

Friends And Related Function Documentation

◆ G4XXXViewer

friend class G4XXXViewer
friend

Definition at line 42 of file G4XXXSceneHandler.hh.

Member Data Documentation

◆ fSceneIdCount

G4int G4XXXSceneHandler::fSceneIdCount = 0
staticprotected

Definition at line 67 of file G4XXXSceneHandler.hh.


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