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


C++ TXshLevel::getChildLevel方法代码示例

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


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

示例1: getUsedLevels

void TXsheet::getUsedLevels(set<TXshLevel *> &levels) const {
  set<const TXsheet *> visitedXshs;
  vector<const TXsheet *> todoXshs;

  visitedXshs.insert(this);
  todoXshs.push_back(this);

  while (!todoXshs.empty()) {
    const TXsheet *xsh = todoXshs.back();
    todoXshs.pop_back();

    int c0 = 0, c1 = xsh->getColumnCount() - 1;
    for (int c = c0; c <= c1; ++c) {
      TXshColumnP column = const_cast<TXsheet *>(xsh)->getColumn(c);
      if (!column) continue;

      TXshCellColumn *cellColumn = column->getCellColumn();
      if (!cellColumn) continue;

      int r0, r1;
      if (!cellColumn->getRange(r0, r1)) continue;

      TXshLevel *level = 0;
      for (int r = r0; r <= r1; r++) {
        TXshCell cell = cellColumn->getCell(r);
        if (cell.isEmpty() || !cell.m_level) continue;

        if (level != cell.m_level.getPointer()) {
          level = cell.m_level.getPointer();
          levels.insert(level);
          if (level->getChildLevel()) {
            TXsheet *childXsh = level->getChildLevel()->getXsheet();
            if (visitedXshs.count(childXsh) == 0) {
              visitedXshs.insert(childXsh);
              todoXshs.push_back(childXsh);
            }
          }
        }
      }
    }
  }
}
开发者ID:walkerka,项目名称:opentoonz,代码行数:42,代码来源:txsheet.cpp

示例2: loadFolder

void TLevelSet::loadFolder(TIStream &is, TFilePath folder) {
  std::string s;
  is.getTagParam("type", s);
  if (s == "default") setDefaultFolder(folder);
  while (!is.eos()) {
    std::string tagName;
    is.matchTag(tagName);
    if (tagName == "levels") {
      while (!is.eos()) {
        TPersist *p = 0;
        is >> p;
        TXshLevel *xshLevel = dynamic_cast<TXshLevel *>(p);
        if (xshLevel && !xshLevel->getChildLevel())
          moveLevelToFolder(folder, xshLevel);
      }
    } else if (tagName == "folder") {
      is.getTagParam("name", s);
      TFilePath child = createFolder(folder, ::to_wstring(s));
      loadFolder(is, child);
    } else
      throw TException("expected <levels> or <folder>");
    is.closeChild();
  }
开发者ID:Makoto-Sasahara,项目名称:opentoonz,代码行数:23,代码来源:levelset.cpp

示例3: getDpiAffine

  ZPlacement cameraPlacement;
  if (m_subXSheetStack.empty())
    cameraPlacement = m_cameraPlacement;
  else
    cameraPlacement = m_subXSheetStack.back().m_camera;
  TAffine columnZaff;
  bool columnBehindCamera = TStageObject::perspective(
      columnZaff, cameraPlacement.m_aff, cameraPlacement.m_z, columnAff,
      columnZ, columnNoScaleZ);

  if (!columnBehindCamera) return;

  TXshSimpleLevel *sl = xl->getSimpleLevel();

  bool storePlayer =
      sl || (xl->getChildLevel() &&
             locals::applyPlasticDeform(column.getPointer(), m_vs) &&
             locals::isMeshDeformed(xsh, pegbar, m_vs));

  if (storePlayer) {
    // Build and store a player

    Player player;
    player.m_sl     = sl;
    player.m_fid    = cell.m_frameId;
    player.m_xsh    = xsh;
    player.m_column = col;
    player.m_frame  = row;
    player.m_dpiAff = sl ? getDpiAffine(sl, cell.m_frameId) : TAffine();
    player.m_onionSkinDistance   = m_onionSkinDistance;
    player.m_isCurrentColumn     = (m_currentColumnIndex == col);
开发者ID:ideasman42,项目名称:opentoonz,代码行数:31,代码来源:stage.cpp


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