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


C++ Output::moveOut方法代码示例

本文整理汇总了C++中osgdb::Output::moveOut方法的典型用法代码示例。如果您正苦于以下问题:C++ Output::moveOut方法的具体用法?C++ Output::moveOut怎么用?C++ Output::moveOut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在osgdb::Output的用法示例。


在下文中一共展示了Output::moveOut方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Locator_writeLocalData

bool Locator_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
    const osgVolume::Locator& locator = static_cast<const osgVolume::Locator&>(obj);

    const osg::Matrixd& matrix = locator.getTransform();
    fw.indent() << "Transform {" << std::endl;
    fw.moveIn();
    fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << std::endl;
    fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << std::endl;
    fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << std::endl;
    fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << std::endl;
    fw.moveOut();
    fw.indent() << "}"<< std::endl;

    return true;
}
开发者ID:151706061,项目名称:OpenSceneGraph,代码行数:16,代码来源:Locator.cpp

示例2: AnimationPath_writeLocalData

bool AnimationPath_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
    const osg::AnimationPath* ap = dynamic_cast<const osg::AnimationPath*>(&obj);
    if (!ap) return false;

    fw.indent() << "LoopMode ";
    switch(ap->getLoopMode())
    {
        case AnimationPath::SWING:
            fw << "SWING" <<std::endl;
            break;
        case AnimationPath::LOOP:
            fw << "LOOP"<<std::endl;
            break;
        case AnimationPath::NO_LOOPING:
            fw << "NO_LOOPING"<<std::endl;
            break;
    }

    const AnimationPath::TimeControlPointMap& tcpm = ap->getTimeControlPointMap();

    fw.indent() << "ControlPoints {"<< std::endl;
    fw.moveIn();

    int prec = fw.precision();
    fw.precision(15);

    for (AnimationPath::TimeControlPointMap::const_iterator itr=tcpm.begin();
         itr!=tcpm.end(); 
         ++itr)
    {
        fw.indent() << itr->first << " " << itr->second.getPosition() << " " << itr->second.getRotation() << " " <<itr->second.getScale() << std::endl;

    }

    fw.precision(prec);

    fw.moveOut();
    fw.indent() << "}"<< std::endl;

    return true;
}
开发者ID:aalex,项目名称:osg,代码行数:42,代码来源:AnimationPath.cpp


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