bool ParticleSystemEffect::checkVolumeEndCondition(void) { Pnt3f min = getTheSystem()->getVolume().getMin(); Pnt3f max = getTheSystem()->getVolume().getMax(); Vec3f diff = max - min; //assert max>min warn bad if(getMaxVolume() >= 0.0f) { return diff.x()*diff.y()*diff.z() > getMaxVolume() || diff.x()*diff.y()*diff.z() < getMinVolume(); } else { return diff.x()*diff.y()*diff.z() < getMinVolume(); } }
void EngineSettings::setInitialVolume(float volume) { if (volume > getMaxVolume()) { throw NotSupported("Given volume exceeds maximum volume"); } if (volume < 0) { throw NotSupported("Given volume is below 0"); } m_initialvolume = volume; }
void EngineSettings::setInitialVolume(float volume) { if (volume > getMaxVolume() || volume < 0) { FL_WARN(_log, LMsg("EngineSettings::setInitialVolume() - ") << " Tried to set initial volume to an unsupporded value of " << volume << ". Setting volume to the default value of 5 (minumum is 0, maximum is 10)"); m_initialvolume = 5.0; return; } m_initialvolume = volume; }