1 #include "../common/filterparameter.h"
2 #include "glarea_setting.h"
3
initGlobalParameterSet(RichParameterSet * defaultGlobalParamSet)4 void GLAreaSetting::initGlobalParameterSet( RichParameterSet * defaultGlobalParamSet)
5 {
6 defaultGlobalParamSet->addParam(new RichColor(backgroundBotColorParam(),QColor(128,128,255),"MeshLab Bottom BackGround Color","MeshLab GLarea's BackGround Color(bottom corner)"));
7 defaultGlobalParamSet->addParam(new RichColor(backgroundTopColorParam(),QColor( 0, 0, 0),"MeshLab Top BackGround Color","MeshLab GLarea's BackGround Color(top corner)"));
8 defaultGlobalParamSet->addParam(new RichColor(logAreaColorParam(), QColor(128,16,16),"MeshLab GLarea's Log Area Color","MeshLab GLarea's BackGround Color(bottom corner)"));
9 defaultGlobalParamSet->addParam(new RichColor(textColorParam(),vcg::Color4b::White,"Text Color","Color of the text used in all the Graphics Window (it should be well different from the background color...)"));
10
11
12 defaultGlobalParamSet->addParam(new RichColor(baseLightAmbientColorParam() ,QColor( 32, 32, 32),"MeshLab Base Light Ambient Color","MeshLab GLarea's BackGround Color(bottom corner)"));
13 defaultGlobalParamSet->addParam(new RichColor(baseLightDiffuseColorParam() ,QColor(204,204,204),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
14 defaultGlobalParamSet->addParam(new RichColor(baseLightSpecularColorParam() ,QColor(255,255,255),"MeshLab Base Light Specular Color","MeshLab GLarea's BackGround Color(bottom corner)"));
15
16 defaultGlobalParamSet->addParam(new RichColor(fancyBLightDiffuseColorParam() ,QColor(255,204,204),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
17 defaultGlobalParamSet->addParam(new RichColor(fancyFLightDiffuseColorParam() ,QColor(204,204,255),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
18
19 QStringList textureMinFilterModes = (QStringList() << "Nearest" << "MipMap");
20 QStringList textureMagFilterModes = (QStringList() << "Nearest" << "Linear");
21 defaultGlobalParamSet->addParam(new RichEnum(textureMinFilterParam() , 1,textureMinFilterModes,"MeshLab Texture Minification Filtering","MeshLab GLarea's BackGround Color(top corner)"));
22 defaultGlobalParamSet->addParam(new RichEnum(textureMagFilterParam() , 1,textureMagFilterModes,"MeshLab Texture Magnification Filtering","MeshLab GLarea's BackGround Color(top corner)"));
23
24 defaultGlobalParamSet->addParam(new RichBool(pointDistanceAttenuationParam() , true,"Perspective Varying Point Size","If true the size of the points is drawn with a size proprtional to the distance from the observer."));
25 defaultGlobalParamSet->addParam(new RichBool(pointSmoothParam() , false,"Antialiased Point","If true the points are drawn with small circles instead of fast squared dots."));
26 defaultGlobalParamSet->addParam(new RichFloat(pointSizeParam() , 2.0, "Point Size","The base size of points when drawn"));
27 }
28
29
updateGlobalParameterSet(RichParameterSet & rps)30 void GLAreaSetting::updateGlobalParameterSet( RichParameterSet& rps )
31 {
32 logAreaColor = rps.getColor4b(logAreaColorParam());
33 backgroundBotColor = rps.getColor4b(backgroundBotColorParam());
34 backgroundTopColor = rps.getColor4b(backgroundTopColorParam());
35
36 baseLightAmbientColor = rps.getColor4b(baseLightAmbientColorParam() );
37 baseLightDiffuseColor = rps.getColor4b(baseLightDiffuseColorParam() );
38 baseLightSpecularColor = rps.getColor4b(baseLightSpecularColorParam() );
39
40 fancyBLightDiffuseColor = rps.getColor4b(fancyBLightDiffuseColorParam());
41 fancyFLightDiffuseColor = rps.getColor4b(fancyFLightDiffuseColorParam());
42
43 textureMinFilter = rps.getEnum(this->textureMinFilterParam());
44 textureMagFilter = rps.getEnum(this->textureMagFilterParam());
45
46 pointDistanceAttenuation = rps.getBool(this->pointDistanceAttenuationParam());
47 pointSmooth = rps.getBool(this->pointSmoothParam());
48 pointSize = rps.getFloat(this->pointSizeParam());
49 currentGlobalParamSet=&rps;
50 }
51