本文整理汇总了C++中TFx::setFxId方法的典型用法代码示例。如果您正苦于以下问题:C++ TFx::setFxId方法的具体用法?C++ TFx::setFxId怎么用?C++ TFx::setFxId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFx
的用法示例。
在下文中一共展示了TFx::setFxId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StageObjectsData
StageObjectsData *StageObjectsData::clone() const
{
StageObjectsData *data = new StageObjectsData();
// Clone each element (the new data gets ownership)
int i, elementsCount = m_elements.size();
for (i = 0; i < elementsCount; ++i)
data->m_elements.append(m_elements[i]->clone());
// Clone each spline (the new data gets ownership)
for (i = 0; i < m_splines.size(); ++i)
data->m_splines.append(m_splines[i]->clone());
// Same for internal fxs
std::map<TFx *, TFx *> fxTable; // And trace the pairings with the originals
std::set<TFx *>::const_iterator it;
for (it = m_fxs.begin(); it != m_fxs.end(); ++it) {
TFx *fxOrig = *it;
assert(fxOrig);
assert(fxTable.count(fxOrig) == 0);
TFx *fx = fxOrig->clone(false);
fx->getAttributes()->setId(fxOrig->getAttributes()->getId());
fx->getAttributes()->passiveCacheDataIdx() = -1;
fx->setName(fxOrig->getName());
fx->setFxId(fxOrig->getFxId());
fxTable[fxOrig] = fx;
fx->addRef();
data->m_fxs.insert(fx);
}
// Same with terminals
for (it = m_terminalFxs.begin(); it != m_terminalFxs.end(); ++it) {
TFx *fxOrig = *it;
assert(fxOrig);
// If the fx was not already cloned above, do it now
TFx *fx = searchFx(fxTable, fxOrig);
if (!fx) {
fx = fxOrig->clone(false);
fx->getAttributes()->setId(fxOrig->getAttributes()->getId());
fx->getAttributes()->passiveCacheDataIdx() = -1;
fx->setName(fxOrig->getName());
fx->setFxId(fxOrig->getFxId());
fxTable[fxOrig] = fx;
}
fx->addRef();
data->m_terminalFxs.insert(fx);
}
if (!fxTable.empty())
updateFxLinks(fxTable); // Applies the traced map pairings to every fx descendant
// of each fx stored in the map.
// WARNING: m_fxsTable is NOT COPIED / CLONED !!
return data;
}