I use serialize utility for save my btBvhTriangleMeshShape. Generally, it works. But now I've found a problem:
Sometimes, when serializing btQuantizedBvh (btQuantizedBvh::serialize), the values in m_quantizedContiguousNodes.m_quantizedAabbMax[..] and m_quantizedContiguousNodes.m_quantizedAabbMin[..] make that in memory appear the sequence of bytes: 53 44 4e 41 that matches 'SDNA'. This is the 'magic' number to detect the DNA data.
When I load the file, in bFile::parseInternal it finds the erroneous 'SDNA' sequence (not followed by 'NAME' sequence as says in bDNA::init).
If I change in bFile::parseInternal the line
Code: Select all
if (!sdnaPos && strncmp(tempBuffer, "SDNA", 4)==0)Code: Select all
if (!sdnaPos && strncmp(tempBuffer, "SDNANAME", 8)==0)Can it be the general solution for this issue?
Thanks,
Nacho.