From 375a0cad288a1e71b8b65aee013947d0cbf49b76 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 22 Oct 2010 16:12:47 +0000 Subject: [PATCH] cleanup --- Common/Context.h | 2 +- Common/DefaultOptions.h | 13 +- Common/Options.cpp | 18 --- Common/Options.h | 2 - Geo/GModel.h | 3 +- Graphics/Trackball.cpp | 20 +-- Graphics/drawAxes.cpp | 18 +-- Graphics/drawContext.cpp | 283 +++++++++++-------------------------- Graphics/drawContext.h | 1 - Post/PViewDataGModelIO.cpp | 2 +- 10 files changed, 101 insertions(+), 261 deletions(-) diff --git a/Common/Context.h b/Common/Context.h index 780417d272..923ccf946c 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -128,7 +128,7 @@ class CTX { // generation ->only for geo/post) double lc; // double buffer/antialias/stereo graphics? - int db, antialiasing, stereo , camera; + int db, antialiasing, stereo, camera; // orthogonal projection? int ortho; // draw the bounding boxes and the rot center? diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index c3eaea4551..746fc05301 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -506,6 +506,8 @@ StringXNumber GeneralOptions_Number[] = { "Y position (in pixels) of background image (< 0: measure from bottom edge; " ">= 1e5: centered)" }, + { F|O, "Camera" , opt_general_camera_mode, 0. , + "Enable camera view mode" }, { F, "Clip0A" , opt_general_clip0a , 1.0 , "First coefficient in equation for clipping plane 0 (`A' in `AX+BY+CZ+D=0')" }, { F, "Clip0B" , opt_general_clip0b , 0.0 , @@ -570,7 +572,6 @@ StringXNumber GeneralOptions_Number[] = { "planes window" }, { F|O, "ClipWholeElements" , opt_general_clip_whole_elements , 0. , "Clip whole elements" }, - { F|O, "ColorScheme", opt_general_color_scheme , 1. , "Default color scheme (0=dark, 1=light or 2=grayscale)" }, { F|O, "ConfirmOverwrite" , opt_general_confirm_overwrite, 1. , @@ -592,12 +593,6 @@ StringXNumber GeneralOptions_Number[] = { "Enable expert mode (to disable all the messages meant for inexperienced " "users)" }, - { F|O, "Stereo" , opt_general_stereo_mode, 0. , - "Enable stereo mode" }, - - { F|O, "Camera" , opt_general_camera_mode, 0. , - "Enable camera view mode" }, - { F|O, "FastRedraw" , opt_general_fast_redraw, 0. , "Draw simplified model while rotating, panning and zooming" }, { F|S, "FieldPositionX" , opt_general_field_position0 , 650. , @@ -838,10 +833,8 @@ StringXNumber GeneralOptions_Number[] = { { F|S, "StatisticsPositionY" , opt_general_statistics_position1 , 150. , "Vertical position (in pixels) of the upper left corner of the statistic" " window" }, - { F|O, "Stereo" , opt_general_stereo , 0. , + { F|O, "Stereo" , opt_general_stereo_mode , 0. , "Use stereo rendering" }, - { F|O, "Camera" , opt_general_camera , 0. , - "Use a camera" }, { F|S, "SystemMenuBar" , opt_general_system_menu_bar , 1. , "Use the system menu bar on Mac OS X?" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index f9ab7f8362..979ae7fdd4 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -3505,22 +3505,6 @@ double opt_general_antialiasing(OPT_ARGS_NUM) return CTX::instance()->antialiasing; } -double opt_general_stereo(OPT_ARGS_NUM) -{ - if(action & GMSH_SET) { - CTX::instance()->stereo = (int)val; - } - return CTX::instance()->stereo; -} - -double opt_general_camera(OPT_ARGS_NUM) -{ - if(action & GMSH_SET) { - CTX::instance()->camera = (int)val; - } - return CTX::instance()->camera; -} - double opt_general_alpha_blending(OPT_ARGS_NUM) { if(action & GMSH_SET) @@ -3692,7 +3676,6 @@ double opt_general_expert_mode(OPT_ARGS_NUM) return CTX::instance()->expertMode; } - double opt_general_stereo_mode(OPT_ARGS_NUM) { if(action & GMSH_SET) @@ -3709,7 +3692,6 @@ double opt_general_camera_mode(OPT_ARGS_NUM) return CTX::instance()->camera ; } - double opt_general_clip0a(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 538953fbd5..ad1e78744e 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -339,8 +339,6 @@ double opt_general_small_axes_size(OPT_ARGS_NUM); double opt_general_quadric_subdivisions(OPT_ARGS_NUM); double opt_general_double_buffer(OPT_ARGS_NUM); double opt_general_antialiasing(OPT_ARGS_NUM); -double opt_general_stereo(OPT_ARGS_NUM); -double opt_general_camera(OPT_ARGS_NUM); double opt_general_alpha_blending(OPT_ARGS_NUM); double opt_general_vector_type(OPT_ARGS_NUM); double opt_general_arrow_head_radius(OPT_ARGS_NUM); diff --git a/Geo/GModel.h b/Geo/GModel.h index 3e07a8951d..e9babea454 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -117,7 +117,8 @@ class GModel std::set<GEdge*, GEntityLessThan> edges; std::set<GVertex*, GEntityLessThan> vertices; - void insertRegion (GRegion*); + // for bindings + void insertRegion(GRegion*); // map between the pair <dimension, elementary or physical number> // and an optional associated name diff --git a/Graphics/Trackball.cpp b/Graphics/Trackball.cpp index 209a37f0e9..a9caa2f0af 100644 --- a/Graphics/Trackball.cpp +++ b/Graphics/Trackball.cpp @@ -50,11 +50,12 @@ * Gavin Bell */ /* - * Modified for inclusion in Gmsh (rotmatrix as a vector + float->double + * Modified for inclusion in Gmsh (rotmatrix as a vector + + * float->double + camera + new trackballsize function) */ #include <math.h> #include "Trackball.h" -#include "Gmsh.h" +#include "Context.h" #include <iostream> /* * This size should really be based on the distance from the center of @@ -232,9 +233,7 @@ tb_project_to_sphere(double r, double x, double y) d = sqrt(x*x + y*y); - double _camera; - GmshGetOption("General", "Camera",_camera ); - if (_camera ) { + if (CTX::instance()->camera) { if (d < r ) { z = sqrt(r*r - d*d); } else { @@ -252,12 +251,7 @@ tb_project_to_sphere(double r, double x, double y) } } - - - -return z; - - + return z; } /* @@ -352,7 +346,7 @@ build_rotmatrix(double m[16], double q[4]) m[15] = 1.0; } - -double trackballsize(){ +double trackballsize() +{ return TRACKBALLSIZE; } diff --git a/Graphics/drawAxes.cpp b/Graphics/drawAxes.cpp index 26e78bde20..827a4969e6 100644 --- a/Graphics/drawAxes.cpp +++ b/Graphics/drawAxes.cpp @@ -340,17 +340,14 @@ void drawContext::drawSmallAxes() double cx = CTX::instance()->smallAxesPos[0]; double cy = CTX::instance()->smallAxesPos[1]; fix2dCoordinates(&cx, &cy); - double _camera ; - GmshGetOption("General", "Camera", _camera); + double xx, xy, yx, yy , zx, zy; - if (_camera) { - + if (CTX::instance()->camera) { glPopMatrix(); - float fvViewMatrix[ 16 ]; - glGetFloatv( GL_MODELVIEW_MATRIX, fvViewMatrix ); + float fvViewMatrix[16]; + glGetFloatv(GL_MODELVIEW_MATRIX, fvViewMatrix); glLoadIdentity(); - xx = l * fvViewMatrix[0]; xy = l * fvViewMatrix[1]; yx = l * fvViewMatrix[4]; @@ -358,14 +355,13 @@ void drawContext::drawSmallAxes() zx = l * fvViewMatrix[8]; zy = l * fvViewMatrix[9]; } - else { /* if NOT STEREO */ + else{ xx = l * rot[0]; xy = l * rot[1]; yx = l * rot[4]; yy = l * rot[5]; zx = l * rot[8]; zy = l * rot[9]; - } glLineWidth((float)CTX::instance()->lineWidth); gl2psLineWidth((float)(CTX::instance()->lineWidth * @@ -386,8 +382,4 @@ void drawContext::drawSmallAxes() drawString("Y"); glRasterPos2d(cx + zx + o, cy + zy + o); drawString("Z"); - - - - } diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index a4fd435690..1bb3a0464e 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -247,26 +247,17 @@ void drawContext::draw3d() else CTX::instance()->polygonOffset = 0; - glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); initProjection(); initRenderModel(); - // double _camera; - // GmshGetOption("General", "Camera", _camera); - // if (_camera) {} - // else{ - // initPosition(); - // } - initPosition(); + if(!CTX::instance()->camera) + initPosition(); drawAxes(); drawGeom(); drawMesh(); drawPost(); - - - } void drawContext::draw2d() @@ -287,21 +278,16 @@ void drawContext::draw2d() 1. / CTX::instance()->clipFactor : CTX::instance()->clipFactor); glMatrixMode(GL_MODELVIEW); - - //++++ - //glPushMatrix(); - //++++ glLoadIdentity(); drawGraph2d(); drawText2d(); - double _stereo; - GmshGetOption("General", "Stereo", _stereo); - if (!_stereo) { - if(CTX::instance()->post.draw) drawScales(); - } - if(CTX::instance()->smallAxes) drawSmallAxes(); + if(CTX::instance()->post.draw && !CTX::instance()->stereo) + drawScales(); + + if(CTX::instance()->smallAxes) + drawSmallAxes(); } void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) @@ -351,30 +337,20 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) fabs(CTX::instance()->max[2])); if(zmax < CTX::instance()->lc) zmax = CTX::instance()->lc; - double _camera; - GmshGetOption("General", "Camera", _camera); - - - - if (_camera) { /* if Camera */ + if (CTX::instance()->camera) { // if we use the new camera mode double clip_near, clip_far; clip_near = 0.75 * CTX::instance()->clipFactor * zmax; clip_far = 75. * CTX::instance()->clipFactor * zmax; - // draw background if not in selection mode + glDisable(GL_DEPTH_TEST); glPushMatrix(); glLoadIdentity(); - // the z values and the translation are only needed for GL2PS, - // which does not understand "no depth test" (hence we must make - // sure that we draw the background behind the rest of the scene) glOrtho((double)viewport[0], (double)viewport[2], (double)viewport[1], (double)viewport[3], clip_near, clip_far); - // glTranslated(0., 0., clip_near); - // glScaled(1.2,1.2,1.); // background gradient if(CTX::instance()->bgGradient == 1){ // vertical glBegin(GL_QUADS); @@ -416,15 +392,11 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) // hack for GL2PS (to make sure that the image is in front of the // gradient) glTranslated(0., 0., 0.01 * clip_far); - - // background image - if(CTX::instance()->bgImageFileName.size()){ - } glPopMatrix(); glEnable(GL_DEPTH_TEST); - } - else { /* if NOT Camera */ + } + else{ // if NOT in Camera mode double clip_near, clip_far; if(CTX::instance()->ortho) { @@ -572,178 +544,87 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) glTranslated(-coef * t_init[0], -coef * t_init[1], -coef * clip_near); glScaled(coef, coef, coef); } - } /*end if NOT Camera */ + } // end if NOT camera } void drawContext::initRenderModel() { - double _camera; - GmshGetOption("General", "Camera", _camera); - if (_camera) { - glPushMatrix(); - glLoadIdentity(); - glScaled(s[0], s[1], s[2]); - glTranslated(t[0], t[1], t[2]); + glPushMatrix(); + glLoadIdentity(); + glScaled(s[0], s[1], s[2]); + glTranslated(t[0], t[1], t[2]); - for(int i = 0; i < 6; i++) { - if(CTX::instance()->light[i]) { - GLfloat position[4] = {(GLfloat)CTX::instance()->lightPosition[i][0], - (GLfloat)CTX::instance()->lightPosition[i][1], - (GLfloat)CTX::instance()->lightPosition[i][2], - (GLfloat)CTX::instance()->lightPosition[i][3]}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_POSITION, position); - - GLfloat r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat ambient[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_AMBIENT, ambient); - - r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.diffuseLight[i]) / 255.); - g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.diffuseLight[i]) / 255.); - b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.diffuseLight[i]) / 255.); - GLfloat diffuse[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_DIFFUSE, diffuse); - - r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.specularLight[i]) / 255.); - g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.specularLight[i]) / 255.); - b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.specularLight[i]) / 255.); - GLfloat specular[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_SPECULAR, specular); - - glEnable((GLenum)(GL_LIGHT0 + i)); - } - else{ - glDisable((GLenum)(GL_LIGHT0 + i)); - } + for(int i = 0; i < 6; i++) { + if(CTX::instance()->light[i]) { + GLfloat position[4] = {(GLfloat)CTX::instance()->lightPosition[i][0], + (GLfloat)CTX::instance()->lightPosition[i][1], + (GLfloat)CTX::instance()->lightPosition[i][2], + (GLfloat)CTX::instance()->lightPosition[i][3]}; + glLightfv((GLenum)(GL_LIGHT0 + i), GL_POSITION, position); + + GLfloat r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat ambient[4] = {r, g, b, 1.0F}; + glLightfv((GLenum)(GL_LIGHT0 + i), GL_AMBIENT, ambient); + + r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.diffuseLight[i]) / 255.); + g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.diffuseLight[i]) / 255.); + b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.diffuseLight[i]) / 255.); + GLfloat diffuse[4] = {r, g, b, 1.0F}; + glLightfv((GLenum)(GL_LIGHT0 + i), GL_DIFFUSE, diffuse); + + r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.specularLight[i]) / 255.); + g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.specularLight[i]) / 255.); + b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.specularLight[i]) / 255.); + GLfloat specular[4] = {r, g, b, 1.0F}; + glLightfv((GLenum)(GL_LIGHT0 + i), GL_SPECULAR, specular); + + glEnable((GLenum)(GL_LIGHT0 + i)); } - - glPopMatrix(); - - // ambient and diffuse material colors track glColor automatically - glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - // "white"-only specular material reflection color - GLfloat spec[4] = {(GLfloat)CTX::instance()->shine, - (GLfloat)CTX::instance()->shine, - (GLfloat)CTX::instance()->shine, 1.0F}; - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); - // specular exponent in [0,128] (larger means more "focused" - // reflection) - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, - (GLfloat)CTX::instance()->shineExponent); - - glShadeModel(GL_SMOOTH); - - // Normalize the normals automatically. We could use the more - // efficient glEnable(GL_RESCALE_NORMAL) instead (since we initially - // specify unit normals), but GL_RESCALE_NORMAL does only work with - // isotropic scalings (and we allow anistotropic scalings in - // myZoom). Note that GL_RESCALE_NORMAL is only available in - // GL_VERSION_1_2. - glEnable(GL_NORMALIZE); - - // lighting is enabled/disabled for each particular primitive later - glDisable(GL_LIGHTING); - } - else { - glPushMatrix(); - glLoadIdentity(); - glScaled(s[0], s[1], s[2]); - glTranslated(t[0], t[1], t[2]); - - for(int i = 0; i < 6; i++) { - if(CTX::instance()->light[i]) { - GLfloat position[4] = {(GLfloat)CTX::instance()->lightPosition[i][0], - (GLfloat)CTX::instance()->lightPosition[i][1], - (GLfloat)CTX::instance()->lightPosition[i][2], - (GLfloat)CTX::instance()->lightPosition[i][3]}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_POSITION, position); - - GLfloat r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.ambientLight[i]) / 255.); - GLfloat ambient[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_AMBIENT, ambient); - - r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.diffuseLight[i]) / 255.); - g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.diffuseLight[i]) / 255.); - b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.diffuseLight[i]) / 255.); - GLfloat diffuse[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_DIFFUSE, diffuse); - - r = (GLfloat)(CTX::instance()->unpackRed - (CTX::instance()->color.specularLight[i]) / 255.); - g = (GLfloat)(CTX::instance()->unpackGreen - (CTX::instance()->color.specularLight[i]) / 255.); - b = (GLfloat)(CTX::instance()->unpackBlue - (CTX::instance()->color.specularLight[i]) / 255.); - GLfloat specular[4] = {r, g, b, 1.0F}; - glLightfv((GLenum)(GL_LIGHT0 + i), GL_SPECULAR, specular); - - glEnable((GLenum)(GL_LIGHT0 + i)); - } - else{ - glDisable((GLenum)(GL_LIGHT0 + i)); - } + else{ + glDisable((GLenum)(GL_LIGHT0 + i)); } - - glPopMatrix(); - - // ambient and diffuse material colors track glColor automatically - glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - // "white"-only specular material reflection color - GLfloat spec[4] = {(GLfloat)CTX::instance()->shine, - (GLfloat)CTX::instance()->shine, - (GLfloat)CTX::instance()->shine, 1.0F}; - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); - // specular exponent in [0,128] (larger means more "focused" - // reflection) - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, - (GLfloat)CTX::instance()->shineExponent); - - glShadeModel(GL_SMOOTH); - - // Normalize the normals automatically. We could use the more - // efficient glEnable(GL_RESCALE_NORMAL) instead (since we initially - // specify unit normals), but GL_RESCALE_NORMAL does only work with - // isotropic scalings (and we allow anistotropic scalings in - // myZoom). Note that GL_RESCALE_NORMAL is only available in - // GL_VERSION_1_2. - glEnable(GL_NORMALIZE); - - // lighting is enabled/disabled for each particular primitive later - glDisable(GL_LIGHTING); } - + + glPopMatrix(); + + // ambient and diffuse material colors track glColor automatically + glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); + glEnable(GL_COLOR_MATERIAL); + // "white"-only specular material reflection color + GLfloat spec[4] = {(GLfloat)CTX::instance()->shine, + (GLfloat)CTX::instance()->shine, + (GLfloat)CTX::instance()->shine, 1.0F}; + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); + // specular exponent in [0,128] (larger means more "focused" + // reflection) + glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, + (GLfloat)CTX::instance()->shineExponent); + + glShadeModel(GL_SMOOTH); + + // Normalize the normals automatically. We could use the more + // efficient glEnable(GL_RESCALE_NORMAL) instead (since we initially + // specify unit normals), but GL_RESCALE_NORMAL does only work with + // isotropic scalings (and we allow anistotropic scalings in + // myZoom). Note that GL_RESCALE_NORMAL is only available in + // GL_VERSION_1_2. + glEnable(GL_NORMALIZE); + + // lighting is enabled/disabled for each particular primitive later + glDisable(GL_LIGHTING); } - - - - - - - - - - void drawContext::initPosition() { glScaled(s[0], s[1], s[2]); diff --git a/Graphics/drawContext.h b/Graphics/drawContext.h index fd65ddf972..3c658930bf 100644 --- a/Graphics/drawContext.h +++ b/Graphics/drawContext.h @@ -25,7 +25,6 @@ #include <GL/glu.h> #endif - class PView; class GModel; class GVertex; diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index f810594f90..4367d66fc1 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -154,6 +154,7 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary) fprintf(fp, "\n"); } fprintf(fp, "$EndMeshFormat\n"); + model->indexMeshVertices(true); } for(unsigned int step = 0; step < _steps.size(); step++){ @@ -174,7 +175,6 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary) return false; } int num = v->getIndex(); - if(num < 0) num = 0; if(binary){ fwrite(&num, sizeof(int), 1, fp); fwrite(_steps[step]->getData(i), sizeof(double), numComp, fp); -- GitLab