32#ifndef G4OPENGLVIEWER_HH
33#define G4OPENGLVIEWER_HH
37#ifdef G4OPENGL_VERSION_2
110 virtual bool exportImage(std::string
name=
"",
int width=-1,
int height=-1);
113#ifdef G4OPENGL_VERSION_2
115 void setVboDrawer(G4OpenGLVboDrawer* drawer);
116 G4OpenGLVboDrawer* fVboDrawer;
147 const std::vector < G4OpenGLViewerPickMap* > &
GetPickDetails(GLdouble x, GLdouble y);
176 void g4GluPickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height,
180 void g4GluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
181 GLdouble centerx, GLdouble centery, GLdouble
183 GLdouble upx, GLdouble upy, GLdouble upz );
185 void g4GlOrtho (GLdouble left, GLdouble right,
186 GLdouble bottom, GLdouble top,
187 GLdouble near, GLdouble far);
190 GLdouble bottom, GLdouble top,
191 GLdouble near, GLdouble far);
234 unsigned int height);
244#ifdef G4OPENGL_VERSION_2
246 inline GLuint getShaderProgram() {
247 return fShaderProgram;
249 inline GLuint getShaderProjectionMatrix() {
250 return fpMatrixUniform;
252 inline GLuint getShaderTransformMatrix() {
253 return ftMatrixUniform;
255 inline GLuint getShaderViewModelMatrix() {
256 return fmvMatrixUniform;
265 GLuint fShaderProgram;
268 GLuint fVertexPositionAttribute;
269 GLuint fVertexNormalAttribute;
270 GLuint fpMatrixUniform;
271 GLuint fcMatrixUniform;
272 GLuint fmvMatrixUniform;
273 GLuint fnMatrixUniform;
274 GLuint ftMatrixUniform;
void setSubHitNumber(G4int n)
std::vector< G4String > getAttributes()
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)
G4OpenGLViewer & operator=(const G4OpenGLViewer &)
virtual void CreateFontLists()
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
std::string fDefaultExportImageFormat
bool setExportFilename(G4String name, G4bool inc=true)
G4OpenGLViewer(G4OpenGLSceneHandler &scene)
void addExportImageFormat(std::string format)
G4String fDefaultExportFilename
G4bool antialiasing_enabled
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)
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)
void rotateSceneThetaPhi(G4double dx, G4double dy)
G4OpenGLSceneHandler & fOpenGLSceneHandler
G4int getRealExportWidth()
G4OpenGLViewer(const G4OpenGLViewer &)
virtual ~G4OpenGLViewer()
friend class G4OpenGLFileSceneHandler
std::string getRealPrintFilename()
GLdouble getSceneNearWidth()
const std::vector< G4OpenGLViewerPickMap * > & GetPickDetails(GLdouble x, GLdouble y)
int fGl2psDefaultLineWith
const char * name(G4int ptype)