Ejemplo n.º 1
0
void glut_PSF_range_menu(){
	int if_psf =        send_draw_field_current_psf();
	int ncomp =         send_ncomp_current_psf(if_psf);
	int iflag_vect =    send_kemoview_psf_draw_flags(PSFVECT_TOGGLE);
	int iflag_v_color = send_current_vector_patch_color();
/*	int iflag_refv =  send_draw_current_psf_refv();*/

	glutAddMenuEntry("Set range",              ISET_RANGE);
	glutAddMenuEntry("Set number of isolines", ISET_NLINE);
	glutAddMenuEntry("Set Opacity",            ISET_PSF_OPACITY);
	
	
	if(iflag_vect != IZERO && ncomp == 3){
		/*
		if(iflag_refv != IZERO ){
			glutAddMenuEntry("hide Vector Reference",PSFREFV_TOGGLE);
		}
		else{
			glutAddMenuEntry("show Vector Reference",PSFREFV_TOGGLE);
		};
		*/
		if (iflag_v_color == RAINBOW_SURFACE) {
			glutAddMenuEntry("Black Vector",          WHITE_PSF_VECT);
		}else{
			glutAddMenuEntry("Rainbow Vector",        RAINBOW_PSF_VECT);
		};
	
		glutAddMenuEntry("Set Increment for Vector", ISET_PSF_VEC_INC);
		glutAddMenuEntry("Set Reference Vector",     ISET_PSF_REFVECT);
		glutAddMenuEntry("Set Vector Thickness",     ISET_PSF_V_THICK);
	};
	
	return;
};
Ejemplo n.º 2
0
static void make_2nd_level_psf_menu(){
	char tmp_menu[1024];
	char psf_name[LENGTHBUF];
	
	int num_psf =     send_num_loaded_PSF();
	int num_fld =     send_nfield_current_psf();
	int if_psf =      send_draw_field_current_psf();
	int ic_psf =      send_draw_comp_id_current_psf();
	int num_comp =    send_ncomp_current_psf(if_psf);
	int id_coord =    send_coordinate_id_current_psf();
	int iflag_solid = send_kemoview_psf_draw_flags(PSFSOLID_TOGGLE);
	int iflag_grid =  send_kemoview_psf_draw_flags(PSFGRID_TOGGLE);
	
	glut_menu_id->psf_root_menu = glutCreateMenu(psf_handler);
	
	if(num_psf > 1){
		send_current_psf_file_header(psf_name);
		sprintf(tmp_menu, "Current: %s", psf_name);
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_current_psf_menu);
	} else {
	};
	
	
	send_current_psf_data_name(tmp_menu,if_psf);
	if (num_fld > 1) {
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_field_menu);
	} else {
		glutAddMenuEntry(tmp_menu, PSF_NOTHING_TODO);
	};
	
	if (num_comp > 1) {
		set_PSF_component_name(num_comp,ic_psf,id_coord,tmp_menu); 
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_comp_menu);
	};
	
	glut_PSF_draw_menu();

	if(iflag_solid > 0){glutAddSubMenu("Surface  color", glut_menu_id->ichoose_psf_patchcolor_menu);};
	if(iflag_grid > 0) {glutAddSubMenu("Line color", glut_menu_id->ichoose_psf_linecolor_menu);};
	
	glut_PSF_range_menu();
	
	glutAddMenuEntry("Close Current PSF data", PSF_OFF);
	
	return;
};
Ejemplo n.º 3
0
static void make_3rd_level_psf_menu(){
	
	int num_psf =     send_num_loaded_PSF();
	int num_fld =     send_nfield_current_psf();
	int if_psf =      send_draw_field_current_psf();
	int num_comp =    send_ncomp_current_psf(if_psf);
	int iflag_solid = send_kemoview_psf_draw_flags(PSFSOLID_TOGGLE);
	int iflag_grid =  send_kemoview_psf_draw_flags(PSFGRID_TOGGLE);
	
	if(num_psf > 1){
		glut_menu_id->ichoose_current_psf_menu = glutCreateMenu(set_current_psf_handler);
		glut_current_PSF_select();
	};
	
	if (num_fld > 1) {
		glut_menu_id->ichoose_field_menu = glutCreateMenu(set_psf_field_handler);
		glut_PSF_field_select();
	};
	
	if (num_comp > 1) {
		glut_menu_id->ichoose_comp_menu = glutCreateMenu(set_psf_comp_handler);
		glut_PSF_comps_select();
	};

	if (iflag_solid > 0) {
		glut_menu_id->ichoose_psf_patchcolor_menu = glutCreateMenu(set_psf_patchcolor_handler);
		glut_PSF_patchcolor_select();
	};

	if (iflag_grid > 0) {
		glut_menu_id->ichoose_psf_linecolor_menu =  glutCreateMenu(set_psf_linecolor_handler);
		glut_PSF_linecolor_select();
	};

	return;
};
Ejemplo n.º 4
0
void glut_PSF_draw_menu(){
	int iflag_solid =       send_kemoview_psf_draw_flags(PSFSOLID_TOGGLE);
	int iflag_grid =        send_kemoview_psf_draw_flags(PSFGRID_TOGGLE);
	int iflag_zero =        send_kemoview_psf_draw_flags(ZEROGRID_TOGGLE);
	int iflag_cbar =        send_kemoview_psf_draw_flags(COLORBAR_TOGGLE);
	int iflag_vect =        send_kemoview_psf_draw_flags(PSFVECT_TOGGLE);
	int iflag_PSF_polygon = send_kemoview_psf_draw_flags(PSF_POLYGON_SWITCH);
    int iflag_PSF_tanvec =  send_kemoview_psf_draw_flags(PSFTANVEC_TOGGLE);
	int if_psf =            send_draw_field_current_psf();
	int ncomp =             send_ncomp_current_psf(if_psf);
	
	if(iflag_solid != IZERO ){
		glutAddMenuEntry("hide PSF surface",PSFSOLID_TOGGLE);
	}
	else{
		glutAddMenuEntry("show PSF surface",PSFSOLID_TOGGLE);
	};
	
	if(iflag_grid != IZERO ){
		glutAddMenuEntry("hide PSF isolines",PSFGRID_TOGGLE);
	}
	else{
		glutAddMenuEntry("show PSF isolines",PSFGRID_TOGGLE);
	};
	
	if(iflag_zero != IZERO ){
		glutAddMenuEntry("hide zero lines",ZEROGRID_TOGGLE);
	}
	else{
		glutAddMenuEntry("show zero lines",ZEROGRID_TOGGLE);
	};
	
	if(iflag_cbar != IZERO ){
		glutAddMenuEntry("hide colorbar",COLORBAR_TOGGLE);
	}
	else{
		glutAddMenuEntry("show colorbar",COLORBAR_TOGGLE);
	};
	
	if(ncomp == 3){
		if(iflag_vect != IZERO ){
			glutAddMenuEntry("hide PSF Vector",PSFVECT_TOGGLE);
		}else{
			glutAddMenuEntry("show PSF Vector",PSFVECT_TOGGLE);
		};
	};

	if(iflag_solid != IZERO ){
		if(iflag_PSF_polygon== NORMAL_POLYGON ){
			glutAddMenuEntry("normal => reverse",PSF_POLYGON_SWITCH);
		}
		else{
			glutAddMenuEntry("reverse => normal",PSF_POLYGON_SWITCH);
		};
	};
    
	if(iflag_solid != IZERO ){
		if(iflag_PSF_polygon== NORMAL_POLYGON ){
			glutAddMenuEntry("full => tangential",PSFTANVEC_TOGGLE);
		}
		else{
			glutAddMenuEntry("tangential => full",PSFTANVEC_TOGGLE);
		};
	};
	return;
}