bool Mesh2MainWindow::openColorMap(ColorVector& cv, QString fname) { if (fname.isEmpty()) return false; ifstream file(QWT3DLOCAL8BIT(fname)); if (!file) return false; RGBA rgb; cv.clear(); while ( file ) { file >> rgb.r >> rgb.g >> rgb.b; file.ignore(1000,'\n'); if (!file.good()) break; else { rgb.a = 1; rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; cv.push_back(rgb); } } return true; }
void push_back( InteractObject* obj, IsActiveFunctor* isActive = new AlwaysActiveFunctor<>(), IColor* color = new Color() ) { _objects.push_back( obj ); _isActive.push_back( isActive ); _colors.push_back( color ); }