stuartcaunt / isgl3d

iOS Scene Graph Library: a 3D framework for the iPhone, iPad and iPod touch
http://isgl3d.com
Other
108 stars 46 forks source link

Meshes with parents not receiving proper transformations in PODImporter #40

Closed jeiting closed 12 years ago

jeiting commented 12 years ago

When constructing the node graph from a pod scene, sub-meshes were being assigned the global transformation matrix. This only works if the mesh is a root object. This pull request populates the constructed nodes with the self->parent transformation and not the global.

I noticed the bug when trying to load the attached pod file. Without the patch all the sub meshes render at the origin. With the patch everything looks correct. http://cl.ly/0M1N070N1u1T2F0C3V14

I also ran the PODTest and the teapot rendered properly with the change.

HolgerW1 commented 12 years ago

Manually merged with cbfa1c536bcdbc5e2f118272d405bca29ce2ed11