本文整理汇总了C++中TStageObject::getZ方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::getZ方法的具体用法?C++ TStageObject::getZ怎么用?C++ TStageObject::getZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStageObject
的用法示例。
在下文中一共展示了TStageObject::getZ方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
void Stage::visit(Visitor &visitor, const VisitArgs &args) {
ToonzScene *scene = args.m_scene;
TXsheet *xsh = args.m_xsh;
int row = args.m_row;
int col = args.m_col;
const OnionSkinMask *osm = args.m_osm;
bool camera3d = args.m_camera3d;
int xsheetLevel = args.m_xsheetLevel;
bool isPlaying = args.m_isPlaying;
StageBuilder sb;
sb.m_vs = &visitor.m_vs;
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
TStageObject *camera = xsh->getStageObject(cameraId);
TAffine cameraAff = camera->getPlacement(row);
double z = camera->getZ(row);
sb.m_cameraPlacement = ZPlacement(cameraAff, z);
sb.m_camera3d = camera3d;
sb.m_currentColumnIndex = col;
sb.m_xsheetLevel = xsheetLevel;
sb.m_onionSkinMask = *osm;
Player::m_onionSkinFrontSize = 0;
Player::m_onionSkinBackSize = 0;
sb.addFrame(sb.m_players, scene, xsh, row, 0, args.m_onlyVisible,
args.m_checkPreviewVisibility);
updateOnionSkinSize(sb.m_players);
sb.visit(sb.m_players, visitor, isPlaying);
}
示例2:
TAffine TTool::getCurrentObjectParentMatrix2() const {
TTool::Application *app = m_application;
TFrameHandle *fh = app->getCurrentFrame();
if (fh->isEditingLevel()) return TAffine();
int frame = fh->getFrame();
TXsheet *xsh = app->getCurrentXsheet()->getXsheet();
TStageObjectId id = app->getCurrentObject()->getObjectId();
double objZ = xsh->getZ(id, frame);
TStageObjectId parentId = xsh->getStageObjectParent(id);
if (parentId == TStageObjectId::NoneId) return TAffine();
id = parentId;
TAffine objPlacement = xsh->getPlacement(id, frame);
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
TStageObject *camera = xsh->getStageObject(cameraId);
TAffine cameraPlacement = camera->getPlacement(frame);
double cameraZ = camera->getZ(frame);
TAffine placement;
TStageObject::perspective(placement, cameraPlacement, cameraZ, objPlacement,
objZ, 0);
return placement;
}
示例3: getColumnMatrix
TAffine TTool::getColumnMatrix(int columnIndex) const {
if (!m_application) return TAffine();
TFrameHandle *fh = m_application->getCurrentFrame();
if (fh->isEditingLevel()) return TAffine();
int frame = fh->getFrame();
TXsheet *xsh = m_application->getCurrentXsheet()->getXsheet();
TStageObjectId columnId = TStageObjectId::ColumnId(columnIndex);
TAffine columnPlacement = xsh->getPlacement(columnId, frame);
double columnZ = xsh->getZ(columnId, frame);
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
TStageObject *camera = xsh->getStageObject(cameraId);
TAffine cameraPlacement = camera->getPlacement(frame);
double cameraZ = camera->getZ(frame);
TStageObject *object = xsh->getStageObject(columnId);
TAffine placement;
TStageObject::perspective(placement, cameraPlacement, cameraZ,
columnPlacement, columnZ,
object->getGlobalNoScaleZ());
return placement;
}
示例4: applyPlasticDeform
static inline bool applyPlasticDeform(
TXshColumn *col, const ImagePainter::VisualSettings *vs) {
const PlasticVisualSettings &pvs = vs->m_plasticVisualSettings;
return pvs.m_applyPlasticDeformation && (col != pvs.m_showOriginalColumn);
}
}; // locals
TXshColumnP column = xsh->getColumn(col);
assert(column);
TStageObject *pegbar = xsh->getStageObject(TStageObjectId::ColumnId(col));
// Build affine placements
TAffine columnAff = pegbar->getPlacement(row);
double columnZ = pegbar->getZ(row);
double columnNoScaleZ = pegbar->getGlobalNoScaleZ();
TXshCell cell = xsh->getCell(row, col);
TXshLevel *xl = cell.m_level.getPointer();
if (!xl) return;
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);