void MeshRenderProcessorGLSR::process() { /* if (imageInport_.isConnected()) { utilgl::activateTargetAndCopySource(outport_, imageInport_); } else { utilgl::activateAndClearTarget(outport_, ImageType::ColorDepth); } */ utilgl::activateAndClearTarget(outport_, ImageType::ColorDepth); if (meshName_.isConnected()) { auto inDescr = *meshName_.getData(); sceneDesc_->setInputName(inDescr.getInputName()); } //LogInfo(inport_.getContentInfo()); //LogInfo(inport_.getClassIdentifier()); shader_.activate(); utilgl::setShaderUniforms(shader_, camera_, "camera_"); //std::cout << "Camera Position = " << camera_.position.x LogInfo(camera_.getLookFrom()); utilgl::setShaderUniforms(shader_, lightingProperty_, "light_"); LogInfo(lightingProperty_.silhouetteThreshold_); LogInfo(lightingProperty_.depthThreshold_); LogInfo(lightingProperty_.specularExponent_); utilgl::setShaderUniforms(shader_, lightingProperty_.silhouetteThreshold_, "threshold_sil"); utilgl::setShaderUniforms(shader_, lightingProperty_.depthThreshold_, "threshold_depth"); utilgl::setShaderUniforms(shader_, overrideColor_); utilgl::GlBoolState depthTest(GL_DEPTH_TEST, enableDepthTest_.get()); utilgl::CullFaceState culling(cullFace_.get()); utilgl::PolygonModeState polygon(polygonMode_.get(), renderLineWidth_, renderPointSize_); for (auto& drawer : drawers_) { utilgl::setShaderUniforms(shader_, *(drawer.second->getGeometry()), "geometry_"); drawer.second->draw(); } sceneDesc_->setImageDimensions(outport_.getDimensions()); sceneDesc_->setShaderName(lightingProperty_.shadingMode_.getSelectedDisplayName()); sceneDesc_->setLayerDescription(layersDeclaration_); /*setImageDimensions(*sceneDesc_); setShaderName(*sceneDesc_); setLayerDescription(*sceneDesc_);*/ sceneDesc_->printDescription(); sceneDescOutport_.setData(sceneDesc_); utilgl::deactivateCurrentTarget(); }
void Result::toStreamTptp(std::ostream& out) const { out << "% SZS status "; if (isSat() == Result::SAT) { out << "Satisfiable"; } else if (isSat() == Result::UNSAT) { out << "Unsatisfiable"; } else if (isValid() == Result::VALID) { out << "Theorem"; } else if (isValid() == Result::INVALID) { out << "CounterSatisfiable"; } else { out << "GaveUp"; } out << " for " << getInputName(); }
void MainWindow::updateTable(std::vector<int> inputs) { int n = inputs.size(); if (n == 0){ ui->tableWidget->setDisabled(true); } else { if (!ui->tableWidget->isEnabled()){ ui->tableWidget->setEnabled(true); } } ui->tableWidget->setRowCount(n); int i = 0; for (int inputIndex : inputs) { ui->tableWidget->setCellWidget(i, 0, new QLabel(getInputName(inputIndex), ui->tableWidget)); ui->tableWidget->setItem(i, 1, new QTableWidgetItem(getStructValFromIndex(inputIndex))); i++; } }
void V3NtkHandler::printPrimary() const { assert (_ntk); Msg(MSG_IFO) << "Primary Inputs = "; for (uint32_t i = 0; i < _ntk->getInputSize(); ++i) { if (i && !(i % 5)) Msg(MSG_IFO) << endl << string(strlen("Primary Inputs = "), ' '); else if (i) Msg(MSG_IFO) << ", "; Msg(MSG_IFO) << getInputName(i); if (_ntk->getNetWidth(_ntk->getInput(i)) > 1) Msg(MSG_IFO) << "(" << _ntk->getNetWidth(_ntk->getInput(i)) << ")"; } Msg(MSG_IFO) << endl; Msg(MSG_IFO) << "Primary Outputs = "; for (uint32_t i = 0; i < _ntk->getOutputSize(); ++i) { if (i && !(i % 5)) Msg(MSG_IFO) << endl << string(strlen("Primary Outputs = "), ' '); else if (i) Msg(MSG_IFO) << ", "; Msg(MSG_IFO) << getOutputName(i); if (_ntk->getNetWidth(_ntk->getOutput(i)) > 1) Msg(MSG_IFO) << "(" << _ntk->getNetWidth(_ntk->getOutput(i)) << ")"; } Msg(MSG_IFO) << endl; Msg(MSG_IFO) << "Primary Inouts = "; for (uint32_t i = 0; i < _ntk->getInoutSize(); ++i) { if (i && !(i % 5)) Msg(MSG_IFO) << endl << string(strlen("Primary Inouts = "), ' '); else if (i) Msg(MSG_IFO) << ", "; Msg(MSG_IFO) << getInoutName(i); if (_ntk->getNetWidth(_ntk->getInout(i)) > 1) Msg(MSG_IFO) << "(" << _ntk->getNetWidth(_ntk->getInout(i)) << ")"; } Msg(MSG_IFO) << endl; }
const char* MidiInPort_alsa::getName(int i) { return getInputName(i); }
const char* MidiInPort_alsa::getName(void) { if (getPort() == -1) { return "Null ALSA MIDI Input"; } return getInputName(getPort()); }
int getOptModelInputName(emb_optimizer optim, int name_idx, char u_name[], size_t maxlen, size_t *reqlen) { return getInputName(myModel, name_idx, u_name, maxlen, reqlen); }
Attribute Parser::getAttributes(wstring tag, wstring content) { Attribute attrs; wstring page = content; wstring onetag = L""; int foundS = 0; int foundE = 0; //초기화 attrs.identity.isPre = false; attrs.identity.isP = false; attrs.identity.isCenter = false; attrs.identity.isAddress = false; attrs.font.isBold = false; attrs.font.isCursive = false; attrs.font.underscore = false; attrs.font.size = 20; if (tag == L"h1") attrs.font.size = 40; else if (tag == L"h2") attrs.font.size = 35; else if (tag == L"h3") attrs.font.size = 30; else if (tag == L"h4") attrs.font.size = 25; else if (tag == L"h5") attrs.font.size = 21; else if (tag == L"h6") attrs.font.size = 15; if (tag == L"pre") attrs.identity.isPre = true; if (tag == L"p") attrs.identity.isP = true; if (tag == L"center") attrs.identity.isCenter = true; if (tag == L"address") attrs.identity.isAddress = true; if (tag == L"address") attrs.font.isCursive = true; if (tag == L"b") attrs.font.isBold = true; //태그 전체를 읽어 parsing한다. foundS = page.find(L"<" + tag); foundE = page.find(L">"); onetag = page.substr(foundS, foundE - foundS + 1); //form 속성 if (tag == L"form") { attrs.form.action = getFormAction(onetag); attrs.form.method = getFormMethod(onetag); } //input 속성 if (tag == L"input") { attrs.input.value = getInputValue(onetag); attrs.input.type = getInputType(onetag); attrs.input.name = getInputName(onetag); } //img 속성 if (tag == L"img") attrs.img = getImgInfo(onetag); //span 속성 if (tag == L"span") attrs.font.style = getSpanstyle(onetag); //a 속성 if (tag == L"a") { attrs.hyper.href = getHyperRef(onetag); attrs.font.underscore = true; attrs.font.style = L"color:blue"; } return attrs; }
void Sequencer_oss::displayInputs(std::ostream& out, char* initial) { for (int i=0; i<getNumInputs(); i++) { out << initial << i << ": " << getInputName(i) << '\n'; } }