Subversion Repositories gelsvn

Rev

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

Rev 401 Rev 403
Line 527... Line 527...
527
char* console_vertex_noise(std::vector<std::string> &args)
527
char* console_vertex_noise(std::vector<std::string> &args)
528
{
528
{
529
	if(wantshelp(args)) 
529
	if(wantshelp(args)) 
530
	{
530
	{
531
		theConsole.Printf("usage: noise.perturb_vertices <amplitude>");
531
		theConsole.Printf("usage: noise.perturb_vertices <amplitude>");
532
		theConsole.Printf("adds a random vector to each vertex. To ensure uniformness, the vector must lie in the");
532
		theConsole.Printf("adds a random vector to each vertex. A random vector in the unit cube is generated and");
-
 
533
		theConsole.Printf("to ensure an isotropic distribution, vectors outside the unit ball are discarded.");
533
		theConsole.Printf("unit sphere. The length of the vector is multiplied by the average edge length and then amplitude");
534
		theConsole.Printf("The vector is multiplied by the average edge length and then by the amplitude specified.");
-
 
535
		theConsole.Printf("If no amplitude is specified, the default (0.5) is used.");
534
		return "";
536
		return "";
535
	}
537
	}
536
	float avg_length = average_edge_length(active_mesh());
538
	float avg_length = average_edge_length(active_mesh());
537
	
539
	
538
	float noise_amplitude = 0.5;
540
	float noise_amplitude = 0.5;
Line 816... Line 818...
816
				display_render_mode = "isophotes"; break;
818
				display_render_mode = "isophotes"; break;
817
			case 'r':
819
			case 'r':
818
				display_render_mode = "reflection"; break;
820
				display_render_mode = "reflection"; break;
819
			case 'h':
821
			case 'h':
820
				display_render_mode = "harmonics"; break;
822
				display_render_mode = "harmonics"; break;
821
			case 'm':
823
			case 't':
822
				display_render_mode = "metal"; break;
824
				display_render_mode = "toon"; break;
823
			case 'g':
825
			case 'g':
824
				display_render_mode = "glazed"; break;
826
				display_render_mode = "glazed"; break;
-
 
827
			case 'C':
-
 
828
				display_render_mode = "curvature_lines"; break;
-
 
829
			case 'M':
-
 
830
				display_render_mode = "mean_curvature"; break;
-
 
831
			case 'G':
-
 
832
				display_render_mode = "gaussian_curvature"; break;
825
		}
833
		}
826
		
834
		
827
		if(display_render_mode.substr(0,4) == "harm")
835
		if(display_render_mode.substr(0,4) == "harm")
828
			avo().harmonics_parse_key(key);
836
			avo().harmonics_parse_key(key);
829
		
837
		
830
		avo().post_create_display_list();		
838
		if(key != '\033') avo().post_create_display_list();		
831
	}
839
	}
832
}
840
}
833
 
841
 
834
void init_glut(int argc, char** argv)
842
void init_glut(int argc, char** argv)
835
{
843
{