bool GLTextureRectangle::set( Array2DView< const uint8x2 > srcData, GLImageFormat srcFormat, const Vector2i& dstOffset ) { if( srcFormat != GLImageFormat::RG ) { return false; } if( !srcData.packed() ) { return false; } const GLPixelType srcType = GLPixelType::UNSIGNED_BYTE; return set2D( srcData.pointer(), srcData.size(), srcFormat, srcType, dstOffset ); }
void roadmap_canvas3_set3DMode(int is3D) { if (is3D== is3DMode) return; if ( !is_canvas_ready() ) return; if (is3D) { set3D(roadmap_canvas_width(), roadmap_canvas_height(),0); } else { set2D(roadmap_canvas_width(), roadmap_canvas_height()); } is3DMode= is3D; }
bool GLTextureRectangle::set( Array2DView< const Vector4f > srcData, GLImageFormat srcFormat, const Vector2i& dstOffset ) { if( srcFormat != GLImageFormat::RGBA && srcFormat != GLImageFormat::BGRA ) { return false; } if( !srcData.packed() ) { return false; } const GLPixelType srcType = GLPixelType::FLOAT; return set2D( srcData.pointer(), srcData.size(), srcFormat, srcType, dstOffset ); }
double roadmap_canvas_ogl_rotateMe(float ang_diff) { double distH; if ( !is_canvas_ready() ) return 0; angle+= ang_diff; distH= set3D(roadmap_canvas_width(), roadmap_canvas_height(),1); if (!is3DMode) { set2D(roadmap_canvas_width(), roadmap_canvas_height()); } return distH; }
bool GLTextureRectangle::set( Array2DReadView< uint8_t > srcData, GLImageFormat srcFormat, const Vector2i& dstOffset ) { if( srcFormat != GLImageFormat::RED && srcFormat != GLImageFormat::GREEN && srcFormat != GLImageFormat::BLUE && srcFormat != GLImageFormat::ALPHA ) { return false; } if( !srcData.packed() ) { return false; } const GLPixelType srcType = GLPixelType::UNSIGNED_BYTE; return set2D( srcData.pointer(), srcData.size(), srcFormat, srcType, dstOffset ); }
config::config(){ //относительные параметры магнитной системы partR = 0.5; m = 1.; hc = 0; //меры перевода в абсолютные величины (на одну единицу относительной величины) santiMeter = 1E-7; //расстояние ergGauss = 1; //Магнитный момент ersted = 1; //Напряженность магнитного поля //Depticated I0s = 500; dstep = 0.0001; kv = 1E-9; set2D(); rank = 0; size = 1; this->randmode_standart(); }
// TODO Fixing hud display Hud::Hud( ) { set2D(); }
// слайд с таблицей ППН (2й). 5 или 6 страниц будет тут void Form3::ppn() { // page 1, выход за границу ui->p1d1_1->setText(set2D(b(p157,423,4), b(p157,430,0), "ТЭП")); // ↑↓ грчн1 ui->p1d1_2->setText(set2D(b(p157,423,6), b(p157,430,2), "ТСП")); ui->p1d2_1->setText(set2D(b(p157,424,0), b(p157,430,4), "ТЭП")); ui->p1d2_2->setText(set2D(b(p157,424,2), b(p157,430,6), "ТСП")); ui->p1d3_1->setText(set2D(b(p157,424,1), b(p157,430,5), "ТЭП")); ui->p1d3_2->setText(set2D(b(p157,423,4), b(p157,430,6), "ТСП")); ui->p1d4_1->setText(set2D(b(p157,423,5), b(p157,430,1), "ТЭП")); ui->p1d4_2->setText(set2D(b(p157,423,6), b(p157,430,2), "ТСП")); ui->p1d5_1->setText(set2D(b(p157,424,4), b(p157,431,0), "ТЭП")); ui->p1d5_2->setText(set2D(b(p157,424,6), b(p157,431,2), "ТЭП")); //page 2, выход за границу ui->p1_d_Ppeak->setText(set2D(b(p157,425,0), b(p157,431,4))); ui->p1_d_Pgpk->setText(set2D(b(p157,425,1), b(p157,431,5))); ui->p1_d_Fpit1->setText(set2D(b(p157,425,4), b(p157,432,0))); ui->p1_d_Fpit2->setText(set2D(b(p157,425,5), b(p157,432,1))); ui->p1_d_Fpit3->setText(set2D(b(p157,425,6), b(p157,432,2))); ui->p1_d_Fpit4->setText(set2D(b(p157,425,7), b(p157,432,3))); ui->p1_d_Ptrop1->setText(set2D(b(p157,426,0), b(p157,432,4))); ui->p1_d_Ptrop2->setText(set2D(b(p157,426,1), b(p157,432,5))); ui->p1_d_Ptrop3->setText(set2D(b(p157,426,2), b(p157,432,6))); ui->p1_d_Ptrop4->setText(set2D(b(p157,426,3), b(p157,432,7))); //page 3, выход за границу ui->p3_d_Pzkp1->setText(set2D(b(p157,426,4), b(p157,433,0))); ui->p3_d_Pzkp2->setText(set2D(b(p157,426,5), b(p157,433,1))); ui->p3_d_Pgaz->setText(set2D(b(p157,426,6), b(p157,433,2))); ui->p3_d_Lkd->setText(set2D(b(p157,426,7), b(p157,433,3))); ui->p3_d_dPgcn1->setText(set2D(b(p157,427,0), b(p157,433,4))); ui->p3_d_dPgcn2->setText(set2D(b(p157,427,1), b(p157,433,5))); ui->p3_d_dPgcn3->setText(set2D(b(p157,427,2), b(p157,433,6))); ui->p3_d_dPgcn4->setText(set2D(b(p157,427,3), b(p157,433,7))); ui->p3_d_med1->setText(set2D(b(p157,427,4), b(p157,434,0))); ui->p3_d_med2->setText(set2D(b(p157,427,5), b(p157,434,1))); ui->p3_d_med3->setText(set2D(b(p157,427,6), b(p157,434,2))); ui->p3_d_med4->setText(set2D(b(p157,427,7), b(p157,434,3))); //page 4, выход за границу ui->p4_d_Lpg1->setText(set2D(b(p157,428,0), b(p157,434,4))); ui->p4_d_Lpg2->setText(set2D(b(p157,428,1), b(p157,434,5))); ui->p4_d_Lpg3->setText(set2D(b(p157,428,2), b(p157,434,6))); ui->p4_d_Lpg4->setText(set2D(b(p157,428,3), b(p157,434,7))); //page 5, выход за границу QString tmps; ui->p5d1_1->setText(tmps=set2D(b(p157,425,0), b(p157,431,4),"реак")); // P реак ui->p5d2_1->setText(tmps); ui->p5d3_1->setText(tmps); ui->p5d4_1->setText(tmps); ui->p5d1_2->setText(set2D(b(p157,426,0), b(p157,432,4),"пг")); // P троп Пг1..4 ui->p5d2_2->setText(set2D(b(p157,426,1), b(p157,432,5),"пг")); ui->p5d3_2->setText(set2D(b(p157,426,2), b(p157,432,6),"пг")); ui->p5d4_2->setText(set2D(b(p157,426,3), b(p157,432,7),"пг")); //page 6, выход за границу ui->p6d1_1->setText(tmps=set2D(b(p157,425,0), b(p157,431,4),"реак")); // P реак ui->p6d2_1->setText(tmps); ui->p6d3_1->setText(tmps); ui->p6d4_1->setText(tmps); ui->p6d1_2->setText(set2D(b(p157,423,4), b(p157,430,0),"ТЭП")); //ТП ГРЧН1 (Т гн1) ui->p6d2_2->setText(set2D(b(p157,424,0), b(p157,430,4),"ТЭП")); //ТП ГРЧН1 (Т гн2) ui->p6d3_2->setText(set2D(b(p157,424,1), b(p157,430,5),"ТЭП")); //ТП ГРЧН1 (Т гн3) ui->p6d4_2->setText(set2D(b(p157,423,5), b(p157,430,1),"ТЭП")); //ТП ГРЧН1 (Т гн4) ui->p6d1_3->setText(set2D(b(p157,423,6), b(p157,430,2),"ТСП")); //ТСП ГРЧН1 ui->p6d2_3->setText(set2D(b(p157,424,2), b(p157,430,6),"ТСП")); //ТСП ГРЧН2 ui->p6d3_3->setText(set2D(b(p157,424,2), b(p157,430,6),"ТСП")); //ТСП ГРЧН3 ui->p6d4_3->setText(set2D(b(p157,423,6), b(p157,430,2),"ТСП")); //ТСП ГРЧН4 }