void GridCartesianGLL::ApplyDefaultPatchLayout(
	int nPatchCount
) {

	// Verify patch count is positive
	if (nPatchCount < 1) {
		_EXCEPTIONT("nPatchCount must be a positive integer");
	}

	// Verify no Patches have been previously added
	if (m_nInitializedPatchBoxes != 0) {
		_EXCEPTIONT("ApplyDefaultPatchLayout() must be called on an empty Grid");
	}

	// Determine number of usable processors
	int nProcsPerDirection = nPatchCount;

	int nDistributedPatches = nProcsPerDirection;

	// Determine arrangement of elements on processors
	if (GetABaseResolution() % nProcsPerDirection != 0) {
		_EXCEPTIONT("\n(UNIMPLEMENTED) Currently elements must be "
			"equally divided among processors.");
	}

	int nElementsPerDirection = GetABaseResolution() / nProcsPerDirection;
	DataArray1D<int> iBoxBegin(nProcsPerDirection + 1);

	iBoxBegin[0] = 0;
	for (int n = 1; n < nProcsPerDirection; n++) {
		iBoxBegin[n] = n * nElementsPerDirection;
	}
	iBoxBegin[nProcsPerDirection] = GetABaseResolution();

	// Single panel 0 implementation (Cartesian Grid)
	// Rectangular alpha-wise patches that span all of the beta direction
	// (as many as there are processors available)
	for (int i = 0; i < nProcsPerDirection; i++) {

		// Patch strips that span beta
		m_aPatchBoxes[i] = PatchBox(
			0, 0, m_model.GetHaloElements(),
			m_nHorizontalOrder * iBoxBegin[i],
			m_nHorizontalOrder * iBoxBegin[i+1],
			0,
			m_nHorizontalOrder * GetBBaseResolution());
	}

	m_nInitializedPatchBoxes = nProcsPerDirection;
}
int Boxes()
{
ChannelScroller(ChScrollX, ChScrollY);

if(ClassicalChannelView ==1)
{   
Canvas::SetClipping(0,ChannelYMenu+hauteur_ChannelMenu,largeur_ecran,hauteur_ecran); 
ClassicalChannelSpace(XChannels, YChannels,  scroll_channelspace);// x y espacement latéral // espacement vertical // scrolling down
Canvas::DisableClipping();
}

else
{
int index_posView=0;
int pos_y_vision=0;
Canvas::SetClipping(XChannels,ChannelYMenu+hauteur_ChannelMenu ,XChannels+600 , hauteur_ecran);
for(int i=0;i<nbre_de_vues_circuits;i++)
{
if(Channel_View_MODE[i]==1 )
{                        
Draw_Channel_Preset_Title(XChannels, YChannels+pos_y_vision-(int)(((float)scroll_channelspace)/ ratioview),i);      
pos_y_vision+= 60;
Draw_Channel_Preset_View(XChannels, YChannels+pos_y_vision-(int)(((float)scroll_channelspace)/ ratioview), i);
pos_y_vision+=((channel_number_of_lines[i])* (70))+ hauteur_preset_titre;
} 
} 
Canvas::DisableClipping();   
}


RetourInfos(680,40);

feedback_banger(xVisuBanger,yVisuBanger);
grand_master(1200, 30);//x y largeur
show_windows_list_id(1250, 10);//debug windows

Rect Registered(Vec2D(xVisuBanger-5, 272),Vec2D(145,18));
Registered.SetRoundness(4);

petitchiffre.Print(nickname_version,xVisuBanger,285);

petitchiffre.Print(string_debug,xVisuBanger, 300);
 
//focus window
petitchiffre.Print("Focus: ",xVisuBanger,310);
petitchiffre.Print(ol::ToString(window_focus_id),xVisuBanger+50,310);
petitchiffre.Print("Over Window: ",xVisuBanger,320);
petitchiffre.Print(ol::ToString(index_over_A_window),xVisuBanger+90,320);
//retour sauvegarde
Rect RetourConduite(Vec2D(xVisuBanger,330),Vec2D(270,40));
RetourConduite.SetRoundness(5);
RetourConduite.Draw(CouleurBlind.WithAlpha(0.5));   
RetourConduite.DrawOutline(CouleurLigne);   
petitchiffre.Print("Last_save / SAVE:",xVisuBanger+5,345);
petitchiffre.Print(my_show_is_coming_from,xVisuBanger+5,360);

//////////////AFFICHAGES CONDITIONNES//////////////////////////////////////////////

for (int f=63;f>=0;f--) 
{

     switch (window_opened[f]) 
     {
        case W_SAVEREPORT:
        Show_report_save_load();
        MoveCloseBox(report_SL_X+20,report_SL_Y+25,W_SAVEREPORT);     
        break;
        case W_TRICHROMY:
        Interface_Trichromie(xtrichro_window,ytrichro_window,125,15);
        MoveCloseBox(xtrichro_window+20-158,ytrichro_window+25-206,W_TRICHROMY);     
        break;
        case W_NUMPAD:
        visual_numeric_pad(xnum_window,ynum_window);
        FunctionBoxChannel(xnum_window+405,ynum_window+85,60,30,15);//x y largeurbox hauteur largeur box separateurspace);
        MoveCloseBox(xnum_window+405,ynum_window+25,W_NUMPAD);     
        break;
        case W_TRACKINGVIDEO:
        Interface_video_window(videoX,videoY); 
        MoveCloseBox(videoX+20,videoY+25,W_TRACKINGVIDEO);     
        break;
        case W_ARTPOLLREPLY:
        show_artpoll_reply(artpoll_replyX,artpoll_replyY);
        MoveCloseBox(artpoll_replyX+435,artpoll_replyY+25,W_ARTPOLLREPLY);     
        break;
        case W_FADERS :
        FaderSpace(XFader-((int)(scroll_faderspace*facteur_scroll_fader_space)),YFader,182,max_faders);//x y / largeurfader / espacement des faders, nbr faders to draw   
        break;
        case W_PATCH:
        PatchBox(xpatch_window, ypatch_window, Patch_Scroll_Factor);
        MoveCloseBox(xpatch_window+20,ypatch_window+25, W_PATCH);      
        break;
        case W_ECHO:
        echo_window(x_echo,y_echo);
        MoveCloseBox(x_echo+20,y_echo+25,W_ECHO); 
        break;
        case W_DRAW:
        Draw_Window(x_Wdraw,y_Wdraw);
        MoveCloseBox(x_Wdraw+20,y_Wdraw+25, W_DRAW);         
        break;
        case W_TIME:
        Time_Window(xtime_window, ytime_window,100);
        MoveCloseBox(xtime_window+20,ytime_window+25,W_TIME);     
        break;
        case W_SEQUENCIEL:
        Sequenciel_Window(xseq_window, yseq_window,670+(260*show_gridplayer_in_seq),hauteur_globale_sequenciel);
        MoveCloseBox(xseq_window+20,yseq_window+25,W_SEQUENCIEL);     
        break;
        case W_MAINMENU:
        Menus(x_mainmenu,y_mainmenu);   
        MoveCloseBox(x_mainmenu+20,y_mainmenu+25,W_MAINMENU);   
        break;
        case W_ASKCONFIRM:
        fenetre_confirm();
        MoveCloseBox(XConfirm+20,YConfirm+25,W_ASKCONFIRM);     
        break;
        case W_PLOT:
        Plot_window(x_plot,y_plot);
        MoveCloseBox(x_plot+20,y_plot+25,W_PLOT); 
        break;
        case W_LIST:
        liste_projecteurs(Xlistproj ,Ylistproj);     
        MoveCloseBox(Xlistproj+20,Ylistproj+25,W_LIST);                 
        break;
        case W_SAVE:
        Save_Menu(xsave_window,ysave_window); 
        MoveCloseBox(xsave_window+20,ysave_window+25,W_SAVE);                 
        break;
        case W_BANGER:
        fenetre_banger(X_banger,Y_banger);  
        MoveCloseBox(X_banger+20,Y_banger+25,W_BANGER);         
        break;
        case W_ALARM:
        alarm_window();   
        MoveCloseBox(XAlarm+20,YAlarm+25, W_ALARM) ;                    
        break;
        case W_AUDIO:
        fenetre_audio(XAudio,YAudio);   
        MoveCloseBox(XAudio+20,YAudio+25,W_AUDIO);            
        break;
        case W_CFGMENU:
        config_general_menu();
        MoveCloseBox(window_cfgX+20,window_cfgY+20,W_CFGMENU);         
        break;
        case W_WIZARD:
        fenetre_wizard(Xwizard,Ywizard);
        MoveCloseBox(Xwizard+20,Ywizard+20,W_WIZARD);       
        break;
        case W_MINIFADERS:
        mini_faders_panel_visu(xMinifaders,yMinifaders,20);
        MoveCloseBox(xMinifaders+10,yMinifaders-30,W_MINIFADERS);     
        break;
        case W_CHASERS:
        chaser_window( Xchasers,Ychasers);
        MoveCloseBox(Xchasers+20,Ychasers+20,W_CHASERS);         
        break;
        case W_MOVER:
        mover_box(xmover_window, ymover_window);
        MoveCloseBox(xmover_window+20, ymover_window-20,W_MOVER);             
        break;
        case W_iCAT:
        BoxGuiBuilder_iCat( X_gui_iCat, Y_gui_iCat);
        MoveCloseBox( X_gui_iCat+20,Y_gui_iCat+20,W_iCAT);            
        break;
        case W_GRID:
        Grider_Box(grider_window_x, grider_window_y);
        MoveCloseBox( grider_window_x+20,grider_window_y+20,W_GRID);              
        break;
        case W_MY_WINDOW:
        my_window_Box(my_window_x, my_window_y);
        MoveCloseBox( my_window_x+20,my_window_y+20,W_MY_WINDOW);              
        break;
        default:
        break;
      }
   }
   

ChannelsMenuSelection(ChannelXMenu,ChannelYMenu);//menu par dessus
   
   
//over windows if text
if(numeric_postext>0 || index_type==1)
{
Rect nameAera( Vec2D( 670, 27), Vec2D ( 380,40));
nameAera.SetRoundness(15);
nameAera.SetLineWidth(triple_epaisseur_ligne_fader); 
nameAera.Draw(CouleurFader.WithAlpha(index_type)); 
Rect UnderText(Vec2D(670,32),Vec2D((numeric_postext*14)+50,30));
UnderText.SetRoundness(7.5);
UnderText.Draw(CouleurFond);
UnderText.Draw(CouleurLigne.WithAlpha(0.1));
UnderText.DrawOutline(CouleurFader);
neuro.Print(string_numeric_entry,680,55);//input chaine clavier numerique
}
/////////////////////////////////

return(0);

}
Beispiel #3
0
void GridCartesianGLL::ApplyDefaultPatchLayout(
	int nPatchCount
) {

	// Verify patch count is positive
	if (nPatchCount < 1) {
		_EXCEPTIONT("nPatchCount must be a positive integer");
	}

	// Verify no Patches have been previously added
	if (m_nInitializedPatchBoxes != 0) {
		_EXCEPTIONT("ApplyDefaultPatchLayout() must be called on an empty Grid");
	}

	// Determine number of usable processors
	int nProcsPerDirection = nPatchCount;

	int nDistributedPatches = nProcsPerDirection;

	// Determine arrangement of elements on processors
	// SINGLE RECTANGULAR PATCH
	if (GetABaseResolution() * GetBBaseResolution() % nProcsPerDirection != 0) {
		_EXCEPTIONT("\n(UNIMPLEMENTED) Currently Alpha-Beta elements must be "
			"equally divided among processors.");
	}

	bool fCartXZ = GetIsCartesianXZ();
	int nProcsADirection = 0;
	int nProcsBDirection = 0;

	// Handle special case of 2 or 3 processors (laptop testing)
	if (fCartXZ || (nDistributedPatches < 4)) {
		nProcsADirection = nProcsPerDirection;
		nProcsBDirection = 1;
	}
/*
	// Allow 3D cases to split the Beta elements once (EVEN NUMBER OF PROCESSORS)
	else if (!fCartXZ && (nProcsPerDirection % 2 == 0)) {
		# pragma message "3D Cartesian processor layout..."
		nProcsADirection = (int) (nProcsPerDirection / 2);
		nProcsBDirection = 2;
	}
	else if (!fCartXZ && 
			 (nProcsADirection * nProcsBDirection != nDistributedPatches)) {
		_EXCEPTIONT("Even number of processors required"
			"for 3D Cartesian cases.");
	}
*/
	// Default to alpha wise strips
	else {
		nProcsADirection = nProcsPerDirection;
		nProcsBDirection = 1;
	}

	//nProcsADirection = nProcsPerDirection;
	//nProcsBDirection = 1;

	int nElementsPerDirectionA = GetABaseResolution() / nProcsADirection;
	DataArray1D<int> iBoxBeginA(nProcsADirection + 1);

	int nElementsPerDirectionB = GetBBaseResolution() / nProcsBDirection;
	DataArray1D<int> iBoxBeginB(nProcsBDirection + 1);

	// Set the patch array for Alpha
	iBoxBeginA[0] = 0;
	for (int n = 1; n < nProcsADirection; n++) {
		iBoxBeginA[n] = n * nElementsPerDirectionA;
	}
	iBoxBeginA[nProcsADirection] = GetABaseResolution();

	// Set the patch array for Beta
	iBoxBeginB[0] = 0;
	for (int n = 1; n < nProcsBDirection; n++) {
		iBoxBeginB[n] = n * nElementsPerDirectionB;
	}
	iBoxBeginB[nProcsBDirection] = GetBBaseResolution();

/*
	// Single panel 0 implementation (Cartesian Grid)
	// Rectangular alpha-wise patches that span all of the beta direction
	// (as many as there are processors available)
	for (int i = 0; i < nProcsPerDirection; i++) {

		// Patch strips that span beta
		m_aPatchBoxes[i] = PatchBox(
			0, 0, m_model.GetHaloElements(),
			m_nHorizontalOrder * iBoxBegin[i],
			m_nHorizontalOrder * iBoxBegin[i+1],
			0,
			m_nHorizontalOrder * GetBBaseResolution());
	}
*/
	// Create master patch for each panel
	int ixPatch = 0;

	for (int i = 0; i < nProcsADirection; i++) {
	for (int j = 0; j < nProcsBDirection; j++) {

		m_aPatchBoxes[ixPatch] = PatchBox(
			0, 0, m_model.GetHaloElements(),
			m_nHorizontalOrder * iBoxBeginA[i],
			m_nHorizontalOrder * iBoxBeginA[i+1],
			m_nHorizontalOrder * iBoxBeginB[j],
			m_nHorizontalOrder * iBoxBeginB[j+1]);

		ixPatch++;
	}
	}

	m_nInitializedPatchBoxes = ixPatch;
}