Hi,
I've developed a custom binary format exporter in Blender for my model's mesh, material and animation data. When I attempt to load the file data Integer values are read correctly in the header but when I go to read the actual per-vertex data the values are often either 0.0 or something like this monstrosity:
-6906376617984.000000
I think the problem might have something to do with the fact the values are floats. I have tried the following code to help solve the problem but it doesn't fix the problem.
float RootFile::readFloat( void )
{
uint8_t b[4];
RootDwordFloat d;
read( b, 4, 1 );
d.dword_value = ((uint32_t)b[3] << 24) |
((uint32_t)b[2] << 16) |
((uint32_t)b[1] << 8) |
((uint32_t)b[0]);
return d.float_value;
}
Do you have any idea how I could solve this? Any replies are appreciated.