diff --git a/Common/Context.h b/Common/Context.h index 4e9586577d88e0112c7155a96edba1fb1052cf1f..b525c438b8886aefbc932f6fa1cf24a974664ba3 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -120,6 +120,7 @@ public : double pixel_equiv_x, pixel_equiv_y ; // approximative equivalent model length of a pixel int color_scheme ; // general color scheme + int sphere_subdivisions; // nb subd to draw spheres, when drawing pts as 3D spheres // geometry options struct{ diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 5ba77363872fe9049d740ade3a1108aa8c42241e..1000da684fc0204edde5672001fa337591e18603 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -533,6 +533,8 @@ StringXNumber GeneralOptions_Number[] = { "X position of small axes (negative values for right alignment)" }, { F|O, "SmallAxesPositionY" , opt_general_small_axes_position1 , -35. , "Y position of small axes (negative values for bottom alignment)" }, + { F|O, "SphereSubdivisions" , opt_general_sphere_subdivisions, 10. , + "Number of subdivisions used to draw spheres (when drawing points as spheres)" }, #ifdef _FLTK { F|O, "Terminal" , opt_general_terminal , 0. , diff --git a/Common/Options.cpp b/Common/Options.cpp index 3c546869bf0110e10b4e2766b92e99d27df282f5..8592490bac367504664efa8e2f420ba93a881674 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.89 2002-11-08 02:06:59 geuzaine Exp $ +// $Id: Options.cpp,v 1.90 2002-11-08 07:27:57 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -1166,6 +1166,11 @@ double opt_general_small_axes_position1(OPT_ARGS_NUM){ CTX.small_axes_pos[1] = (int)val; return CTX.small_axes_pos[1]; } +double opt_general_sphere_subdivisions(OPT_ARGS_NUM){ + if(action & GMSH_SET) + CTX.sphere_subdivisions = (int)val; + return CTX.sphere_subdivisions; +} double opt_general_display_lists(OPT_ARGS_NUM){ int i; if(action & GMSH_SET){ diff --git a/Common/Options.h b/Common/Options.h index d7c68745cf51c0d415804542fababd766c3115c6..fc134dd25470dab5fa90cfe63632019c2fec7442 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -228,6 +228,7 @@ double opt_general_axes(OPT_ARGS_NUM); double opt_general_small_axes(OPT_ARGS_NUM); double opt_general_small_axes_position0(OPT_ARGS_NUM); double opt_general_small_axes_position1(OPT_ARGS_NUM); +double opt_general_sphere_subdivisions(OPT_ARGS_NUM); double opt_general_display_lists(OPT_ARGS_NUM); double opt_general_double_buffer(OPT_ARGS_NUM); double opt_general_alpha_blending(OPT_ARGS_NUM); diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp index ca17d3a7817e7dd74da4294ab51b4d33734c0276..4055e397d7bfbf99df0a5f780b5097a3dfef1e58 100644 --- a/Graphics/Entity.cpp +++ b/Graphics/Entity.cpp @@ -1,4 +1,4 @@ -// $Id: Entity.cpp,v 1.22 2002-11-08 02:06:59 geuzaine Exp $ +// $Id: Entity.cpp,v 1.23 2002-11-08 07:27:57 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -48,7 +48,7 @@ void Draw_Sphere (double size, double x, double y, double z){ qua = gluNewQuadric(); listnum = glGenLists(1); glNewList(listnum, GL_COMPILE); - gluSphere(qua, 1, 20,20); + gluSphere(qua, 1, CTX.sphere_subdivisions, CTX.sphere_subdivisions); glEndList(); } glPushMatrix();