本文整理汇总了C++中Filter::getFilter方法的典型用法代码示例。如果您正苦于以下问题:C++ Filter::getFilter方法的具体用法?C++ Filter::getFilter怎么用?C++ Filter::getFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filter
的用法示例。
在下文中一共展示了Filter::getFilter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convolveFilters
void NeuronType::convolveFilters() {
const float deltaT = SystemVar::GetFloatVar("deltaT");
Filter* synapticFilter = m_synapseType.getFilter();
float* vals = synapticFilter->getFilter();
if (deltaT > verySmallFloat) {
if ((m_dendriteToSomaFilter.size() > 1) && (synapticFilter->size() > 1)) {
unsigned int convSize = m_dendriteToSomaFilter.size() + synapticFilter->size() - 1;
m_convolvedFilter.setFilter(Calc::convolve(
m_dendriteToSomaFilter.getFilter(), m_dendriteToSomaFilter.size(),
synapticFilter->getFilter(), synapticFilter->size(), deltaT), convSize);
} else if (m_dendriteToSomaFilter.size() > 1) {
m_convolvedFilter.setFilter(m_dendriteToSomaFilter.getFilter(), m_dendriteToSomaFilter.size());
} else {
m_convolvedFilter.setFilter(synapticFilter->getFilter(), synapticFilter->size());
}
}
}
示例2: setEffect
bool Source::setEffect(const char *name, const std::map<Filter::Parameter, float> ¶ms)
{
ALuint slot, target;
Filter *filter = nullptr;
// effect with this name doesn't exist
if (!dynamic_cast<Audio*>(audiomodule())->getEffectID(name, target))
return false;
auto iter = effectmap.find(name);
if (iter == effectmap.end())
{
// new send target needed but no more room
if (slotlist.empty())
return false;
slot = slotlist.top();
slotlist.pop();
}
else
{
slot = iter->second.slot;
filter = iter->second.filter;
}
if (!filter)
filter = new Filter();
effectmap[name] = {filter, slot, target};
filter->setParams(params);
#ifdef ALC_EXT_EFX
if (valid)
{
//in case of failure contains AL_FILTER_NULL, a valid non-filter
alSource3i(source, AL_AUXILIARY_SEND_FILTER, target, slot, filter->getFilter());
//alGetError();
}
#endif
return true;
}