当前位置: 首页>>代码示例>>C++>>正文


C++ TStageObject::getSO方法代码示例

本文整理汇总了C++中TStageObject::getSO方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::getSO方法的具体用法?C++ TStageObject::getSO怎么用?C++ TStageObject::getSO使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TStageObject的用法示例。


在下文中一共展示了TStageObject::getSO方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: addFrame

void StageBuilder::addFrame(PlayerSet &players, ToonzScene *scene, TXsheet *xsh,
                            int row, int level, bool includeUnvisible,
                            bool checkPreviewVisibility) {
  int columnCount        = xsh->getColumnCount();
  unsigned int maskCount = m_masks.size();

  std::vector<std::pair<double, int>> shuffle;
  for (int c = 0; c < columnCount; c++) {
    TXshColumnP column = xsh->getColumn(c);
    assert(column);
    TStageObject *pegbar = xsh->getStageObject(TStageObjectId::ColumnId(c));
    double columnSO      = pegbar->getSO(row);
    shuffle.push_back(std::make_pair(columnSO, c));
  }
  std::stable_sort(shuffle.begin(), shuffle.end(), StackingOrder());

  for (int i = 0; i < columnCount; i++) {
    int c = shuffle[i].second;
    if (CameraTestCheck::instance()->isEnabled() && c != m_currentColumnIndex)
      continue;
    if (level == 0) {
      // m_isCurrentColumn = (c == m_currentColumnIndex);
      m_ancestorColumnIndex = c;
    }
    TXshColumn *column = xsh->getColumn(c);
    bool isMask        = false;
    if (column && !column->isEmpty()) {
      if (!column->isPreviewVisible() && checkPreviewVisibility) continue;
      if (column->isCamstandVisible() ||
          includeUnvisible)  // se l'"occhietto" non e' chiuso
      {
        if (column->isMask())  // se e' una maschera (usate solo in tab pro)
        {
          isMask = true;
          std::vector<int> saveMasks;
          saveMasks.swap(m_masks);
          int maskIndex   = m_maskPool.size();
          PlayerSet *mask = new PlayerSet();
          m_maskPool.push_back(mask);
          addCellWithOnionSkin(*mask, scene, xsh, row, c, level);
          std::stable_sort(mask->begin(), mask->end(), PlayerLt());
          saveMasks.swap(m_masks);
          m_masks.push_back(maskIndex);
        } else
          addCellWithOnionSkin(players, scene, xsh, row, c, level);
      }
    }
    if (!isMask) {
      while (m_masks.size() > maskCount) m_masks.pop_back();
    }
  }
  if (level == 0) std::stable_sort(players.begin(), players.end(), PlayerLt());
}
开发者ID:ideasman42,项目名称:opentoonz,代码行数:53,代码来源:stage.cpp


注:本文中的TStageObject::getSO方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。