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


C++ StreamReaderLE::IncPtr方法代码示例

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


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

示例1: ReadBitM_Binary

// ------------------------------------------------------------------------------------------------
void COBImporter::ReadBitM_Binary(COB::Scene& /*out*/, StreamReaderLE& reader, const ChunkInfo& nfo)
{
    if(nfo.version > 1) {
        return UnsupportedChunk_Binary(reader,nfo,"BitM");
    }

    const chunk_guard cn(nfo,reader);

    const uint32_t len = reader.GetI4();
    reader.IncPtr(len);

    reader.GetI4();
    reader.IncPtr(reader.GetI4());
}
开发者ID:mrcrr8614,项目名称:assimp,代码行数:15,代码来源:COBLoader.cpp

示例2: UnsupportedChunk_Binary

// ------------------------------------------------------------------------------------------------
void COBImporter::UnsupportedChunk_Binary( StreamReaderLE& reader, const ChunkInfo& nfo, const char* name)
{
    const std::string error = format("Encountered unsupported chunk: ") <<  name <<
        " [version: "<<nfo.version<<", size: "<<nfo.size<<"]";

    // we can recover if the chunk size was specified.
    if(nfo.size != static_cast<unsigned int>(-1)) {
        DefaultLogger::get()->error(error);
        reader.IncPtr(nfo.size);
    }
    else ThrowException(error);
}
开发者ID:mrcrr8614,项目名称:assimp,代码行数:13,代码来源:COBLoader.cpp

示例3: ReadBasicNodeInfo_Binary

// ------------------------------------------------------------------------------------------------
void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& /*nfo*/)
{
    const unsigned int dupes = reader.GetI2();
    ReadString_Binary(msh.name,reader);

    msh.name = format(msh.name)<<'_'<<dupes;

    // skip local axes for the moment
    reader.IncPtr(48);

    msh.transform = aiMatrix4x4();
    for(unsigned int y = 0; y < 3; ++y) {
        for(unsigned int x =0; x < 4; ++x) {
            msh.transform[y][x] = reader.GetF4();
        }
    }
}
开发者ID:mrcrr8614,项目名称:assimp,代码行数:18,代码来源:COBLoader.cpp

示例4: ReadCame_Binary

// ------------------------------------------------------------------------------------------------
void COBImporter::ReadCame_Binary(COB::Scene& out, StreamReaderLE& reader, const ChunkInfo& nfo)
{
    if(nfo.version > 2) {
        return UnsupportedChunk_Binary(reader,nfo,"Came");
    }

    const chunk_guard cn(nfo,reader);

    out.nodes.push_back(std::shared_ptr<Camera>(new Camera()));
    Camera& msh = (Camera&)(*out.nodes.back().get());
    msh = nfo;

    ReadBasicNodeInfo_Binary(msh,reader,nfo);

    // the rest is not interesting for us, so we skip over it.
    if(nfo.version > 1) {
        if (reader.GetI2()==512) {
            reader.IncPtr(42);
        }
    }
}
开发者ID:mrcrr8614,项目名称:assimp,代码行数:22,代码来源:COBLoader.cpp


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