36#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
41void G4OpenGLXmViewer::drawing_style_callback (Widget w,
46 G4OpenGLXmViewer* pView;
47 XtVaGetValues (XtParent(w),
73 (
"G4OpenGLXmViewer::drawing_style_callback",
75 "Unrecognised case in drawing_style_callback.");
78 pView->fVP.SetDrawingStyle (style);
85void G4OpenGLXmViewer::rep_style_callback (Widget w,
90 G4OpenGLXmViewer* pView;
91 XtVaGetValues (XtParent(w),
109 (
"G4OpenGLXmViewer::rep_style_callback",
111 "Unrecognised case in rep_style_callback.");
114 pView->fVP.SetRepStyle (style);
121void G4OpenGLXmViewer::background_color_callback (Widget w,
122 XtPointer clientData,
126 G4OpenGLXmViewer* pView;
127 XtVaGetValues (XtParent(w),
141 SetBackgroundColour(
G4Colour(1.,1.,1.));
146 SetBackgroundColour(
G4Colour(0.,0.,0.));
151 (
"G4OpenGLXmViewer::background_color_callback",
153 "Unrecognised case in background_color_callback.");
161void G4OpenGLXmViewer::transparency_callback (Widget w,
162 XtPointer clientData,
166 G4OpenGLXmViewer* pView;
167 XtVaGetValues (XtParent(w),
174 pView->transparency_enabled =
false;
178 pView->transparency_enabled =
true;
183 (
"G4OpenGLXmViewer::transparency_callback",
185 "Unrecognised case in transparency_callback.");
188 pView->SetNeedKernelVisit (
true);
194void G4OpenGLXmViewer::antialias_callback (Widget w,
195 XtPointer clientData,
199 G4OpenGLXmViewer* pView;
200 XtVaGetValues (XtParent(w),
207 pView->antialiasing_enabled =
false;
208 glDisable (GL_LINE_SMOOTH);
209 glDisable (GL_POLYGON_SMOOTH);
213 pView->antialiasing_enabled =
true;
214 glEnable (GL_LINE_SMOOTH);
215 glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
216 glEnable (GL_POLYGON_SMOOTH);
217 glHint (GL_POLYGON_SMOOTH_HINT, GL_NICEST);
222 (
"G4OpenGLXmViewer::antialias_callback",
224 "Unrecognised case in antialiasing_callback.");
232void G4OpenGLXmViewer::haloing_callback (Widget w,
233 XtPointer clientData,
237 G4OpenGLXmViewer* pView;
238 XtVaGetValues (XtParent(w),
245 pView->haloing_enabled =
false;
249 pView->haloing_enabled =
true;
254 (
"G4OpenGLXmViewer::haloing_callback",
256 "Unrecognised case in haloing_callback.");
264void G4OpenGLXmViewer::aux_edge_callback (Widget w,
265 XtPointer clientData,
269 G4OpenGLXmViewer* pView;
270 XtVaGetValues (XtParent(w),
277 pView->fVP.SetAuxEdgeVisible(
false);
281 pView->fVP.SetAuxEdgeVisible(
true);
286 (
"G4OpenGLXmViewer::aux_edge_callback",
288 "Unrecognised case in aux_edge_callback.");
291 pView->SetNeedKernelVisit (
true);
297void G4OpenGLXmViewer::projection_callback (Widget w,
298 XtPointer clientData,
301 G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
303 G4int choice = get_int_userData (w);
308 pView->fVP.SetFieldHalfAngle (0.);
314 if (pView->fov > 89.5 || pView->fov <= 0.0) {
315 G4cout <<
"Field half angle should be 0 < angle <= 89.5 degrees.";
319 pView->fVP.SetFieldHalfAngle (pView->fov * deg);
326 (
"G4OpenGLXmViewer::projection_callback",
328 "Unrecognised choice made in projection_callback");
G4DLLIMPORT std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)