Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Jan 5, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Oh I see. Didn't properly parse the flags before... :)

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

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant