BassMunkee / awd

Automatically exported from code.google.com/p/awd
Apache License 2.0
0 stars 0 forks source link

Transform Matrix in scene header consists of floats instead of doubles #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Just checked against various .awd sample files. The spec says the 4x4 matrix 
should be 128 bytes long, but I have yet to find a file where this is the case. 
128 bytes suggests that each float is 8 bytes long and thus a double. Problem 
is that in the sample files the matrix allocates only 48 bytes, which would 
work for floats (last row is dropped, so we actually have a 3x4 matrix).

Also I guess it wouldn't hurt to add a small note for matrices that the last 
row is omitted because it is always [0, 0, 0, 1]. Took me 2 hours to figure 
that out :/

What's wrong here? The spec or the official sample files?

Attached a sample file of a simple cube exported with prefab 3D.

Original issue reported on code.google.com by pr...@ibbgdv.de on 8 Aug 2012 at 9:46

Attachments:

GoogleCodeExporter commented 8 years ago
The spec would be incorrect (or well, work in progress) here. There is a flag 
in the block headers that indicate whether matrices should be "wide" (doubles) 
or not (floats) but you're right that they should never be 16 entries long. 
Thanks for reporting!

Original comment by bengtric...@gmail.com on 8 Aug 2012 at 9:50

GoogleCodeExporter commented 8 years ago
Oh I see. Didn't properly parse the flags before... :)

Original comment by pr...@ibbgdv.de on 8 Aug 2012 at 11:45

GoogleCodeExporter commented 8 years ago
That's a good thing, because the parsers don't understand them anyway yet. :)

Original comment by bengtric...@gmail.com on 8 Aug 2012 at 11:46