00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 Surf3d_GLview_data GLvd_offset;
00029
00030 #define GET_GLV_OFFSET(ELEM) (void*)((long)(ELEM)-(long)(&GLvd_offset))
00031
00032 gchar *TrueFalse_OptionsList[] = { "true", "false", NULL };
00033 gchar *OnOff_OptionsList[] = { "On", "Off", NULL };
00034 gchar *ColorMode_OptionsList[] = { "Material Color", "Terrain Colors", "Palette Colors", NULL };
00035 gchar *ColorSrc_OptionsList[] = { "Uniform", "Height", "X-Chan", NULL };
00036
00037 gchar *CScale_OptionsList[] = { "-2","2","0.001","0.1","4", NULL };
00038
00039
00040
00041 gchar *Rot_OptionsList[] = {"0","360","1","5","0",NULL };
00042 gchar *FoV_OptionsList[] = {"0","180","1","5","0",NULL };
00043 gchar *Dist_OptionsList[] = {"0.1","100","0.1","1","2",NULL };
00044 gchar *PerspF_OptionsList[] = {"10","1000","10","100","0",NULL };
00045 gchar *PerspN_OptionsList[] = {"1","100","1","10","2",NULL };
00046 gchar *Hskl_OptionsList[] = {"0","10","0.1","1","1",NULL };
00047 gchar *Shininess_OptionsList[] = {"0","40","0.1","1","1",NULL };
00048 gchar *FogD_OptionsList[] = {"0","10","0.01","0.05","2",NULL };
00049 gchar *preV_OptionsList[] = {"0","10","0.05","0.1","2",NULL };
00050
00051 GnomeResEntryInfoType v3dControl_pref_def_const[] = {
00052 GNOME_RES_ENTRY_FIRST_NAME("GXSM_V3DCONTROL_20030901000"),
00053
00054
00055
00056 GNOME_RES_ENTRY_FLOATSLIDER
00057 ( "V3dControl.View/RotationX", "Rotation X", "315", GET_GLV_OFFSET (&GLvd_offset.rot[0]),
00058 Rot_OptionsList, N_("View"),
00059 N_("Rotation Angle in X"), NULL
00060 ),
00061 GNOME_RES_ENTRY_FLOATSLIDER
00062 ( "V3dControl.View/RotationY", "Rotation Y", "180", GET_GLV_OFFSET (&GLvd_offset.rot[1]),
00063 Rot_OptionsList, N_("View"),
00064 N_("Rotation Angle in Y"), NULL
00065 ),
00066 GNOME_RES_ENTRY_FLOATSLIDER
00067 ( "V3dControl.View/RotationZ", "Rotation Z", "180", GET_GLV_OFFSET (&GLvd_offset.rot[2]),
00068 Rot_OptionsList, N_("View"),
00069 N_("Rotation Angle in Z"), NULL
00070 ),
00071
00072 GNOME_RES_ENTRY_SEPARATOR (N_("View"), NULL),
00073
00074 GNOME_RES_ENTRY_FLOAT_VEC3
00075 ( "V3dControl.View/Translation", "Translation", "0 0 0", GET_GLV_OFFSET (&GLvd_offset.trans), N_("View"),
00076 N_("set translations vector X, Y, Z\n"
00077 "additional hint: use middle mouse to\n"
00078 "button and drag surface up/down!"), NULL
00079 ),
00080
00081 GNOME_RES_ENTRY_FLOATSLIDER
00082 ( "V3dControl.View/FoV", "FoV", "45.0", GET_GLV_OFFSET (&GLvd_offset.fov),
00083 FoV_OptionsList, N_("View"),
00084 N_("Field of View"), NULL
00085 ),
00086
00087 GNOME_RES_ENTRY_FLOATSLIDER
00088 ( "V3dControl.View/Dist", "Distance", "1.5", GET_GLV_OFFSET (&GLvd_offset.dist),
00089 Dist_OptionsList, N_("View"),
00090 N_("Distance"), NULL
00091 ),
00092
00093 GNOME_RES_ENTRY_FLOATSLIDER
00094 ( "V3dControl.View/PerspZfar", "PerspZfar", "200", GET_GLV_OFFSET (&GLvd_offset.Zfar),
00095 PerspF_OptionsList, N_("View"),
00096 N_("Perspective: Z far distance relative to surface width (=1))"),
00097 NULL
00098 ),
00099 GNOME_RES_ENTRY_FLOATSLIDER
00100 ( "V3dControl.View/PerspZnear", "PerspZnear", "10", GET_GLV_OFFSET (&GLvd_offset.Znear),
00101 PerspN_OptionsList, N_("View"),
00102 N_("Perspective: Z near distance (to center of surface)\n"),
00103 NULL
00104 ),
00105
00106 GNOME_RES_ENTRY_SEPARATOR (N_("View"), NULL),
00107
00108 GNOME_RES_ENTRY_FLOATSLIDER
00109 ( "V3dControl.View/Hskl", "Height Skl", "1", GET_GLV_OFFSET (&GLvd_offset.hskl),
00110 Hskl_OptionsList, N_("View"),
00111 N_("Height Scaling (Z scale)"), NULL
00112 ),
00113
00114
00115
00116 GNOME_RES_ENTRY_COLORSEL
00117 ( "V3dControl.Light/GlobalAmbient", "GlobalAmbient", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_global_ambient), N_("Light"),
00118 N_("Global Ambient Light [red, green, blue, alpha]"), NULL
00119 ),
00120
00121 GNOME_RES_ENTRY_SEPARATOR (N_("Light"), NULL),
00122
00123 GNOME_RES_ENTRY_OPTION
00124 ( GNOME_RES_STRING, "V3dControl.Light/Light0", "On", GET_GLV_OFFSET (&GLvd_offset.light[0][0]),
00125 OnOff_OptionsList, N_("Light"),
00126 N_("Light0: switch On/Off")
00127 ),
00128 GNOME_RES_ENTRY_FLOAT_VEC4
00129 ( "V3dControl.Light/Light0Pos", "Light0Pos", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_position[0]), N_("Light"),
00130 N_("Light0: Position, relative to surface width (=1) [X, Y, Z, 1]"), NULL
00131 ),
00132 GNOME_RES_ENTRY_COLORSEL
00133 ( "V3dControl.Light/Light0Spec", "Light0Spec", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_specular[0]), N_("Light"),
00134 N_("Light0: Specular Light Color [red, green, blue, alpha]"), NULL
00135 ),
00136 GNOME_RES_ENTRY_COLORSEL
00137 ( "V3dControl.Light/Light0Diff", "Light0Diff", "0.4 0.4 0.4 1", GET_GLV_OFFSET (&GLvd_offset.light_diffuse[0]), N_("Light"),
00138 N_("Light0: Diffuse Light Color [red, green, blue, alpha]"), NULL
00139 ),
00140 GNOME_RES_ENTRY_COLORSEL
00141 ( "V3dControl.Light/Light0Amb", "Light0Amb", "0.1 0.1 0.1 1", GET_GLV_OFFSET (&GLvd_offset.light_ambient[0]), N_("Light"),
00142 N_("Light0: Ambient Light Color [red, green, blue, alpha]"), NULL
00143 ),
00144
00145
00146 GNOME_RES_ENTRY_SEPARATOR (N_("Light"), NULL),
00147
00148 GNOME_RES_ENTRY_AUTO_PATH_OPTION
00149 ( GNOME_RES_STRING, "V3dControl.Light/Light1", "On", GET_GLV_OFFSET (&GLvd_offset.light[1][0]),
00150 OnOff_OptionsList, N_("Light"),
00151 N_("Light1: switch On/Off")
00152 ),
00153 GNOME_RES_ENTRY_FLOAT_VEC4
00154 ( "V3dControl.Light/Light1Pos", "Light1Pos", "-1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_position[1]), N_("Light"),
00155 N_("Light1: Position, relative to surface width (=1) [X, Y, Z, 1]"), NULL
00156 ),
00157 GNOME_RES_ENTRY_COLORSEL
00158 ( "V3dControl.Light/Light1Spec", "Light1Spec", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_specular[1]), N_("Light"),
00159 N_("Light1: Specular Light Color [red, green, blue, alpha]"), NULL
00160 ),
00161 GNOME_RES_ENTRY_COLORSEL
00162 ( "V3dControl.Light/Light1Diff", "Light1Diff", "0.4 0.4 0.4 1", GET_GLV_OFFSET (&GLvd_offset.light_diffuse[1]), N_("Light"),
00163 N_("Light1: Diffuse Light Color [red, green, blue, alpha]"), NULL
00164 ),
00165 GNOME_RES_ENTRY_COLORSEL
00166 ( "V3dControl.Light/Light1Amb", "Light1Amb", "0.1 0.1 0.1 1", GET_GLV_OFFSET (&GLvd_offset.light_ambient[1]), N_("Light"),
00167 N_("Light1: Ambient Light Color [red, green, blue, alpha]"), NULL
00168 ),
00169
00170 GNOME_RES_ENTRY_SEPARATOR (N_("Light"), NULL),
00171
00172 GNOME_RES_ENTRY_OPTION
00173 ( GNOME_RES_STRING, "V3dControl.Light/Light2", "Off", GET_GLV_OFFSET (&GLvd_offset.light[2][0]),
00174 OnOff_OptionsList, N_("Light"),
00175 N_("Light2: switch On/Off")
00176 ),
00177 GNOME_RES_ENTRY_FLOAT_VEC4
00178 ( "V3dControl.Light/Light2Pos", "Light2Pos", "1 1 1 0", GET_GLV_OFFSET (&GLvd_offset.light_position[2]), N_("Light"),
00179 N_("Light2: Position, relative to surface width (=1) [X, Y, Z, 0]"), NULL
00180 ),
00181 GNOME_RES_ENTRY_COLORSEL
00182 ( "V3dControl.Light/Light2Spec", "Light2Spec", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.light_specular[2]), N_("Light"),
00183 N_("Light2: Specular Light Color [red, green, blue, alpha]"), NULL
00184 ),
00185 GNOME_RES_ENTRY_COLORSEL
00186 ( "V3dControl.Light/Light2Diff", "Light2Diff", "0.1 0.1 0.1 1", GET_GLV_OFFSET (&GLvd_offset.light_diffuse[2]), N_("Light"),
00187 N_("Light2: Diffuse Light Color [red, green, blue, alpha]"), NULL
00188 ),
00189 GNOME_RES_ENTRY_COLORSEL
00190 ( "V3dControl.Light/Light2Amb", "Light2Amb", "0.1 0.1 0.1 1", GET_GLV_OFFSET (&GLvd_offset.light_ambient[2]), N_("Light"),
00191 N_("Light2: Ambient Light Color [red, green, blue, alpha]"), NULL
00192 ),
00193
00194
00195
00196 GNOME_RES_ENTRY_COLORSEL
00197 ( "V3dControl.MatSurf/Ambient", "Ambient", "0.45 0.15 0.07 1", GET_GLV_OFFSET (&GLvd_offset.surf_mat_ambient), N_("Surface Material"),
00198 N_("Surface Ambient Color:\n Specify the ambient RGBA reflectance of the material.\nUsed only in \"Uniform/Material Color Mode\"."), NULL
00199 ),
00200 GNOME_RES_ENTRY_COLORSEL
00201 ( "V3dControl.MatSurf/Diffuse", "Diffuse", "0.6 0.2 0.1 1", GET_GLV_OFFSET (&GLvd_offset.surf_mat_diffuse), N_("Surface Material"),
00202 N_("Surface Diffuse Color:\n Specify the diffuse RGBA reflectance of the material.\nUsed only in \"Uniform/Material Color Mode\"."), NULL
00203 ),
00204 GNOME_RES_ENTRY_COLORSEL
00205 ( "V3dControl.MatSurf/Specular", "Specular", "1 1 0.3 1", GET_GLV_OFFSET (&GLvd_offset.surf_mat_specular), N_("Surface Material"),
00206 N_("Surface Specular Color:\n Specify the specular RGBA reflectance of the material."), NULL
00207 ),
00208 GNOME_RES_ENTRY_FLOATSLIDER
00209 ( "V3dControl.MatSurf/Shininess", "Shininess", "7", GET_GLV_OFFSET (&GLvd_offset.surf_mat_shininess[0]),
00210 Shininess_OptionsList, N_("Surface Material"),
00211 N_("Surface Shininess"), NULL
00212 ),
00213
00214 GNOME_RES_ENTRY_SEPARATOR (N_("Surface Material"), NULL),
00215
00216 GNOME_RES_ENTRY_OPTION
00217 ( GNOME_RES_STRING, "V3dControl.MatSurf/ColorMode", "Material Color",
00218 GET_GLV_OFFSET (&GLvd_offset.ColorMode[0]),
00219 ColorMode_OptionsList, N_("Surface Material"),
00220 N_("Select Surface Coloring Mode.")
00221 ),
00222 GNOME_RES_ENTRY_OPTION
00223 ( GNOME_RES_STRING, "V3dControl.MatSurf/ColorSrc", "Uniform",
00224 GET_GLV_OFFSET (&GLvd_offset.ColorSrc[0]),
00225 ColorSrc_OptionsList, N_("Surface Material"),
00226 N_("Select Surface Color Source.")
00227 ),
00228
00229 GNOME_RES_ENTRY_SEPARATOR (N_("Surface Material"), NULL),
00230
00231 GNOME_RES_ENTRY_FLOATSLIDER
00232 ( "V3dControl.MatSurf/ColorContrast", "Color Contrast", "1",
00233 GET_GLV_OFFSET (&GLvd_offset.ColorContrast),
00234 CScale_OptionsList, N_("Surface Material"),
00235 N_("Color Contrast: to scale color source"), NULL
00236 ),
00237 GNOME_RES_ENTRY_FLOATSLIDER
00238 ( "V3dControl.MatSurf/ColorOffset", "Color Offset", "0",
00239 GET_GLV_OFFSET (&GLvd_offset.ColorOffset),
00240 CScale_OptionsList, N_("Surface Material"),
00241 N_("Color Contrast: shift color source"), NULL
00242 ),
00243
00244 GNOME_RES_ENTRY_FLOATSLIDER
00245 ( "V3dControl.MatSurf/ColorSaturation", "Color Saturation", "1",
00246 GET_GLV_OFFSET (&GLvd_offset.ColorSat),
00247 CScale_OptionsList, N_("Surface Material"),
00248 N_("Color Saturation, 1=normal"), NULL
00249 ),
00250
00251
00252
00253 GNOME_RES_ENTRY_COLORSEL
00254 ( "V3dControl.MatBox/Ambient", "Ambient", "0.6 0.1 0.1 1", GET_GLV_OFFSET (&GLvd_offset.box_mat_ambient), N_("Box Material"),
00255 N_("Box Ambient [red, green, blue, alpha]"), NULL
00256 ),
00257 GNOME_RES_ENTRY_COLORSEL
00258 ( "V3dControl.MatBox/Specular", "Specular", "1 1 1 1", GET_GLV_OFFSET (&GLvd_offset.box_mat_specular), N_("Box Material"),
00259 N_("Box Specular"), NULL
00260 ),
00261 GNOME_RES_ENTRY_COLORSEL
00262 ( "V3dControl.MatBox/Diffuse", "Diffuse", "0 0 0 1", GET_GLV_OFFSET (&GLvd_offset.box_mat_diffuse), N_("Box Material"),
00263 N_("Box Diffuse"), NULL
00264 ),
00265 GNOME_RES_ENTRY_FLOATSLIDER
00266 ( "V3dControl.MatBox/Shininess", "Shininess", "20", GET_GLV_OFFSET (&GLvd_offset.box_mat_shininess[0]),
00267 Shininess_OptionsList, N_("Box Material"),
00268 N_("Box Shininess"), NULL
00269 ),
00270
00271
00272
00273 GNOME_RES_ENTRY_FLOATSLIDER
00274 ( "V3dControl.RenderOp/QuenchFactor", "Quench/PreView Factor", "0.8", GET_GLV_OFFSET (&GLvd_offset.preV),
00275 preV_OptionsList, N_("Render Opt."),
00276 N_("Quench or PreView Factor:\n"
00277 " 1: normal, adj to approx. optimal size dep. on viewport size, not on distance/zoom\n"
00278 " 0: use all grid points (slow, dep. on image size)\n"
00279 ">1: use less (fast)"), NULL
00280 ),
00281
00282 GNOME_RES_ENTRY_SEPARATOR (N_("Render Opt."), NULL),
00283
00284 GNOME_RES_ENTRY_COLORSEL
00285 ( "V3dControl.RenderOp/ClearColor", "ClearColor", "0.6 0.7 0.7 1.0", GET_GLV_OFFSET (&GLvd_offset.clear_color), N_("Render Opt."),
00286 N_("GL Clear Color, e.g. background [red, green, blue, alpha]"), NULL
00287 ),
00288
00289 GNOME_RES_ENTRY_SEPARATOR (N_("Render Opt."), NULL),
00290
00291 GNOME_RES_ENTRY_OPTION
00292 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Fog", "false", GET_GLV_OFFSET (&GLvd_offset.Fog),
00293 TrueFalse_OptionsList, N_("Render Opt."),
00294 N_("enable/disable fog")
00295 ),
00296 GNOME_RES_ENTRY_COLORSEL
00297 ( "V3dControl.RenderOp/FogColor", "FogColor", "0.6 0.7 0.7 1.0", GET_GLV_OFFSET (&GLvd_offset.fog_color), N_("Render Opt."),
00298 N_("Fog Color [red, green, blue, alpha].\n"
00299 "Fog blends a fog color with each rasterized pixel fragment's\n"
00300 "posttexturing color using a blending factor f. Factor f is computed in\n"
00301 "one of three ways (here: f=exp(-density*z)), depending on the fog\n"
00302 "mode. Let z be the distance in eye coordinates from the origin to the\n"
00303 "fragment being fogged.\n"
00304 "Note: you usually want to use the background (clear) color."), NULL
00305 ),
00306 GNOME_RES_ENTRY_FLOATSLIDER
00307 ( "V3dControl.RenderOp/FogDensity", "Fog Density", "0.8", GET_GLV_OFFSET (&GLvd_offset.fog_density),
00308 FogD_OptionsList, N_("Render Opt."),
00309 N_("Density of fog, see fog color help!\n"
00310 "Effect depends on distance to object and size of object."), NULL
00311 ),
00312
00313 GNOME_RES_ENTRY_SEPARATOR (N_("Render Opt."), NULL),
00314
00315 GNOME_RES_ENTRY_OPTION
00316 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Tex", "false", GET_GLV_OFFSET (&GLvd_offset.Texture),
00317 TrueFalse_OptionsList, N_("Render Opt."),
00318 N_("enable/disable texture (sorry not implemented today)")
00319 ),
00320
00321 GNOME_RES_ENTRY_OPTION
00322 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Mesh", "false", GET_GLV_OFFSET (&GLvd_offset.Mesh),
00323 TrueFalse_OptionsList, N_("Render Opt."),
00324 N_("enable/disable mesh mode (use mesh or solid model)")
00325 ),
00326
00327
00328 GNOME_RES_ENTRY_OPTION
00329 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Cull", "false", GET_GLV_OFFSET (&GLvd_offset.Cull),
00330 TrueFalse_OptionsList, N_("Render Opt."),
00331 N_("enable/disable cull face mode (surface back is not drawn!)\n"
00332 "Note: if enabled you will not see your surface,\n"
00333 "if you are looking from below!")
00334 ),
00335
00336 GNOME_RES_ENTRY_OPTION
00337 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Smooth", "true", GET_GLV_OFFSET (&GLvd_offset.Smooth),
00338 TrueFalse_OptionsList, N_("Render Opt."),
00339 N_("enable/disable Smooth Shading (GL color model is smooth or flat)\n"
00340 "Note: smooth shading is much slower but looks also much better.")
00341 ),
00342
00343 GNOME_RES_ENTRY_OPTION
00344 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Ortho", "false", GET_GLV_OFFSET (&GLvd_offset.Ortho),
00345 TrueFalse_OptionsList, N_("Render Opt."),
00346 N_("enable/disable ortho mode (not implemented)")
00347 ),
00348
00349 GNOME_RES_ENTRY_OPTION
00350 ( GNOME_RES_BOOL, "V3dControl.RenderOp/ZeroPlane", "true", GET_GLV_OFFSET (&GLvd_offset.ZeroPlane),
00351 TrueFalse_OptionsList, N_("Render Opt."),
00352 N_("enable/disable Zero Plane/Box")
00353 ),
00354
00355 GNOME_RES_ENTRY_OPTION
00356 ( GNOME_RES_BOOL, "V3dControl.RenderOp/Tickmarks", "false", GET_GLV_OFFSET (&GLvd_offset.Ticks),
00357 TrueFalse_OptionsList, N_("Render Opt."),
00358 N_("enable/disable 3D Tickmarks drawing\n (Note: not yet available!!)")
00359 ),
00360
00361 GNOME_RES_ENTRY_LAST
00362 };
00363