Subversion Repositories gelsvn

Rev

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

Rev 406 Rev 409
Line 79... Line 79...
79
		{
79
		{
80
			static CVar<float> smoothing("display.gaussian_curvature_renderer.smoothing",2);
80
			static CVar<float> smoothing("display.gaussian_curvature_renderer.smoothing",2);
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")
90
		{
90
		{
91
			static CVar<float> smoothing("display.mean_curvature_renderer.smoothing",2);
91
			static CVar<float> smoothing("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
			for(int i=0;i<scalars.size(); ++i)
95
			for(unsigned int i=0;i<scalars.size(); ++i)
96
				max_G = max(abs(scalars[i]), max_G);
96
				max_G = max(abs(scalars[i]), max_G);
97
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
97
			renderer = new ScalarFieldRenderer(mani, smooth, scalars, max_G);
98
			
98
			
99
		}
99
		}
100
		else if(short_name == "amb")
100
		else if(short_name == "amb")
101
		{
101
		{
102
			static CVar<float> smoothing("display.ambient_occlusion_renderer.smoothing",1);
102
			static CVar<float> smoothing("display.ambient_occlusion_renderer.smoothing",1);
103
			vector<double> scalars;
103
			vector<double> scalars;
104
			mean_curvatures(mani, scalars, smoothing);
104
			mean_curvatures(mani, scalars, smoothing);
105
			double max_G = 0;
105
			double max_G = 0;
106
			for(int i=0;i<scalars.size(); ++i)
106
			for(unsigned int i=0;i<scalars.size(); ++i)
107
				max_G = max(abs(scalars[i]), max_G);
107
				max_G = max(abs(scalars[i]), max_G);
108
			renderer = new AmbientOcclusionRenderer(mani, smooth, scalars, max_G);
108
			renderer = new AmbientOcclusionRenderer(mani, smooth, scalars, max_G);
109
			
109
			
110
		}
110
		}
111
		else if(short_name == "cop")
111
		else if(short_name == "cop")
112
		{
112
		{
113
			static CVar<float> smoothing("display.patina_renderer.smoothing",1);
113
			static CVar<float> smoothing("display.patina_renderer.smoothing",1);
114
			vector<double> scalars;
114
			vector<double> scalars;
115
			mean_curvatures(mani, scalars, smoothing);
115
			mean_curvatures(mani, scalars, smoothing);
116
			double max_G = 0;
116
			double max_G = 0;
117
			for(int i=0;i<scalars.size(); ++i)
117
			for(unsigned int i=0;i<scalars.size(); ++i)
118
				max_G = max(abs(scalars[i]), max_G);
118
				max_G = max(abs(scalars[i]), max_G);
119
			renderer = new CopperRenderer(mani, smooth, scalars, max_G,bsphere_radius);
119
			renderer = new CopperRenderer(mani, smooth, scalars, max_G,bsphere_radius);
120
			
120
			
121
		}
121
		}
122
		else
122
		else