void Walkmesh::appendFromStream(Common::SeekableReadStream &stream) { stream.seek(0); /** Header format: * * uint8[8] - WOK version * uint32 - walkmesh type * uint8[48] - reserved * float[3] - position */ if (stream.readUint32BE() != MKTAG('B', 'W', 'M', ' ') || stream.readUint32BE() != MKTAG('V', '1', '.', '0')) throw Common::Exception("Invalid WOK version"); stream.skip(64); uint32 vertexCount = stream.readUint32LE(); uint32 vertexOffset = stream.readUint32LE(); uint32 faceCount = stream.readUint32LE(); uint32 faceOffset = stream.readUint32LE(); uint32 faceTypeOffset = stream.readUint32LE(); //- appendFaceTypes(stream, faceCount, faceTypeOffset); appendIndices(stream, faceCount, faceOffset); appendVertices(stream, vertexCount, vertexOffset); }
std::string Matcher::ToString() { if(_toStringCache == _TEXT("")) { auto sb = std::make_shared<StringBuilder>(); if(_allOfIndices.size() > 0) appendIndices(sb, _TEXT("AllOf"), _allOfIndices, componentNames); if(_anyOfIndices.size() > 0) { if(_allOfIndices.size() > 0) sb->Append(_TEXT(".")); appendIndices(sb, _TEXT("AnyOf"), _anyOfIndices, componentNames); } if(_noneOfIndices.size() > 0) appendIndices(sb, _TEXT(".NoneOf"), _noneOfIndices, componentNames); //C# TO C++ CONVERTER TODO TASK: There is no native C++ equivalent to 'ToString': _toStringCache = sb->ToString(); } return _toStringCache; }