Subversion Repositories gelsvn

Rev

Rev 412 | Rev 456 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 412 Rev 417
Line 79... Line 79...
79
		{
79
		{
80
			static float& smoothing = CreateCVar("display.gaussian_curvature_renderer.smoothing",2.0f);
80
			static float& smoothing = CreateCVar("display.gaussian_curvature_renderer.smoothing",2.0f);
81
			vector<double> scalars;
81
			vector<double> scalars;
82
			gaussian_curvature_angle_defects(mani, scalars, smoothing);
82
			gaussian_curvature_angle_defects(mani, scalars, smoothing);
83
			double max_G = 0;
83
			double max_G = 0;
84
			for(int i=0;i<scalars.size(); ++i)
84
			for(unsigned int i=0;i<scalars.size(); ++i)
85
				max_G = max(abs(scalars[i]), max_G);
85
				max_G = max(abs(scalars[i]), max_G);
86
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
86
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
87
			
87
			
88
		}
88
		}
89
		else if(short_name == "mea")
89
		else if(short_name == "mea")
Line 91... Line 91...
91
			static int& smoothing = CreateCVar("display.mean_curvature_renderer.smoothing",2);
91
			static int& smoothing = CreateCVar("display.mean_curvature_renderer.smoothing",2);
92
			vector<double> scalars;
92
			vector<double> scalars;
93
			mean_curvatures(mani, scalars, smoothing);
93
			mean_curvatures(mani, scalars, smoothing);
94
			double max_G = 0;
94
			double max_G = 0;
95
			double mean = 0;
95
			double mean = 0;
96
			for(int i=0;i<scalars.size(); ++i)
96
			for(unsigned int i=0;i<scalars.size(); ++i)
97
			{
97
			{
98
				max_G = max(abs(scalars[i]), max_G);
98
				max_G = max(abs(scalars[i]), max_G);
99
				mean += scalars[i];
99
				mean += scalars[i];
100
			}
100
			}
101
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
101
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
Line 104... Line 104...
104
		{
104
		{
105
			static int& smoothing = CreateCVar("display.ambient_occlusion_renderer.smoothing",1);
105
			static int& smoothing = CreateCVar("display.ambient_occlusion_renderer.smoothing",1);
106
			vector<double> scalars;
106
			vector<double> scalars;
107
			mean_curvatures(mani, scalars, smoothing);
107
			mean_curvatures(mani, scalars, smoothing);
108
			double max_G = 0;
108
			double max_G = 0;
109
			for(int i=0;i<scalars.size(); ++i)
109
			for(unsigned int i=0;i<scalars.size(); ++i)
110
				max_G = max(abs(scalars[i]), max_G);
110
				max_G = max(abs(scalars[i]), max_G);
111
			renderer = new AmbientOcclusionRenderer(mani, smooth, scalars, max_G);
111
			renderer = new AmbientOcclusionRenderer(mani, smooth, scalars, max_G);
112
			
112
			
113
		}
113
		}
114
		else if(short_name == "cop")
114
		else if(short_name == "cop")
115
		{
115
		{
116
			static int& smoothing = CreateCVar("display.patina_renderer.smoothing",1);
116
			static int& smoothing = CreateCVar("display.patina_renderer.smoothing",1);
117
			vector<double> scalars;
117
			vector<double> scalars;
118
			mean_curvatures(mani, scalars, smoothing);
118
			mean_curvatures(mani, scalars, smoothing);
119
			double max_G = 0;
119
			double max_G = 0;
120
			for(int i=0;i<scalars.size(); ++i)
120
			for(unsigned int i=0;i<scalars.size(); ++i)
121
				max_G = max(abs(scalars[i]), max_G);
121
				max_G = max(abs(scalars[i]), max_G);
122
			renderer = new CopperRenderer(mani, smooth, scalars, max_G,bsphere_radius);
122
			renderer = new CopperRenderer(mani, smooth, scalars, max_G,bsphere_radius);
123
			
123
			
124
		}
124
		}
125
		else
125
		else