//----------------------------------------------------------------------------- void MGL_EXPORT mgl_cont_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt) { long n=a->GetNx(),m=a->GetNy(); if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"ContY"); return; } gr->SaveState(opt); if(mgl_isnan(sv)) sv = gr->GetOrgY('y'); if(sv<gr->Min.y || sv>gr->Max.y) { gr->SetWarn(mglWarnSlc,"ContY"); gr->LoadState(); return; } static int cgid=1; gr->StartGroup("ContY",cgid++); mglDataV xx,yy,zz; mglData aa; int text=0; if(mglchr(sch,'t')) text=1; if(mglchr(sch,'T')) text=2; long ss=gr->AddTexture(sch); gr->SetPenPal(sch); a = fill_slice_y(gr,sv,a,xx,yy,zz,aa); #pragma omp parallel for for(long i=0;i<v->GetNx();i++) { mreal v0 = v->v(i); mgl_cont_gen(gr,v0,a,&xx,&yy,&zz,gr->GetC(ss,v0),text,0); } gr->EndGroup(); }
//----------------------------------------------------------------------------- void MGL_EXPORT mgl_dens_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt) { long n=a->GetNx(),m=a->GetNy(); if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"DensY"); return; } gr->SaveState(opt); if(mgl_isnan(sv)) sv = gr->GetOrgY('y'); if(sv<gr->Min.y || sv>gr->Max.y) { gr->SetWarn(mglWarnSlc,"DensY"); gr->LoadState(); return; } mglDataV xx,yy,zz; mglData aa; a = fill_slice_y(gr,sv,a,xx,yy,zz,aa); mgl_surf_gen(gr, &xx,&yy,&zz,a, 0, sch); }