39#define GL2PS_TEXT_B TOOLS_GL2PS_TEXT_B
40#define GL2PS_TEXT_BL TOOLS_GL2PS_TEXT_BL
41#define GL2PS_TEXT_BR TOOLS_GL2PS_TEXT_BR
77fDefaultExportFilename(
"G4OpenGL"),
79fGl2psDefaultLineWith(1),
80fGl2psDefaultPointSize(2),
81fGlViewInitialized(false),
82fIsGettingPickInfos(false)
85 fVP.SetAutoRefresh(
true);
109 fExportFilename += fDefaultExportFilename +
"_" +
GetShortName().data();
133 glClearColor (0.0, 0.0, 0.0, 0.0);
135 glDisable (GL_LINE_SMOOTH);
136 glDisable (GL_POLYGON_SMOOTH);
137 glDisable (GL_POINT_SMOOTH);
143 glDepthFunc (GL_LEQUAL);
144 glDepthMask (GL_TRUE);
147 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
176 glClear (GL_COLOR_BUFFER_BIT);
177 glClear (GL_DEPTH_BUFFER_BIT);
178 glClear (GL_STENCIL_BUFFER_BIT);
186 fSizeHasChanged =
true;
188 fSizeHasChanged =
false;
205 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
207 if ((dims[0] !=0 ) && (dims[1] !=0)) {
210 G4cerr <<
"Try to resize view greater than max X viewport dimension. Desired size "<<
fWinSize_x <<
" is resize to "<< dims[0] <<
G4endl;
214 G4cerr <<
"Try to resize view greater than max Y viewport dimension. Desired size "<<
fWinSize_y <<
" is resize to "<< dims[1] <<
G4endl;
227 if (fIsGettingPickInfos)
return;
237 GLfloat lightPosition [4];
238 lightPosition [0] =
fVP.GetActualLightpointDirection().x();
239 lightPosition [1] =
fVP.GetActualLightpointDirection().y();
240 lightPosition [2] =
fVP.GetActualLightpointDirection().z();
241 lightPosition [3] = 0.;
243 GLfloat ambient [] = { 0.2f, 0.2f, 0.2f, 1.f};
244 GLfloat diffuse [] = { 0.8f, 0.8f, 0.8f, 1.f};
245 glEnable (GL_LIGHT0);
246 glLightfv (GL_LIGHT0, GL_AMBIENT, ambient);
247 glLightfv (GL_LIGHT0, GL_DIFFUSE, diffuse);
262 +
fVP.GetCurrentTargetPoint ();
264 if(radius<=0.) radius = 1.;
265 const G4double cameraDistance =
fVP.GetCameraDistance (radius);
267 targetPoint + cameraDistance *
fVP.GetViewpointDirection().unit();
268 const GLdouble pnear =
fVP.GetNearDistance (cameraDistance, radius);
269 const GLdouble pfar =
fVP.GetFarDistance (cameraDistance, pnear, radius);
270 const GLdouble right =
fVP.GetFrontHalfHeight (pnear, radius) * ratioY;
271 const GLdouble left = -right;
272 const GLdouble top =
fVP.GetFrontHalfHeight (pnear, radius) * ratioX;
273 const GLdouble bottom = -top;
279 glMatrixMode (GL_PROJECTION);
283 glScaled(scaleFactor.
x(),scaleFactor.
y(),scaleFactor.
z());
285 if (
fVP.GetFieldHalfAngle() == 0.) {
286 g4GlOrtho (left, right, bottom, top, pnear, pfar);
289 g4GlFrustum (left, right, bottom, top, pnear, pfar);
292 glMatrixMode (GL_MODELVIEW);
297 if (cameraDistance > 1.e-6 * radius) {
298 gltarget = targetPoint;
301 gltarget = targetPoint - radius *
fVP.GetViewpointDirection().unit();
304 const G4Point3D& pCamera = cameraPosition;
307 gltarget.
x(), gltarget.
y(), gltarget.
z(),
308 upVector.
x(), upVector.
y(), upVector.
z());
310 glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
342 size_t nPlanes = cutaways.size();
343 if (
fVP.IsCutaway() &&
346 a[0] = cutaways[0].a();
347 a[1] = cutaways[0].b();
348 a[2] = cutaways[0].c();
349 a[3] = cutaways[0].d();
350 glClipPlane (GL_CLIP_PLANE2, a);
351 glEnable (GL_CLIP_PLANE2);
353 a[0] = cutaways[1].a();
354 a[1] = cutaways[1].b();
355 a[2] = cutaways[1].c();
356 a[3] = cutaways[1].d();
357 glClipPlane (GL_CLIP_PLANE3, a);
358 glEnable (GL_CLIP_PLANE3);
361 a[0] = cutaways[2].a();
362 a[1] = cutaways[2].b();
363 a[2] = cutaways[2].c();
364 a[3] = cutaways[2].d();
365 glClipPlane (GL_CLIP_PLANE4, a);
366 glEnable (GL_CLIP_PLANE4);
369 glDisable (GL_CLIP_PLANE2);
370 glDisable (GL_CLIP_PLANE3);
371 glDisable (GL_CLIP_PLANE4);
398 glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
401 glDepthMask (GL_TRUE);
402 glDepthFunc (GL_LESS);
413 glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
414 glDepthFunc (GL_LEQUAL);
421 const std::vector < G4OpenGLViewerPickMap* > & pickMap =
GetPickDetails(x,y);
423 if (pickMap.size() == 0) {
426 for (
unsigned int a=0; a < pickMap.size(); a++) {
427 if (pickMap[a]->getAttributes().size() > 0) {
428 txt += pickMap[a]->print();
437 static std::vector < G4OpenGLViewerPickMap* > pickMapVector;
438 for (
auto pickMap: pickMapVector) {
441 pickMapVector.clear();
443 const G4int BUFSIZE = 512;
444 GLuint selectBuffer[BUFSIZE];
445 glSelectBuffer(BUFSIZE, selectBuffer);
446 glRenderMode(GL_SELECT);
449 glMatrixMode(GL_PROJECTION);
450 G4double currentProjectionMatrix[16];
451 glGetDoublev(GL_PROJECTION_MATRIX, currentProjectionMatrix);
455 glGetIntegerv(GL_VIEWPORT, viewport);
462 fIsGettingPickInfos =
true;
465 glMultMatrixd(currentProjectionMatrix);
466 glMatrixMode(GL_MODELVIEW);
468 GLint hits = glRenderMode(GL_RENDER);
469 fIsGettingPickInfos =
false;
471 G4cout <<
"Too many hits. Zoom in to reduce overlaps." <<
G4endl;
472 goto restoreMatrices;
475 GLuint* p = selectBuffer;
476 for (GLint i = 0; i < hits; ++i) {
477 GLuint nnames = *p++;
486 for (GLuint j = 0; j < nnames; ++j) {
488 std::map<GLuint, G4AttHolder*>::iterator iter =
492 if(attHolder && attHolder->
GetAttDefs().size()) {
493 for (
size_t iAtt = 0;
494 iAtt < attHolder->
GetAttDefs().size(); ++iAtt) {
495 std::ostringstream oss;
509 pickMapVector.push_back(pickMap);
518 glMatrixMode(GL_PROJECTION);
520 glMatrixMode(GL_MODELVIEW);
522 return pickMapVector;
525GLubyte* G4OpenGLViewer::grabPixels
526(
int inColor,
unsigned int width,
unsigned int height) {
529 GLint swapbytes, lsbfirst, rowlength;
530 GLint skiprows, skippixels, alignment;
536 size = width*height*3;
538 format = GL_LUMINANCE;
539 size = width*height*1;
542 buffer =
new GLubyte[size];
546 glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes);
547 glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst);
548 glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength);
550 glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows);
551 glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels);
552 glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment);
554 glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE);
555 glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE);
556 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
558 glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
559 glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
560 glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
562 glReadBuffer(GL_FRONT);
563 glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, format, GL_UNSIGNED_BYTE, (GLvoid*) buffer);
565 glPixelStorei (GL_UNPACK_SWAP_BYTES, swapbytes);
566 glPixelStorei (GL_UNPACK_LSB_FIRST, lsbfirst);
567 glPixelStorei (GL_UNPACK_ROW_LENGTH, rowlength);
569 glPixelStorei (GL_UNPACK_SKIP_ROWS, skiprows);
570 glPixelStorei (GL_UNPACK_SKIP_PIXELS, skippixels);
571 glPixelStorei (GL_UNPACK_ALIGNMENT, alignment);
576bool G4OpenGLViewer::printVectoredEPS() {
580bool G4OpenGLViewer::printNonVectoredEPS () {
582 int width = getRealExportWidth();
583 int height = getRealExportHeight();
588 int components,
pos, i;
592 if (pixels == NULL) {
593 G4cerr <<
"Failed to get pixels from OpenGl viewport" <<
G4endl;
602 fp = fopen (
name.c_str(),
"w");
608 fprintf (fp,
"%%!PS-Adobe-2.0 EPSF-1.2\n");
609 fprintf (fp,
"%%%%Title: %s\n",
name.c_str());
610 fprintf (fp,
"%%%%Creator: OpenGL pixmap render output\n");
611 fprintf (fp,
"%%%%BoundingBox: 0 0 %d %d\n", width, height);
612 fprintf (fp,
"%%%%EndComments\n");
613 fprintf (fp,
"gsave\n");
614 fprintf (fp,
"/bwproc {\n");
615 fprintf (fp,
" rgbproc\n");
616 fprintf (fp,
" dup length 3 idiv string 0 3 0 \n");
617 fprintf (fp,
" 5 -1 roll {\n");
618 fprintf (fp,
" add 2 1 roll 1 sub dup 0 eq\n");
619 fprintf (fp,
" { pop 3 idiv 3 -1 roll dup 4 -1 roll dup\n");
620 fprintf (fp,
" 3 1 roll 5 -1 roll } put 1 add 3 0 \n");
621 fprintf (fp,
" { 2 1 roll } ifelse\n");
622 fprintf (fp,
" }forall\n");
623 fprintf (fp,
" pop pop pop\n");
624 fprintf (fp,
"} def\n");
625 fprintf (fp,
"systemdict /colorimage known not {\n");
626 fprintf (fp,
" /colorimage {\n");
627 fprintf (fp,
" pop\n");
628 fprintf (fp,
" pop\n");
629 fprintf (fp,
" /rgbproc exch def\n");
630 fprintf (fp,
" { bwproc } image\n");
631 fprintf (fp,
" } def\n");
632 fprintf (fp,
"} if\n");
633 fprintf (fp,
"/picstr %d string def\n", width * components);
634 fprintf (fp,
"%d %d scale\n", width, height);
635 fprintf (fp,
"%d %d %d\n", width, height, 8);
636 fprintf (fp,
"[%d 0 0 %d 0 0]\n", width, height);
637 fprintf (fp,
"{currentfile picstr readhexstring pop}\n");
638 fprintf (fp,
"false %d\n", components);
639 fprintf (fp,
"colorimage\n");
641 curpix = (GLubyte*) pixels;
643 for (i = width*height*components; i>0; i--) {
644 fprintf (fp,
"%02hx ", (
unsigned short)(*(curpix++)));
653 fprintf (fp,
"grestore\n");
654 fprintf (fp,
"showpage\n");
679#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
682#ifdef G4VIS_BUILD_OPENGLX_DRIVER
685#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
688#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
692#if GL_ARB_framebuffer_object
725 fGL2PSAction->addTextOpt(textString.c_str(),
"Times-Roman",GLshort(size),align,0);
729 static G4int callCount = 0;
732 if (callCount <= 1) {
734 "G4OpenGLViewer::DrawText: Not implemented for \""
780 if ((width != -1) && (height != -1)) {
801 size_t len = strlen(setlocale(LC_NUMERIC,NULL));
802 char* oldLocale = (
char*)(
malloc(len+1));
803 if(oldLocale!=NULL) strncpy(oldLocale,setlocale(LC_NUMERIC,NULL),len);
804 setlocale(LC_NUMERIC,
"C");
807 res = printNonVectoredEPS();
809 res = printVectoredEPS();
814 setlocale(LC_NUMERIC,oldLocale);
833bool G4OpenGLViewer::printGl2PS() {
835 int width = getRealExportWidth();
836 int height = getRealExportHeight();
863 bool extendBuffer =
true;
864 bool endWriteAction =
false;
865 bool beginWriteAction =
true;
866 bool filePointerOk =
true;
867 while ((extendBuffer) && (! endWriteAction) && (filePointerOk)) {
870 if(beginWriteAction) {
872 ::glGetIntegerv(GL_VIEWPORT,vp);
884 if (beginWriteAction) {
898 if ((! endWriteAction) || (! beginWriteAction)) {
905 if (!extendBuffer ) {
906 G4cerr <<
"ERROR: gl2ps buffer size is not big enough to print this geometry. Try to extend it. No output produced"<<
G4endl;
909 if (!beginWriteAction ) {
913 if (!endWriteAction ) {
938 return fSizeHasChanged;
941G4int G4OpenGLViewer::getRealExportWidth() {
946 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
949 if ((dims[0] !=0 ) && (dims[1] !=0)) {
960G4int G4OpenGLViewer::getRealExportHeight() {
965 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
968 if ((dims[0] !=0 ) && (dims[1] !=0)) {
996 if ((name !=
"") && (fExportFilename != name)) {
1003 if (name.size() == 0) {
1007 std::string extension = name.substr(name.find_last_of(
".") + 1);
1009 if (extension.size() >= 3 && extension.size() <= 4) {
1011 fExportFilename = name.substr(0,name.find_last_of(
"."));
1016 fExportFilename = name;
1023 std::string temp = fExportFilename;
1025 temp += std::string(
"_");
1026 std::ostringstream os;
1028 std::string nb_str = os.str();
1042 +
fVP.GetCurrentTargetPoint ();
1044 if(radius<=0.) radius = 1.;
1045 const G4double cameraDistance =
fVP.GetCameraDistance (radius);
1046 const GLdouble pnear =
fVP.GetNearDistance (cameraDistance, radius);
1047 return 2 *
fVP.GetFrontHalfHeight (pnear, radius);
1057 +
fVP.GetCurrentTargetPoint ();
1059 if(radius<=0.) radius = 1.;
1060 const G4double cameraDistance =
fVP.GetCameraDistance (radius);
1061 const GLdouble pnear =
fVP.GetNearDistance (cameraDistance, radius);
1062 const GLdouble pfar =
fVP.GetFarDistance (cameraDistance, pnear, radius);
1063 return 2 *
fVP.GetFrontHalfHeight (pfar, radius);
1074 +
fVP.GetCurrentTargetPoint ();
1076 if(radius<=0.) radius = 1.;
1077 const G4double cameraDistance =
fVP.GetCameraDistance (radius);
1078 const GLdouble pnear =
fVP.GetNearDistance (cameraDistance, radius);
1079 return fVP.GetFarDistance (cameraDistance, pnear, radius)- pnear;
1087 rotateSceneInViewDirection(dx,dy);
1090 rotateSceneThetaPhi(dx,0);
1093 rotateSceneThetaPhi(0,dy);
1102 rotateSceneInViewDirection(dx,dy);
1105 rotateSceneThetaPhi(dx,0);
1108 rotateSceneThetaPhi(0,dy);
1143 vp =
fVP.GetViewpointDirection ().unit ();
1144 up =
fVP.GetUpVector ().unit ();
1149 if (
fVP.GetLightsMoveWithCamera()) {
1157 delta_alpha *= CLHEP::deg;
1158 delta_theta *= CLHEP::deg;
1160 new_vp = std::cos(delta_alpha) * vp + std::sin(delta_alpha) * zprime;
1165 if (
fVP.GetLightsMoveWithCamera()) {
1167 if (new_vp.
z()*vp.
z() <0) {
1168 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1172 if (new_vp.
z()*vp.
z() <0) {
1173 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1176 fVP.SetUpVector(new_up);
1180 cosalpha = new_up.
dot (new_vp.
unit());
1181 sinalpha = std::sqrt (1. - std::pow (cosalpha, 2));
1183 xprime = yprime.
cross (new_up);
1185 a1 = sinalpha * xprime;
1187 a2 = sinalpha * (std::cos (delta_theta) * xprime + std::sin (delta_theta) * yprime);
1191 viewPoint = new_vp.
unit() + delta;
1193 fVP.SetViewAndLights (viewPoint);
1223 vp =
fVP.GetViewpointDirection ().unit();
1224 up =
fVP.GetUpVector ().unit();
1227 up.
z()*vp.
x()-up.
x()*vp.
z(),
1228 up.
x()*vp.
y()-up.
y()*vp.
x());
1230 viewPoint = vp/
fRot_sens + (zPrimeVector*dx - up*dy) ;
1231 new_up =
G4Vector3D(viewPoint.
y()*zPrimeVector.
z()-viewPoint.
z()*zPrimeVector.
y(),
1232 viewPoint.
z()*zPrimeVector.
x()-viewPoint.
x()*zPrimeVector.
z(),
1233 viewPoint.
x()*zPrimeVector.
y()-viewPoint.
y()*zPrimeVector.
x());
1239 fVP.SetUpVector(new_upUnit);
1240 fVP.SetViewAndLights (viewPoint);
1256 G4cout <<
" Changing export format to \"" << format <<
"\"" <<
G4endl;
1266 if (format.size() == 0) {
1267 G4cout <<
" Current formats availables are : " << list <<
G4endl;
1269 G4cerr <<
" Format \"" << format <<
"\" is not available for the selected viewer. Current formats availables are : " << list <<
G4endl;
1286 sx = viewport[2] / width;
1287 sy = viewport[3] / height;
1288 tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width;
1289 ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height;
1291#define M(row, col) mat[col*4+row]
1322 GLdouble centerx, GLdouble centery, GLdouble
1324 GLdouble upx, GLdouble upy, GLdouble upz )
1327 GLdouble x[3], y[3], z[3];
1333 z[0] = eyex - centerx;
1334 z[1] = eyey - centery;
1335 z[2] = eyez - centerz;
1336 mag = std::sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]);
1349 x[0] = y[1] * z[2] - y[2] * z[1];
1350 x[1] = -y[0] * z[2] + y[2] * z[0];
1351 x[2] = y[0] * z[1] - y[1] * z[0];
1354 y[0] = z[1] * x[2] - z[2] * x[1];
1355 y[1] = -z[0] * x[2] + z[2] * x[0];
1356 y[2] = z[0] * x[1] - z[1] * x[0];
1363 mag = std::sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
1370 mag = std::sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]);
1377#define M(row,col) mat[col*4+row]
1398 glTranslated(-eyex, -eyey, -eyez);
1404 GLdouble a = 2.0 / (right - left);
1405 GLdouble b = 2.0 / (top - bottom);
1406 GLdouble c = -2.0 / (zFar - zNear);
1408 GLdouble tx = - (right + left)/(right - left);
1409 GLdouble ty = - (top + bottom)/(top - bottom);
1410 GLdouble tz = - (zFar + zNear)/(zFar - zNear);
1412 GLdouble ortho[16] = {
1418 glMultMatrixd(ortho);
1426 GLdouble deltaX = right - left;
1427 GLdouble deltaY = top - bottom;
1428 GLdouble deltaZ = zFar - zNear;
1430 GLdouble a = 2.0f * zNear / deltaX;
1431 GLdouble b = 2.0f * zNear / deltaY;
1432 GLdouble c = (right + left) / deltaX;
1433 GLdouble d = (top + bottom) / deltaY;
1434 GLdouble e = -(zFar + zNear) / (zFar - zNear);
1435 GLdouble f = -2.0f * zFar * zNear / deltaZ;
1437 GLdouble proj[16] = {
1444 glMultMatrixd(proj);
1449 std::ostringstream txt;
1450 for (
unsigned int a=0; a<fAttributes.size(); a++) {
1451 txt << fAttributes[a];
1452 if (a < fAttributes.size() - 1) txt <<
"\n";
G4double Y(G4double density)
HepGeom::Normal3D< G4double > G4Normal3D
HepGeom::Point3D< G4double > G4Point3D
HepGeom::Vector3D< G4double > G4Vector3D
std::vector< G4Plane3D > G4Planes
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
const std::vector< const std::vector< G4AttValue > * > & GetAttValues() const
const std::vector< const std::map< G4String, G4AttDef > * > & GetAttDefs() const
static void SetFlushAction(FlushAction action)
static FlushAction GetFlushAction()
void setSubHitNumber(G4int n)
void setHitNumber(G4int n)
void addAttributes(G4String att)
void setPickName(G4int n)
void g4GluPickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4])
void g4GlFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
std::vector< std::string > fExportImageFormatVector
friend class G4OpenGLSceneHandler
void g4GluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz)
void rotateSceneToggle(G4double dx, G4double dy)
bool setExportImageFormat(std::string format, bool quiet=false)
unsigned int getWinHeight() const
std::string fExportImageFormat
void ClearViewWithoutFlush()
void ResizeWindow(unsigned int, unsigned int)
unsigned int getWinWidth() const
std::string fDefaultExportImageFormat
bool setExportFilename(G4String name, G4bool inc=true)
G4OpenGLViewer(G4OpenGLSceneHandler &scene)
void addExportImageFormat(std::string format)
G4bool antialiasing_enabled
void ChangeLineWidth(G4double width)
virtual void DrawText(const G4Text &)
GLdouble getSceneFarWidth()
void setExportSize(G4int, G4int)
virtual G4String Pick(GLdouble x, GLdouble y)
void rotateScene(G4double dx, G4double dy)
void ChangePointSize(G4double size)
G4bool isFramebufferReady()
G4bool transparency_enabled
virtual bool exportImage(std::string name="", int width=-1, int height=-1)
void g4GlOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
G4OpenGLSceneHandler & fOpenGLSceneHandler
virtual ~G4OpenGLViewer()
std::string getRealPrintFilename()
G4double GetSceneNearWidth()
const std::vector< G4OpenGLViewerPickMap * > & GetPickDetails(GLdouble x, GLdouble y)
G4Point3D GetPosition() const
G4Scene * GetScene() const
virtual void DrawView()=0
G4VSceneHandler & fSceneHandler
G4ViewParameters fDefaultVP
const G4String & GetShortName() const
virtual void FinishView()
G4VViewer(G4VSceneHandler &, G4int id, const G4String &name="")
void setFileName(const char *)
void setViewport(int, int, int, int)
BasicVector3D< T > cross(const BasicVector3D< T > &v) const
BasicVector3D< T > unit() const
void set(T x1, T y1, T z1)
T dot(const BasicVector3D< T > &v) const
tools_GLint(* tools_glRenderMode_func)(tools_GLenum)
void(* tools_glVertex3f_func)(tools_GLfloat, tools_GLfloat, tools_GLfloat)
void(* tools_glGetFloatv_func)(tools_GLenum, tools_GLfloat *)
void(* tools_glBegin_func)(tools_GLenum)
void(* tools_glFeedbackBuffer_func)(tools_GLsizei, tools_GLenum, tools_GLfloat *)
void(* tools_glPassThrough_func)(tools_GLfloat)
void(* tools_glGetBooleanv_func)(tools_GLenum, tools_GLboolean *)
void(* tools_glEnd_func)()
void(* tools_glGetIntegerv_func)(tools_GLenum, tools_GLint *)
tools_GLboolean(* tools_glIsEnabled_func)(tools_GLenum)
const char * name(G4int ptype)