#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) |
Static Protected Attributes | |
static G4int | fSceneIdCount = 0 |
Friends | |
class | G4XXXViewer |
Definition at line 41 of file G4XXXSceneHandler.hh.
G4XXXSceneHandler::G4XXXSceneHandler | ( | G4VGraphicsSystem & | system, | |
const G4String & | name | |||
) |
Definition at line 50 of file G4XXXSceneHandler.cc.
00051 : 00052 G4VSceneHandler(system, fSceneIdCount++, name) 00053 {}
G4XXXSceneHandler::~G4XXXSceneHandler | ( | ) | [virtual] |
void G4XXXSceneHandler::AddPrimitive | ( | const G4Scale & | scale | ) | [inline, virtual] |
Reimplemented from G4VSceneHandler.
Definition at line 64 of file G4XXXSceneHandler.hh.
References G4VSceneHandler::AddPrimitive().
00065 {G4VSceneHandler::AddPrimitive (scale);}
void G4XXXSceneHandler::AddPrimitive | ( | const G4Polymarker & | polymarker | ) | [inline, virtual] |
Reimplemented from G4VSceneHandler.
Definition at line 62 of file G4XXXSceneHandler.hh.
References G4VSceneHandler::AddPrimitive().
00063 {G4VSceneHandler::AddPrimitive (polymarker);}
void G4XXXSceneHandler::AddPrimitive | ( | const G4NURBS & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 241 of file G4XXXSceneHandler.cc.
References G4cout, and G4endl.
00241 { 00242 #ifdef G4XXXDEBUG 00243 G4cout << 00244 "G4XXXSceneHandler::AddPrimitive(const G4NURBS& nurbs) called." 00245 << G4endl; 00246 PrintThings(); 00247 #endif 00248 //?? Don't bother implementing this. NURBS are not functional. 00249 }
void G4XXXSceneHandler::AddPrimitive | ( | const G4Polyhedron & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 187 of file G4XXXSceneHandler.cc.
References G4VSceneHandler::fpViewer, G4cout, G4endl, G4VSceneHandler::GetDrawingStyle(), G4Visible::GetVisAttributes(), G4ViewParameters::hlr, G4ViewParameters::hsr, and G4ViewParameters::wireframe.
00187 { 00188 #ifdef G4XXXDEBUG 00189 G4cout << 00190 "G4XXXSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) called.\n" 00191 << polyhedron 00192 << G4endl; 00193 PrintThings(); 00194 #endif 00195 //?? Process polyhedron. Here are some ideas... 00196 //Assume all facets are convex quadrilaterals. 00197 //Draw each G4Facet individually 00198 00199 //Get colour, etc.. 00200 if (polyhedron.GetNoFacets() == 0) return; 00201 00202 // Get vis attributes - pick up defaults if none. 00203 const G4VisAttributes* pVA = 00204 fpViewer -> GetApplicableVisAttributes (polyhedron.GetVisAttributes ()); 00205 00206 // Get view parameters that the user can force through the vis 00207 // attributes, thereby over-riding the current view parameter. 00208 G4ViewParameters::DrawingStyle drawing_style = GetDrawingStyle (pVA); 00209 //G4bool isAuxEdgeVisible = GetAuxEdgeVisible (pVA); 00210 00211 //Get colour, etc.. 00212 //const G4Colour& c = pVA -> GetColour (); 00213 00214 // Initial action depending on drawing style. 00215 switch (drawing_style) { 00216 case (G4ViewParameters::hsr): 00217 { 00218 break; 00219 } 00220 case (G4ViewParameters::hlr): 00221 { 00222 break; 00223 } 00224 case (G4ViewParameters::wireframe): 00225 { 00226 break; 00227 } 00228 default: 00229 { 00230 break; 00231 } 00232 } 00233 00234 // Loop through all the facets... 00235 00236 // Look at G4OpenGLSceneHandler::AddPrimitive(const G4Polyhedron&) 00237 // for an example of how to get facets out of a G4Polyhedron, 00238 // including how to cope with triangles if that's a problem. 00239 }
void G4XXXSceneHandler::AddPrimitive | ( | const G4Square & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 155 of file G4XXXSceneHandler.cc.
References G4cout, G4endl, G4VSceneHandler::GetMarkerSize(), G4VSceneHandler::screen, and G4VSceneHandler::world.
00159 { 00160 #ifdef G4XXXDEBUG 00161 G4cout << 00162 "G4XXXSceneHandler::AddPrimitive(const G4Square& square) called.\n" 00163 << square 00164 << G4endl; 00165 MarkerSizeType sizeType; 00166 G4double size = GetMarkerSize (square, sizeType); 00167 switch (sizeType) { 00168 default: 00169 case screen: 00170 // Draw in screen coordinates. 00171 G4cout << "screen"; 00172 break; 00173 case world: 00174 // Draw in world coordinates. 00175 G4cout << "world"; 00176 break; 00177 } 00178 G4cout << " size: " << size << G4endl; 00179 PrintThings(); 00180 #endif 00181 // Get vis attributes - pick up defaults if none. 00182 //const G4VisAttributes* pVA = 00183 // fpViewer -> GetApplicableVisAttributes (square.GetVisAttributes ()); 00184 //?? Process square. 00185 }
void G4XXXSceneHandler::AddPrimitive | ( | const G4Circle & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 123 of file G4XXXSceneHandler.cc.
References G4cout, G4endl, G4VSceneHandler::GetMarkerSize(), G4VSceneHandler::screen, and G4VSceneHandler::world.
00127 { 00128 #ifdef G4XXXDEBUG 00129 G4cout << 00130 "G4XXXSceneHandler::AddPrimitive(const G4Circle& circle) called.\n" 00131 << circle 00132 << G4endl; 00133 MarkerSizeType sizeType; 00134 G4double size = GetMarkerSize (circle, sizeType); 00135 switch (sizeType) { 00136 default: 00137 case screen: 00138 // Draw in screen coordinates. 00139 G4cout << "screen"; 00140 break; 00141 case world: 00142 // Draw in world coordinates. 00143 G4cout << "world"; 00144 break; 00145 } 00146 G4cout << " size: " << size << G4endl; 00147 PrintThings(); 00148 #endif 00149 // Get vis attributes - pick up defaults if none. 00150 //const G4VisAttributes* pVA = 00151 // fpViewer -> GetApplicableVisAttributes (circle.GetVisAttributes ()); 00152 //?? Process circle. 00153 }
void G4XXXSceneHandler::AddPrimitive | ( | const G4Text & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 103 of file G4XXXSceneHandler.cc.
References G4cout, and G4endl.
00107 { 00108 #ifdef G4XXXDEBUG 00109 G4cout << 00110 "G4XXXSceneHandler::AddPrimitive(const G4Text& text) called.\n" 00111 << text 00112 << G4endl; 00113 PrintThings(); 00114 #endif 00115 // Get text colour - special method since default text colour is 00116 // determined by the default text vis attributes, which may be 00117 // specified independent of default vis attributes of other types of 00118 // visible objects. 00119 //const G4Colour& c = GetTextColour (text); // Picks up default if none. 00120 //?? Process text. 00121 }
void G4XXXSceneHandler::AddPrimitive | ( | const G4Polyline & | ) | [virtual] |
Implements G4VSceneHandler.
Definition at line 85 of file G4XXXSceneHandler.cc.
References G4cout, and G4endl.
00089 { 00090 #ifdef G4XXXDEBUG 00091 G4cout << 00092 "G4XXXSceneHandler::AddPrimitive(const G4Polyline& polyline) called.\n" 00093 << polyline 00094 << G4endl; 00095 PrintThings(); 00096 #endif 00097 // Get vis attributes - pick up defaults if none. 00098 //const G4VisAttributes* pVA = 00099 // fpViewer -> GetApplicableVisAttributes (polyline.GetVisAttributes ()); 00100 //?? Process polyline. 00101 }
friend class G4XXXViewer [friend] |
Definition at line 43 of file G4XXXSceneHandler.hh.
G4int G4XXXSceneHandler::fSceneIdCount = 0 [static, protected] |
Definition at line 69 of file G4XXXSceneHandler.hh.