本文整理汇总了C++中TStageObject::getCamera方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::getCamera方法的具体用法?C++ TStageObject::getCamera怎么用?C++ TStageObject::getCamera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStageObject
的用法示例。
在下文中一共展示了TStageObject::getCamera方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: storeCamera
void TCameraDataElement::storeCamera(const TStageObjectId &selectedObj, TXsheet *xsh)
{
TStageObject *obj = xsh->getStageObjectTree()->getStageObject(selectedObj, false);
assert(obj);
m_params = obj->getParams();
m_camera = *(obj->getCamera());
m_dagPos = obj->getDagNodePos();
}
示例2: restoreCamera
TStageObjectId TCameraDataElement::restoreCamera(TXsheet *xsh, bool copyPosition) const
{
TStageObjectTree *tree = xsh->getStageObjectTree();
// Search the first unused camera id in the xsheet
int index = 0;
while (tree->getStageObject(TStageObjectId::CameraId(index), false))
++index;
// Create the new camera object and assign stored data
TStageObject *newCamera = tree->getStageObject(TStageObjectId::CameraId(index), true);
newCamera->assignParams(m_params);
*(newCamera->getCamera()) = m_camera;
if (copyPosition)
newCamera->setDagNodePos(m_dagPos);
return newCamera->getId();
}
示例3: addFrame
bool addFrame(ToonzScene &scene, int row, bool isLast) {
TAffine cameraView =
scene.getXsheet()->getPlacement(TStageObjectId::CameraId(0), row).inv();
TPixel32 bgColor = scene.getProperties()->getBgColor();
TStageObject *cameraPegbar =
scene.getXsheet()->getStageObject(TStageObjectId::CameraId(0));
assert(cameraPegbar);
TCamera *camera = cameraPegbar->getCamera();
assert(camera);
TAffine dpiAff = getDpiAffine(camera).inv();
TAffine aff = cameraView * dpiAff;
Stage::VisitArgs args;
args.m_scene = &scene;
args.m_xsh = scene.getXsheet();
args.m_row = row;
args.m_col = m_columnIndex;
args.m_osm = &m_osMask;
ImagePainter::VisualSettings vs;
FlashStagePainter painter(m_flash, aff, vs, bgColor);
m_flash.beginFrame(++m_frameIndex);
Stage::visit(painter, args);
/*
&scene,
scene.getXsheet(),
row,
m_columnIndex,
m_osMask,
false, 0);
*/
m_frameIndex = m_flash.endFrame(isLast, m_frameCountLoader,
(m_sceneCount == m_sceneIndex));
return true;
}