//##ModelId=4C31F9F801D4 void fluid::glExtension::btGLTexture1D::create(GLint sz, GLint internalFormat, GLint clr) { TEST_ASSERT_MSG(sz <= getMaxSize(), "Image Size Out Of Bounds."); if(texture != -1) glDeleteTextures(1,&texture); glGenTextures(1,&texture); glBindTexture(GL_TEXTURE_1D,texture); GLint* clrData=(GLint*)malloc(sz << 2); for(int i=0;i < sz;i++) clrData[i]=clr; glTexImage1D(GL_TEXTURE_1D,0,internalFormat,sz,0,GL_RGBA,GL_UNSIGNED_BYTE,clrData); free(clrData); parameter.szWidth=sz; parameter.internalFormat=internalFormat; parameter.magFilter=GL_NEAREST; parameter.minFilter=GL_NEAREST; parameter.wrapModeS=GL_CLAMP_TO_EDGE; setParameterSet(¶meter); glBindTexture(GL_TEXTURE_1D,0); }
//##ModelId=4C31FBC30167 void fluid::glExtension::btGLTexture1D::setData(GLint format, GLint type, const GLubyte* dataPtr) { checkBound(); glBindTexture(GL_TEXTURE_1D,texture); glTexImage1D(GL_TEXTURE_1D,0,parameter.internalFormat,getSize(),0,format,type,dataPtr); setParameterSet(¶meter); glBindTexture(GL_TEXTURE_1D,0); }
// --- Construction and Destruction ---------------------------------------- // MmffForceField::MmffForceField() : chemkit::ForceField("mmff"), m_parameters(0) { const chemkit::Plugin *mmffPlugin = chemkit::PluginManager::instance()->plugin("mmff"); if(mmffPlugin){ std::string dataPath = mmffPlugin->dataPath(); addParameterSet("mmff94", dataPath + "mmff94.prm"); setParameterSet("mmff94"); } setFlags(chemkit::ForceField::AnalyticalGradient); }
void WobblyWindowsEffect::reconfigure(ReconfigureFlags) { WobblyWindowsConfig::self()->read(); QString settingsMode = WobblyWindowsConfig::settings(); if (settingsMode != QStringLiteral("Custom")) { unsigned int wobblynessLevel = WobblyWindowsConfig::wobblynessLevel(); if (wobblynessLevel > 4) { qCDebug(KWINEFFECTS) << "Wrong value for \"WobblynessLevel\" : " << wobblynessLevel; wobblynessLevel = 4; } setParameterSet(pset[wobblynessLevel]); if (WobblyWindowsConfig::advancedMode()) { m_stiffness = WobblyWindowsConfig::stiffness() / 100.0; m_drag = WobblyWindowsConfig::drag() / 100.0; m_move_factor = WobblyWindowsConfig::moveFactor() / 100.0; } } else { // Custom method, read all values from config file. m_stiffness = WobblyWindowsConfig::stiffness() / 100.0; m_drag = WobblyWindowsConfig::drag() / 100.0; m_move_factor = WobblyWindowsConfig::moveFactor() / 100.0; m_xTesselation = WobblyWindowsConfig::xTesselation(); m_yTesselation = WobblyWindowsConfig::yTesselation(); m_minVelocity = WobblyWindowsConfig::minVelocity(); m_maxVelocity = WobblyWindowsConfig::maxVelocity(); m_stopVelocity = WobblyWindowsConfig::stopVelocity(); m_minAcceleration = WobblyWindowsConfig::minAcceleration(); m_maxAcceleration = WobblyWindowsConfig::maxAcceleration(); m_stopAcceleration = WobblyWindowsConfig::stopAcceleration(); m_moveEffectEnabled = WobblyWindowsConfig::moveEffect(); m_openEffectEnabled = WobblyWindowsConfig::openEffect(); // disable close effect by default for now as it doesn't do what I want. m_closeEffectEnabled = WobblyWindowsConfig::closeEffect(); } m_moveWobble = WobblyWindowsConfig::moveWobble(); m_resizeWobble = WobblyWindowsConfig::resizeWobble(); #if defined VERBOSE_MODE qCDebug(KWINEFFECTS) << "Parameters :\n" << "move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\n" "grid(" << m_stiffness << ", " << m_drag << ", " << m_move_factor << ")\n" << "velocity(" << m_minVelocity << ", " << m_maxVelocity << ", " << m_stopVelocity << ")\n" << "acceleration(" << m_minAcceleration << ", " << m_maxAcceleration << ", " << m_stopAcceleration << ")\n" << "tesselation(" << m_xTesselation << ", " << m_yTesselation << ")"; #endif }