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
54#ifdef G4OPENGL_VERSION_2
67#ifdef G4OPENGL_VERSION_2
72fOpenGLSceneHandler(scene),
74transparency_enabled (true),
75antialiasing_enabled (false),
76haloing_enabled (false),
81fDefaultExportImageFormat(
"pdf"),
82fExportImageFormat(
"pdf"),
83fExportFilenameIndex(0),
87fDefaultExportFilename(
"G4OpenGL"),
89fGl2psDefaultLineWith(1),
90fGl2psDefaultPointSize(2),
91fGlViewInitialized(false),
92fIsGettingPickInfos(false)
93#ifdef G4OPENGL_VERSION_2
95,fVertexPositionAttribute(0)
96,fVertexNormalAttribute(0)
128 fExportFilename += fDefaultExportFilename +
"_" +
GetShortName().data();
145#ifdef G4OPENGL_VERSION_2
149 fShaderProgram = glCreateProgram();
150 Shader vertexShader = glCreateShader(GL_VERTEX_SHADER);
151 const char * vSrc = fVboDrawer->getVertexShaderSrc();
152 glShaderSource(vertexShader, 1, &vSrc, NULL);
153 glCompileShader(vertexShader);
154 glAttachShader(fShaderProgram, vertexShader);
156 Shader fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
157 const char * fSrc = fVboDrawer->getFragmentShaderSrc();
158 glShaderSource(fragmentShader, 1, &fSrc, NULL);
159 glCompileShader(fragmentShader);
161 glAttachShader(fShaderProgram, fragmentShader);
162 glLinkProgram(fShaderProgram);
163 glUseProgram(fShaderProgram);
170 fVertexPositionAttribute =
171 glGetAttribLocation(fShaderProgram,
"aVertexPosition");
174 glEnableVertexAttribArray(fVertexPositionAttribute);
177 fpMatrixUniform = glGetUniformLocation(fShaderProgram,
"uPMatrix");
178 fcMatrixUniform = glGetUniformLocation(fShaderProgram,
"uCMatrix");
179 fmvMatrixUniform = glGetUniformLocation(fShaderProgram,
"uMVMatrix");
180 fnMatrixUniform = glGetUniformLocation(fShaderProgram,
"uNMatrix");
181 ftMatrixUniform = glGetUniformLocation(fShaderProgram,
"uTMatrix");
189 fGlViewInitialized =
true;
200 glClearColor (0.0, 0.0, 0.0, 0.0);
202#ifndef G4OPENGL_VERSION_2
203 glDisable (GL_LINE_SMOOTH);
204 glDisable (GL_POLYGON_SMOOTH);
211 glDepthFunc (GL_LEQUAL);
212 glDepthMask (GL_TRUE);
215 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
244 glClear (GL_COLOR_BUFFER_BIT);
245 glClear (GL_DEPTH_BUFFER_BIT);
246 glClear (GL_STENCIL_BUFFER_BIT);
254 fSizeHasChanged =
true;
256 fSizeHasChanged =
false;
273 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
275 if ((dims[0] !=0 ) && (dims[1] !=0)) {
278 G4cerr <<
"Try to resize view greater than max X viewport dimension. Desired size "<<
fWinSize_x <<
" is resize to "<< dims[0] <<
G4endl;
282 G4cerr <<
"Try to resize view greater than max Y viewport dimension. Desired size "<<
fWinSize_y <<
" is resize to "<< dims[1] <<
G4endl;
295 if (fIsGettingPickInfos)
return;
305 GLfloat lightPosition [4];
309 lightPosition [3] = 0.;
311 GLfloat ambient [] = { 0.2f, 0.2f, 0.2f, 1.f};
312 GLfloat diffuse [] = { 0.8f, 0.8f, 0.8f, 1.f};
313 glEnable (GL_LIGHT0);
314 glLightfv (GL_LIGHT0, GL_AMBIENT, ambient);
315 glLightfv (GL_LIGHT0, GL_DIFFUSE, diffuse);
332 if(radius<=0.) radius = 1.;
339 const GLdouble left = -right;
341 const GLdouble bottom = -top;
347 glMatrixMode (GL_PROJECTION);
351 glScaled(scaleFactor.
x(),scaleFactor.
y(),scaleFactor.
z());
354 g4GlOrtho (left, right, bottom, top, pnear, pfar);
357 g4GlFrustum (left, right, bottom, top, pnear, pfar);
360 glMatrixMode (GL_MODELVIEW);
365 if (cameraDistance > 1.e-6 * radius) {
366 gltarget = targetPoint;
372 const G4Point3D& pCamera = cameraPosition;
375 gltarget.
x(), gltarget.
y(), gltarget.
z(),
376 upVector.
x(), upVector.
y(), upVector.
z());
378 glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
410 size_t nPlanes = cutaways.size();
414 a[0] = cutaways[0].a();
415 a[1] = cutaways[0].b();
416 a[2] = cutaways[0].c();
417 a[3] = cutaways[0].d();
418 glClipPlane (GL_CLIP_PLANE2, a);
419 glEnable (GL_CLIP_PLANE2);
421 a[0] = cutaways[1].a();
422 a[1] = cutaways[1].b();
423 a[2] = cutaways[1].c();
424 a[3] = cutaways[1].d();
425 glClipPlane (GL_CLIP_PLANE3, a);
426 glEnable (GL_CLIP_PLANE3);
429 a[0] = cutaways[2].a();
430 a[1] = cutaways[2].b();
431 a[2] = cutaways[2].c();
432 a[3] = cutaways[2].d();
433 glClipPlane (GL_CLIP_PLANE4, a);
434 glEnable (GL_CLIP_PLANE4);
437 glDisable (GL_CLIP_PLANE2);
438 glDisable (GL_CLIP_PLANE3);
439 glDisable (GL_CLIP_PLANE4);
466 glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
469 glDepthMask (GL_TRUE);
470 glDepthFunc (GL_LESS);
481 glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
482 glDepthFunc (GL_LEQUAL);
489 const std::vector < G4OpenGLViewerPickMap* > & pickMap =
GetPickDetails(x,y);
491 if (pickMap.size() == 0) {
494 for (
unsigned int a=0; a < pickMap.size(); a++) {
495 if (pickMap[a]->getAttributes().size() > 0) {
496 txt += pickMap[a]->print();
505 static std::vector < G4OpenGLViewerPickMap* > pickMapVector;
506 for (
auto pickMap: pickMapVector) {
509 pickMapVector.clear();
511 const G4int BUFSIZE = 512;
512 GLuint selectBuffer[BUFSIZE];
513 glSelectBuffer(BUFSIZE, selectBuffer);
514 glRenderMode(GL_SELECT);
517 glMatrixMode(GL_PROJECTION);
518 G4double currentProjectionMatrix[16];
519 glGetDoublev(GL_PROJECTION_MATRIX, currentProjectionMatrix);
523 glGetIntegerv(GL_VIEWPORT, viewport);
530 fIsGettingPickInfos =
true;
533 glMultMatrixd(currentProjectionMatrix);
534 glMatrixMode(GL_MODELVIEW);
536 GLint hits = glRenderMode(GL_RENDER);
537 fIsGettingPickInfos =
false;
539 G4cout <<
"Too many hits. Zoom in to reduce overlaps." <<
G4endl;
540 goto restoreMatrices;
543 GLuint* p = selectBuffer;
544 for (GLint i = 0; i < hits; ++i) {
545 GLuint nnames = *p++;
554 for (GLuint j = 0; j < nnames; ++j) {
556 std::map<GLuint, G4AttHolder*>::iterator iter =
560 if(attHolder && attHolder->
GetAttDefs().size()) {
561 for (
size_t iAtt = 0;
562 iAtt < attHolder->
GetAttDefs().size(); ++iAtt) {
563 std::ostringstream oss;
577 pickMapVector.push_back(pickMap);
586 glMatrixMode(GL_PROJECTION);
588 glMatrixMode(GL_MODELVIEW);
590 return pickMapVector;
593GLubyte* G4OpenGLViewer::grabPixels
594(
int inColor,
unsigned int width,
unsigned int height) {
597 GLint swapbytes, lsbfirst, rowlength;
598 GLint skiprows, skippixels, alignment;
604 size = width*height*3;
606 format = GL_LUMINANCE;
607 size = width*height*1;
610 buffer =
new GLubyte[size];
614 glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes);
615 glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst);
616 glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength);
618 glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows);
619 glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels);
620 glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment);
622 glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE);
623 glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE);
624 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
626 glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
627 glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
628 glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
630 glReadBuffer(GL_FRONT);
631 glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, format, GL_UNSIGNED_BYTE, (GLvoid*) buffer);
633 glPixelStorei (GL_UNPACK_SWAP_BYTES, swapbytes);
634 glPixelStorei (GL_UNPACK_LSB_FIRST, lsbfirst);
635 glPixelStorei (GL_UNPACK_ROW_LENGTH, rowlength);
637 glPixelStorei (GL_UNPACK_SKIP_ROWS, skiprows);
638 glPixelStorei (GL_UNPACK_SKIP_PIXELS, skippixels);
639 glPixelStorei (GL_UNPACK_ALIGNMENT, alignment);
644bool G4OpenGLViewer::printVectoredEPS() {
648bool G4OpenGLViewer::printNonVectoredEPS () {
650 int width = getRealExportWidth();
651 int height = getRealExportHeight();
656 int components,
pos, i;
660 if (pixels == NULL) {
661 G4cerr <<
"Failed to get pixels from OpenGl viewport" <<
G4endl;
670 fp = fopen (
name.c_str(),
"w");
676 fprintf (fp,
"%%!PS-Adobe-2.0 EPSF-1.2\n");
677 fprintf (fp,
"%%%%Title: %s\n",
name.c_str());
678 fprintf (fp,
"%%%%Creator: OpenGL pixmap render output\n");
679 fprintf (fp,
"%%%%BoundingBox: 0 0 %d %d\n", width, height);
680 fprintf (fp,
"%%%%EndComments\n");
681 fprintf (fp,
"gsave\n");
682 fprintf (fp,
"/bwproc {\n");
683 fprintf (fp,
" rgbproc\n");
684 fprintf (fp,
" dup length 3 idiv string 0 3 0 \n");
685 fprintf (fp,
" 5 -1 roll {\n");
686 fprintf (fp,
" add 2 1 roll 1 sub dup 0 eq\n");
687 fprintf (fp,
" { pop 3 idiv 3 -1 roll dup 4 -1 roll dup\n");
688 fprintf (fp,
" 3 1 roll 5 -1 roll } put 1 add 3 0 \n");
689 fprintf (fp,
" { 2 1 roll } ifelse\n");
690 fprintf (fp,
" }forall\n");
691 fprintf (fp,
" pop pop pop\n");
692 fprintf (fp,
"} def\n");
693 fprintf (fp,
"systemdict /colorimage known not {\n");
694 fprintf (fp,
" /colorimage {\n");
695 fprintf (fp,
" pop\n");
696 fprintf (fp,
" pop\n");
697 fprintf (fp,
" /rgbproc exch def\n");
698 fprintf (fp,
" { bwproc } image\n");
699 fprintf (fp,
" } def\n");
700 fprintf (fp,
"} if\n");
701 fprintf (fp,
"/picstr %d string def\n", width * components);
702 fprintf (fp,
"%d %d scale\n", width, height);
703 fprintf (fp,
"%d %d %d\n", width, height, 8);
704 fprintf (fp,
"[%d 0 0 %d 0 0]\n", width, height);
705 fprintf (fp,
"{currentfile picstr readhexstring pop}\n");
706 fprintf (fp,
"false %d\n", components);
707 fprintf (fp,
"colorimage\n");
709 curpix = (GLubyte*) pixels;
711 for (i = width*height*components; i>0; i--) {
712 fprintf (fp,
"%02hx ", (
unsigned short)(*(curpix++)));
721 fprintf (fp,
"grestore\n");
722 fprintf (fp,
"showpage\n");
747#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
750#ifdef G4VIS_BUILD_OPENGLX_DRIVER
753#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
756#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
760#if GL_ARB_framebuffer_object
797 static G4int callCount = 0;
800 if (callCount <= 1) {
802 "G4OpenGLViewer::DrawText: Not implemented for \""
848 if ((width != -1) && (height != -1)) {
869 size_t len = strlen(setlocale(LC_NUMERIC,NULL));
870 char* oldLocale = (
char*)(malloc(len+1));
871 if(oldLocale!=NULL) strncpy(oldLocale,setlocale(LC_NUMERIC,NULL),len);
872 setlocale(LC_NUMERIC,
"C");
875 res = printNonVectoredEPS();
877 res = printVectoredEPS();
882 setlocale(LC_NUMERIC,oldLocale);
901bool G4OpenGLViewer::printGl2PS() {
903 int width = getRealExportWidth();
904 int height = getRealExportHeight();
931 bool extendBuffer =
true;
932 bool endWriteAction =
false;
933 bool beginWriteAction =
true;
934 bool filePointerOk =
true;
935 while ((extendBuffer) && (! endWriteAction) && (filePointerOk)) {
938 if(beginWriteAction) {
940 ::glGetIntegerv(GL_VIEWPORT,vp);
952 if (beginWriteAction) {
966 if ((! endWriteAction) || (! beginWriteAction)) {
973 if (!extendBuffer ) {
974 G4cerr <<
"ERROR: gl2ps buffer size is not big enough to print this geometry. Try to extend it. No output produced"<<
G4endl;
977 if (!beginWriteAction ) {
981 if (!endWriteAction ) {
1006 return fSizeHasChanged;
1009G4int G4OpenGLViewer::getRealExportWidth() {
1014 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
1017 if ((dims[0] !=0 ) && (dims[1] !=0)) {
1028G4int G4OpenGLViewer::getRealExportHeight() {
1033 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
1036 if ((dims[0] !=0 ) && (dims[1] !=0)) {
1064 if ((name !=
"") && (fExportFilename != name)) {
1071 if (name.size() == 0) {
1075 std::string extension = name.substr(name.find_last_of(
".") + 1);
1077 if (extension.size() >= 3 && extension.size() <= 4) {
1079 fExportFilename = name.substr(0,name.find_last_of(
"."));
1084 fExportFilename = name;
1091 std::string temp = fExportFilename;
1093 temp += std::string(
"_");
1094 std::ostringstream os;
1096 std::string nb_str = os.str();
1112 if(radius<=0.) radius = 1.;
1127 if(radius<=0.) radius = 1.;
1144 if(radius<=0.) radius = 1.;
1155 rotateSceneInViewDirection(dx,dy);
1158 rotateSceneThetaPhi(dx,0);
1161 rotateSceneThetaPhi(0,dy);
1170 rotateSceneInViewDirection(dx,dy);
1173 rotateSceneThetaPhi(dx,0);
1176 rotateSceneThetaPhi(0,dy);
1214 yprime = (up.
cross(vp)).unit();
1215 zprime = (vp.
cross(yprime)).unit();
1225 delta_alpha *= CLHEP::deg;
1226 delta_theta *= CLHEP::deg;
1228 new_vp = std::cos(delta_alpha) * vp + std::sin(delta_alpha) * zprime;
1234 new_up = (new_vp.
cross(yprime)).unit();
1235 if (new_vp.
z()*vp.
z() <0) {
1236 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1240 if (new_vp.
z()*vp.
z() <0) {
1241 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1248 cosalpha = new_up.
dot (new_vp.
unit());
1249 sinalpha = std::sqrt (1. - std::pow (cosalpha, 2));
1250 yprime = (new_up.
cross (new_vp.
unit())).unit ();
1251 xprime = yprime.
cross (new_up);
1253 a1 = sinalpha * xprime;
1255 a2 = sinalpha * (std::cos (delta_theta) * xprime + std::sin (delta_theta) * yprime);
1259 viewPoint = new_vp.
unit() + delta;
1295 up.
z()*vp.
x()-up.
x()*vp.
z(),
1296 up.
x()*vp.
y()-up.
y()*vp.
x());
1298 viewPoint = vp/
fRot_sens + (zPrimeVector*dx - up*dy) ;
1299 new_up =
G4Vector3D(viewPoint.
y()*zPrimeVector.
z()-viewPoint.
z()*zPrimeVector.
y(),
1300 viewPoint.
z()*zPrimeVector.
x()-viewPoint.
x()*zPrimeVector.
z(),
1301 viewPoint.
x()*zPrimeVector.
y()-viewPoint.
y()*zPrimeVector.
x());
1324 G4cout <<
" Changing export format to \"" << format <<
"\"" <<
G4endl;
1334 if (format.size() == 0) {
1335 G4cout <<
" Current formats availables are : " << list <<
G4endl;
1337 G4cerr <<
" Format \"" << format <<
"\" is not available for the selected viewer. Current formats availables are : " << list <<
G4endl;
1354 sx = viewport[2] / width;
1355 sy = viewport[3] / height;
1356 tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width;
1357 ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height;
1359#define M(row, col) mat[col*4+row]
1390 GLdouble centerx, GLdouble centery, GLdouble
1392 GLdouble upx, GLdouble upy, GLdouble upz )
1395 GLdouble x[3], y[3], z[3];
1401 z[0] = eyex - centerx;
1402 z[1] = eyey - centery;
1403 z[2] = eyez - centerz;
1404 mag = std::sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]);
1417 x[0] = y[1] * z[2] - y[2] * z[1];
1418 x[1] = -y[0] * z[2] + y[2] * z[0];
1419 x[2] = y[0] * z[1] - y[1] * z[0];
1422 y[0] = z[1] * x[2] - z[2] * x[1];
1423 y[1] = -z[0] * x[2] + z[2] * x[0];
1424 y[2] = z[0] * x[1] - z[1] * x[0];
1431 mag = std::sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
1438 mag = std::sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]);
1445#define M(row,col) mat[col*4+row]
1466 glTranslated(-eyex, -eyey, -eyez);
1472 GLdouble a = 2.0 / (right - left);
1473 GLdouble b = 2.0 / (top - bottom);
1474 GLdouble c = -2.0 / (zFar - zNear);
1476 GLdouble tx = - (right + left)/(right - left);
1477 GLdouble ty = - (top + bottom)/(top - bottom);
1478 GLdouble tz = - (zFar + zNear)/(zFar - zNear);
1480 GLdouble ortho[16] = {
1486 glMultMatrixd(ortho);
1494 GLdouble deltaX = right - left;
1495 GLdouble deltaY = top - bottom;
1496 GLdouble deltaZ = zFar - zNear;
1498 GLdouble a = 2.0f * zNear / deltaX;
1499 GLdouble b = 2.0f * zNear / deltaY;
1500 GLdouble c = (right + left) / deltaX;
1501 GLdouble d = (top + bottom) / deltaY;
1502 GLdouble e = -(zFar + zNear) / (zFar - zNear);
1503 GLdouble f = -2.0f * zFar * zNear / deltaZ;
1505 GLdouble proj[16] = {
1512 glMultMatrixd(proj);
1517#ifdef G4OPENGL_VERSION_2
1520void G4OpenGLViewer::setVboDrawer(G4OpenGLVboDrawer* drawer) {
1521 fVboDrawer = drawer;
1524 sh.setVboDrawer(fVboDrawer);
1525 }
catch(std::bad_cast exp) { }
1532 std::ostringstream txt;
1533 for (
unsigned int a=0; a<fAttributes.size(); a++) {
1534 txt << fAttributes[a];
1535 if (a < fAttributes.size() - 1) txt <<
"\n";
G4double Y(G4double density)
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
G4double GetGreen() const
static void SetFlushAction(FlushAction action)
static FlushAction GetFlushAction()
std::map< GLuint, G4AttHolder * > fPickMap
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
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
bool setExportFilename(G4String name, G4bool inc=true)
G4OpenGLViewer(G4OpenGLSceneHandler &scene)
void addExportImageFormat(std::string format)
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()
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()
GLdouble getSceneNearWidth()
const std::vector< G4OpenGLViewerPickMap * > & GetPickDetails(GLdouble x, GLdouble y)
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
G4Point3D GetPosition() const
G4Scene * GetScene() const
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
virtual void DrawView()=0
G4VSceneHandler & fSceneHandler
G4ViewParameters fDefaultVP
const G4String & GetShortName() const
virtual void FinishView()
void SetViewAndLights(const G4Vector3D &viewpointDirection)
const G4Vector3D & GetScaleFactor() const
void SetAutoRefresh(G4bool)
CutawayMode GetCutawayMode() const
G4double GetCameraDistance(G4double radius) const
unsigned int GetWindowSizeHintX() const
G4Vector3D & GetActualLightpointDirection()
const G4Colour & GetBackgroundColour() const
const G4Vector3D & GetViewpointDirection() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetFarDistance(G4double cameraDistance, G4double nearDistance, G4double radius) const
G4double GetFieldHalfAngle() const
G4double GetFrontHalfHeight(G4double nearDistance, G4double radius) const
const G4Vector3D & GetUpVector() const
void SetUpVector(const G4Vector3D &upVector)
const G4Planes & GetCutawayPlanes() const
RotationStyle GetRotationStyle() const
unsigned int GetWindowSizeHintY() const
G4bool GetLightsMoveWithCamera() const
G4double GetNearDistance(G4double cameraDistance, G4double radius) const
G4double GetExtentRadius() const
void setOpenGLFunctions(tools_gl2ps_gl_funcs_t *)
void disableFileWriting()
bool fileWritingEnabled() const
void resetBufferSizeParameters()
void setExportImageFormat_SVG()
void setExportImageFormat_PDF()
void setFileName(const char *)
void addTextOpt(const char *, const char *, tools_GLshort, tools_GLint, tools_GLfloat)
void setExportImageFormat_PS()
void setViewport(int, int, int, int)
void setExportImageFormat_EPS()
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)