本文整理汇总了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());
}
示例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);
}
示例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();
}
}
}
示例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);
}
}
}