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


C++ TStageObject::getCamera方法代码示例

本文整理汇总了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();
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:9,代码来源:stageobjectsdata.cpp

示例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();
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:19,代码来源:stageobjectsdata.cpp

示例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;
  }
开发者ID:walkerka,项目名称:opentoonz,代码行数:39,代码来源:moviegenerator.cpp


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