本文整理汇总了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);
}
}
}
}
}
}
}
示例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();
}
示例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);