50#ifdef G4OPENGL_VERSION_2
63#ifdef G4OPENGL_VERSION_2
68fOpenGLSceneHandler(scene),
70transparency_enabled (true),
71antialiasing_enabled (false),
72haloing_enabled (false),
77fDefaultExportImageFormat(
"pdf"),
78fExportImageFormat(
"pdf"),
79fExportFilenameIndex(0),
83fDefaultExportFilename(
"G4OpenGL"),
85fGl2psDefaultLineWith(1),
86fGl2psDefaultPointSize(2),
87fGlViewInitialized(false),
88fIsGettingPickInfos(false)
89#ifdef G4OPENGL_VERSION_2
91,fVertexPositionAttribute(0)
92,fVertexNormalAttribute(0)
129#ifdef G4OPENGL_VERSION_2
133 fShaderProgram = glCreateProgram();
134 Shader vertexShader = glCreateShader(GL_VERTEX_SHADER);
135 const char * vSrc = fVboDrawer->getVertexShaderSrc();
136 glShaderSource(vertexShader, 1, &vSrc, NULL);
137 glCompileShader(vertexShader);
138 glAttachShader(fShaderProgram, vertexShader);
140 Shader fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
141 const char * fSrc = fVboDrawer->getFragmentShaderSrc();
142 glShaderSource(fragmentShader, 1, &fSrc, NULL);
143 glCompileShader(fragmentShader);
145 glAttachShader(fShaderProgram, fragmentShader);
146 glLinkProgram(fShaderProgram);
147 glUseProgram(fShaderProgram);
154 fVertexPositionAttribute =
155 glGetAttribLocation(fShaderProgram,
"aVertexPosition");
158 glEnableVertexAttribArray(fVertexPositionAttribute);
161 fpMatrixUniform = glGetUniformLocation(fShaderProgram,
"uPMatrix");
162 fcMatrixUniform = glGetUniformLocation(fShaderProgram,
"uCMatrix");
163 fmvMatrixUniform = glGetUniformLocation(fShaderProgram,
"uMVMatrix");
164 fnMatrixUniform = glGetUniformLocation(fShaderProgram,
"uNMatrix");
165 ftMatrixUniform = glGetUniformLocation(fShaderProgram,
"uTMatrix");
184 glClearColor (0.0, 0.0, 0.0, 0.0);
186#ifndef G4OPENGL_VERSION_2
187 glDisable (GL_LINE_SMOOTH);
188 glDisable (GL_POLYGON_SMOOTH);
195 glDepthFunc (GL_LEQUAL);
196 glDepthMask (GL_TRUE);
199 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
228 glClear (GL_COLOR_BUFFER_BIT);
229 glClear (GL_DEPTH_BUFFER_BIT);
230 glClear (GL_STENCIL_BUFFER_BIT);
257 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
259 if ((dims[0] !=0 ) && (dims[1] !=0)) {
262 G4cerr <<
"Try to resize view greater than max X viewport dimension. Desired size "<<
fWinSize_x <<
" is resize to "<< dims[0] <<
G4endl;
266 G4cerr <<
"Try to resize view greater than max Y viewport dimension. Desired size "<<
fWinSize_y <<
" is resize to "<< dims[1] <<
G4endl;
289 GLfloat lightPosition [4];
293 lightPosition [3] = 0.;
295 GLfloat ambient [] = { 0.2f, 0.2f, 0.2f, 1.f};
296 GLfloat diffuse [] = { 0.8f, 0.8f, 0.8f, 1.f};
297 glEnable (GL_LIGHT0);
298 glLightfv (GL_LIGHT0, GL_AMBIENT, ambient);
299 glLightfv (GL_LIGHT0, GL_DIFFUSE, diffuse);
316 if(radius<=0.) radius = 1.;
323 const GLdouble left = -right;
325 const GLdouble bottom = -top;
331 glMatrixMode (GL_PROJECTION);
335 glScaled(scaleFactor.
x(),scaleFactor.
y(),scaleFactor.
z());
338 g4GlOrtho (left, right, bottom, top, pnear, pfar);
341 g4GlFrustum (left, right, bottom, top, pnear, pfar);
344 glMatrixMode (GL_MODELVIEW);
349 if (cameraDistance > 1.e-6 * radius) {
350 gltarget = targetPoint;
356 const G4Point3D& pCamera = cameraPosition;
359 gltarget.
x(), gltarget.
y(), gltarget.
z(),
360 upVector.
x(), upVector.
y(), upVector.
z());
362 glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
394 size_t nPlanes = cutaways.size();
399 a[0] = cutaways[0].a();
400 a[1] = cutaways[0].b();
401 a[2] = cutaways[0].c();
402 a[3] = cutaways[0].d();
403 glClipPlane (GL_CLIP_PLANE2, a);
404 glEnable (GL_CLIP_PLANE2);
406 a[0] = cutaways[1].a();
407 a[1] = cutaways[1].b();
408 a[2] = cutaways[1].c();
409 a[3] = cutaways[1].d();
410 glClipPlane (GL_CLIP_PLANE3, a);
411 glEnable (GL_CLIP_PLANE3);
414 a[0] = cutaways[2].a();
415 a[1] = cutaways[2].b();
416 a[2] = cutaways[2].c();
417 a[3] = cutaways[2].d();
418 glClipPlane (GL_CLIP_PLANE4, a);
419 glEnable (GL_CLIP_PLANE4);
422 glDisable (GL_CLIP_PLANE2);
423 glDisable (GL_CLIP_PLANE3);
424 glDisable (GL_CLIP_PLANE4);
451 glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
454 glDepthMask (GL_TRUE);
455 glDepthFunc (GL_LESS);
466 glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
467 glDepthFunc (GL_LEQUAL);
474 const std::vector < G4OpenGLViewerPickMap* > & pickMap =
GetPickDetails(x,y);
476 if (pickMap.size() == 0) {
479 for (
unsigned int a=0; a < pickMap.size(); a++) {
480 if (pickMap[a]->getAttributes().size() > 0) {
481 txt += pickMap[a]->print();
490 static std::vector < G4OpenGLViewerPickMap* > pickMapVector;
491 for (
auto pickMap: pickMapVector) {
494 pickMapVector.clear();
498 glSelectBuffer(
BUFSIZE, selectBuffer);
499 glRenderMode(GL_SELECT);
502 glMatrixMode(GL_PROJECTION);
503 G4double currentProjectionMatrix[16];
504 glGetDoublev(GL_PROJECTION_MATRIX, currentProjectionMatrix);
508 glGetIntegerv(GL_VIEWPORT, viewport);
518 glMultMatrixd(currentProjectionMatrix);
519 glMatrixMode(GL_MODELVIEW);
521 GLint hits = glRenderMode(GL_RENDER);
524 G4cout <<
"Too many hits. Zoom in to reduce overlaps." <<
G4endl;
525 goto restoreMatrices;
528 GLuint* p = selectBuffer;
529 for (GLint i = 0; i < hits; ++i) {
530 GLuint nnames = *p++;
539 for (GLuint j = 0; j < nnames; ++j) {
541 std::map<GLuint, G4AttHolder*>::iterator iter =
545 if(attHolder && attHolder->
GetAttDefs().size()) {
546 for (
size_t iAtt = 0;
547 iAtt < attHolder->
GetAttDefs().size(); ++iAtt) {
548 std::ostringstream oss;
562 pickMapVector.push_back(pickMap);
571 glMatrixMode(GL_PROJECTION);
573 glMatrixMode(GL_MODELVIEW);
575 return pickMapVector;
579(
int inColor,
unsigned int width,
unsigned int height) {
582 GLint swapbytes, lsbfirst, rowlength;
583 GLint skiprows, skippixels, alignment;
589 size = width*height*3;
591 format = GL_LUMINANCE;
592 size = width*height*1;
595 buffer =
new GLubyte[size];
599 glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes);
600 glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst);
601 glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength);
603 glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows);
604 glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels);
605 glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment);
607 glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE);
608 glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE);
609 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
611 glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
612 glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
613 glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
615 glReadBuffer(GL_FRONT);
616 glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, format, GL_UNSIGNED_BYTE, (GLvoid*)
buffer);
618 glPixelStorei (GL_UNPACK_SWAP_BYTES, swapbytes);
619 glPixelStorei (GL_UNPACK_LSB_FIRST, lsbfirst);
620 glPixelStorei (GL_UNPACK_ROW_LENGTH, rowlength);
622 glPixelStorei (GL_UNPACK_SKIP_ROWS, skiprows);
623 glPixelStorei (GL_UNPACK_SKIP_PIXELS, skippixels);
624 glPixelStorei (GL_UNPACK_ALIGNMENT, alignment);
641 int components,
pos, i;
645 if (pixels == NULL) {
646 G4cerr <<
"Failed to get pixels from OpenGl viewport" <<
G4endl;
655 fp = fopen (
name.c_str(),
"w");
661 fprintf (fp,
"%%!PS-Adobe-2.0 EPSF-1.2\n");
662 fprintf (fp,
"%%%%Title: %s\n",
name.c_str());
663 fprintf (fp,
"%%%%Creator: OpenGL pixmap render output\n");
664 fprintf (fp,
"%%%%BoundingBox: 0 0 %d %d\n", width, height);
665 fprintf (fp,
"%%%%EndComments\n");
666 fprintf (fp,
"gsave\n");
667 fprintf (fp,
"/bwproc {\n");
668 fprintf (fp,
" rgbproc\n");
669 fprintf (fp,
" dup length 3 idiv string 0 3 0 \n");
670 fprintf (fp,
" 5 -1 roll {\n");
671 fprintf (fp,
" add 2 1 roll 1 sub dup 0 eq\n");
672 fprintf (fp,
" { pop 3 idiv 3 -1 roll dup 4 -1 roll dup\n");
673 fprintf (fp,
" 3 1 roll 5 -1 roll } put 1 add 3 0 \n");
674 fprintf (fp,
" { 2 1 roll } ifelse\n");
675 fprintf (fp,
" }forall\n");
676 fprintf (fp,
" pop pop pop\n");
677 fprintf (fp,
"} def\n");
678 fprintf (fp,
"systemdict /colorimage known not {\n");
679 fprintf (fp,
" /colorimage {\n");
680 fprintf (fp,
" pop\n");
681 fprintf (fp,
" pop\n");
682 fprintf (fp,
" /rgbproc exch def\n");
683 fprintf (fp,
" { bwproc } image\n");
684 fprintf (fp,
" } def\n");
685 fprintf (fp,
"} if\n");
686 fprintf (fp,
"/picstr %d string def\n", width * components);
687 fprintf (fp,
"%d %d scale\n", width, height);
688 fprintf (fp,
"%d %d %d\n", width, height, 8);
689 fprintf (fp,
"[%d 0 0 %d 0 0]\n", width, height);
690 fprintf (fp,
"{currentfile picstr readhexstring pop}\n");
691 fprintf (fp,
"false %d\n", components);
692 fprintf (fp,
"colorimage\n");
694 curpix = (GLubyte*) pixels;
696 for (i = width*height*components; i>0; i--) {
697 fprintf (fp,
"%02hx ", (
unsigned short)(*(curpix++)));
706 fprintf (fp,
"grestore\n");
707 fprintf (fp,
"showpage\n");
732#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
735#ifdef G4VIS_BUILD_OPENGLX_DRIVER
738#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
741#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
745#if GL_ARB_framebuffer_object
778 gl2psTextOpt(textString.c_str(),
"Times-Roman",GLshort(size),align,0);
782 static G4int callCount = 0;
785 if (callCount <= 1) {
787 "G4OpenGLViewer::DrawText: Not implemented for \""
833 if ((width != -1) && (height != -1)) {
854 size_t len = strlen(setlocale(LC_NUMERIC,NULL));
855 char* oldLocale = (
char*)(malloc(len+1));
856 if(oldLocale!=NULL) strncpy(oldLocale,setlocale(LC_NUMERIC,NULL),len);
857 setlocale(LC_NUMERIC,
"C");
867 setlocale(LC_NUMERIC,oldLocale);
916 bool extendBuffer =
true;
917 bool endWriteAction =
false;
918 bool beginWriteAction =
true;
919 bool filePointerOk =
true;
920 while ((extendBuffer) && (! endWriteAction) && (filePointerOk)) {
930 if (beginWriteAction) {
942 if ((! endWriteAction) || (! beginWriteAction)) {
949 if (!extendBuffer ) {
950 G4cerr <<
"ERROR: gl2ps buffer size is not big enough to print this geometry. Try to extend it. No output produced"<<
G4endl;
953 if (!beginWriteAction ) {
957 if (!endWriteAction ) {
990 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
993 if ((dims[0] !=0 ) && (dims[1] !=0)) {
1009 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
1012 if ((dims[0] !=0 ) && (dims[1] !=0)) {
1047 if (
name.size() == 0) {
1051 std::string extension =
name.substr(
name.find_last_of(
".") + 1);
1053 if (extension.size() >= 3 && extension.size() <= 4) {
1069 temp += std::string(
"_");
1070 std::ostringstream os;
1072 std::string nb_str = os.str();
1088 if(radius<=0.) radius = 1.;
1103 if(radius<=0.) radius = 1.;
1120 if(radius<=0.) radius = 1.;
1190 yprime = (up.
cross(vp)).unit();
1191 zprime = (vp.
cross(yprime)).unit();
1204 new_vp = std::cos(delta_alpha) * vp + std::sin(delta_alpha) * zprime;
1210 new_up = (new_vp.
cross(yprime)).unit();
1211 if (new_vp.
z()*vp.
z() <0) {
1212 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1216 if (new_vp.
z()*vp.
z() <0) {
1217 new_up.
set(new_up.
x(),-new_up.
y(),new_up.
z());
1224 cosalpha = new_up.
dot (new_vp.
unit());
1225 sinalpha = std::sqrt (1. - std::pow (cosalpha, 2));
1226 yprime = (new_up.
cross (new_vp.
unit())).unit ();
1227 xprime = yprime.
cross (new_up);
1229 a1 = sinalpha * xprime;
1231 a2 = sinalpha * (std::cos (delta_theta) * xprime + std::sin (delta_theta) * yprime);
1235 viewPoint = new_vp.
unit() + delta;
1271 up.
z()*vp.
x()-up.
x()*vp.
z(),
1272 up.
x()*vp.
y()-up.
y()*vp.
x());
1274 viewPoint = vp/
fRot_sens + (zPrimeVector*dx - up*dy) ;
1275 new_up =
G4Vector3D(viewPoint.
y()*zPrimeVector.
z()-viewPoint.
z()*zPrimeVector.
y(),
1276 viewPoint.
z()*zPrimeVector.
x()-viewPoint.
x()*zPrimeVector.
z(),
1277 viewPoint.
x()*zPrimeVector.
y()-viewPoint.
y()*zPrimeVector.
x());
1300 G4cout <<
" Changing export format to \"" << format <<
"\"" <<
G4endl;
1310 if (format.size() == 0) {
1311 G4cout <<
" Current formats availables are : " << list <<
G4endl;
1313 G4cerr <<
" Format \"" << format <<
"\" is not available for the selected viewer. Current formats availables are : " << list <<
G4endl;
1330 sx = viewport[2] / width;
1331 sy = viewport[3] / height;
1332 tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width;
1333 ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height;
1335#define M(row, col) mat[col*4+row]
1366 GLdouble centerx, GLdouble centery, GLdouble
1368 GLdouble upx, GLdouble upy, GLdouble upz )
1371 GLdouble x[3], y[3], z[3];
1377 z[0] = eyex - centerx;
1378 z[1] = eyey - centery;
1379 z[2] = eyez - centerz;
1380 mag = std::sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]);
1393 x[0] = y[1] * z[2] - y[2] * z[1];
1394 x[1] = -y[0] * z[2] + y[2] * z[0];
1395 x[2] = y[0] * z[1] - y[1] * z[0];
1398 y[0] = z[1] * x[2] - z[2] * x[1];
1399 y[1] = -z[0] * x[2] + z[2] * x[0];
1400 y[2] = z[0] * x[1] - z[1] * x[0];
1407 mag = std::sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
1414 mag = std::sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]);
1421#define M(row,col) mat[col*4+row]
1442 glTranslated(-eyex, -eyey, -eyez);
1448 GLdouble a = 2.0 / (right - left);
1449 GLdouble b = 2.0 / (top - bottom);
1450 GLdouble c = -2.0 / (zFar - zNear);
1452 GLdouble tx = - (right + left)/(right - left);
1453 GLdouble ty = - (top + bottom)/(top - bottom);
1454 GLdouble tz = - (zFar + zNear)/(zFar - zNear);
1456 GLdouble ortho[16] = {
1462 glMultMatrixd(ortho);
1470 GLdouble deltaX = right - left;
1471 GLdouble deltaY = top - bottom;
1472 GLdouble deltaZ = zFar - zNear;
1474 GLdouble a = 2.0f * zNear / deltaX;
1475 GLdouble b = 2.0f * zNear / deltaY;
1476 GLdouble c = (right + left) / deltaX;
1477 GLdouble d = (top + bottom) / deltaY;
1478 GLdouble e = -(zFar + zNear) / (zFar - zNear);
1479 GLdouble f = -2.0f * zFar * zNear / deltaZ;
1481 GLdouble proj[16] = {
1488 glMultMatrixd(proj);
1493#ifdef G4OPENGL_VERSION_2
1496void G4OpenGLViewer::setVboDrawer(G4OpenGLVboDrawer* drawer) {
1497 fVboDrawer = drawer;
1500 sh.setVboDrawer(fVboDrawer);
1501 }
catch(std::bad_cast exp) { }
1508 std::ostringstream txt;
1509 for (
unsigned int a=0; a<
fAttributes.size(); a++) {
G4double Y(G4double density)
static const G4double pos
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
bool enableFileWriting()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void setExportImageFormat(unsigned int)
void setLineWidth(int)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
bool disableFileWriting()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
bool fileWritingEnabled() const
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void setPointSize(int)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void setFileName(const char *)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
bool extendBufferSize()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void resetBufferSizeParameters()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
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)
std::vector< G4String > fAttributes
G4int getRealExportHeight()
void rotateSceneInViewDirection(G4double dx, G4double dy)
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)
int fGl2psDefaultPointSize
unsigned int getWinWidth() const
bool setExportFilename(G4String name, G4bool inc=true)
G4OpenGLViewer(G4OpenGLSceneHandler &scene)
void addExportImageFormat(std::string format)
G4String fDefaultExportFilename
void ChangeLineWidth(G4double width)
bool printNonVectoredEPS()
virtual void DrawText(const G4Text &)
GLdouble getSceneFarWidth()
void setExportSize(G4int, G4int)
virtual G4String Pick(GLdouble x, GLdouble y)
G4OpenGL2PSAction * fGL2PSAction
void rotateScene(G4double dx, G4double dy)
void ChangePointSize(G4double size)
G4bool isFramebufferReady()
GLubyte * grabPixels(int inColor, unsigned int width, unsigned int height)
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)
void rotateSceneThetaPhi(G4double dx, G4double dy)
G4OpenGLSceneHandler & fOpenGLSceneHandler
G4int getRealExportWidth()
virtual ~G4OpenGLViewer()
std::string getRealPrintFilename()
GLdouble getSceneNearWidth()
const std::vector< G4OpenGLViewerPickMap * > & GetPickDetails(GLdouble x, GLdouble y)
int fGl2psDefaultLineWith
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
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
static constexpr double deg
const char * name(G4int ptype)