本文整理汇总了C++中TXsheet::getZ方法的典型用法代码示例。如果您正苦于以下问题:C++ TXsheet::getZ方法的具体用法?C++ TXsheet::getZ怎么用?C++ TXsheet::getZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TXsheet
的用法示例。
在下文中一共展示了TXsheet::getZ方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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;
}
示例2: 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;
}