36 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
41 void 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);
85 void G4OpenGLXmViewer::background_color_callback (Widget w,
90 G4OpenGLXmViewer* pView;
91 XtVaGetValues (XtParent(w),
105 SetBackgroundColour(
G4Colour(1.,1.,1.));
110 SetBackgroundColour(
G4Colour(0.,0.,0.));
115 (
"G4OpenGLXmViewer::background_color_callback",
117 "Unrecognised case in background_color_callback.");
125 void G4OpenGLXmViewer::transparency_callback (Widget w,
126 XtPointer clientData,
130 G4OpenGLXmViewer* pView;
131 XtVaGetValues (XtParent(w),
138 pView->transparency_enabled =
false;
142 pView->transparency_enabled =
true;
147 (
"G4OpenGLXmViewer::transparency_callback",
149 "Unrecognised case in transparency_callback.");
152 pView->SetNeedKernelVisit (
true);
158 void G4OpenGLXmViewer::antialias_callback (Widget w,
159 XtPointer clientData,
163 G4OpenGLXmViewer* pView;
164 XtVaGetValues (XtParent(w),
171 pView->antialiasing_enabled =
false;
172 glDisable (GL_LINE_SMOOTH);
173 glDisable (GL_POLYGON_SMOOTH);
177 pView->antialiasing_enabled =
true;
178 glEnable (GL_LINE_SMOOTH);
179 glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
180 glEnable (GL_POLYGON_SMOOTH);
181 glHint (GL_POLYGON_SMOOTH_HINT, GL_NICEST);
186 (
"G4OpenGLXmViewer::antialias_callback",
188 "Unrecognised case in antialiasing_callback.");
196 void G4OpenGLXmViewer::haloing_callback (Widget w,
197 XtPointer clientData,
201 G4OpenGLXmViewer* pView;
202 XtVaGetValues (XtParent(w),
209 pView->haloing_enabled =
false;
213 pView->haloing_enabled =
true;
218 (
"G4OpenGLXmViewer::haloing_callback",
220 "Unrecognised case in haloing_callback.");
228 void G4OpenGLXmViewer::aux_edge_callback (Widget w,
229 XtPointer clientData,
233 G4OpenGLXmViewer* pView;
234 XtVaGetValues (XtParent(w),
241 pView->fVP.SetAuxEdgeVisible(
false);
245 pView->fVP.SetAuxEdgeVisible(
true);
250 (
"G4OpenGLXmViewer::aux_edge_callback",
252 "Unrecognised case in aux_edge_callback.");
255 pView->SetNeedKernelVisit (
true);
261 void G4OpenGLXmViewer::projection_callback (Widget w,
262 XtPointer clientData,
265 G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
267 G4int choice = get_int_userData (w);
272 pView->fVP.SetFieldHalfAngle (0.);
278 if (pView->fov > 89.5 || pView->fov <= 0.0) {
279 G4cout <<
"Field half angle should be 0 < angle <= 89.5 degrees.";
283 pView->fVP.SetFieldHalfAngle (pView->fov *
deg);
290 (
"G4OpenGLXmViewer::projection_callback",
292 "Unrecognised choice made in projection_callback");
static constexpr double deg
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout