google-code-export / papervision3d

Automatically exported from code.google.com/p/papervision3d
1 stars 1 forks source link

DAE.yUp invalid after load completed #272

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a DAE object.
2. Attach an event handler for LOAD_COMPLETE.
3. In the event handler, access the DAE object's "yUp" property.

What is the expected output? What do you see instead?
The DAE.yUp property should match the value specified in the .dae file.  
Instead, it always returns false.

What version of the product are you using? On what operating system?
Papervision3d v. 2.1.920
Windows XP 32-bit

Please provide any additional information below.
DAE.yUp is a property that will return the correct value if DAE.document is not 
null, or false if DAE.document is null.  The DAE.buildScene() function sets 
DAE.document to null as part of the cleanup process, so after the scene is 
built, DAE.yUp will always be invalid.

I solved this by changing the DAE class to cache the value of yUp immediately 
before DAE.buildScene() destroys DAE.document, and changing the DAE.yUp 
property to reference this cached value if it is available.

Certain math I use to manipulate the objects in the scene after loading 
requires an accurate yUp property.

Original issue reported on code.google.com by alk...@gmail.com on 30 Aug 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Step 2.5: Call DAE.load("model.dae")

Original comment by alk...@gmail.com on 30 Aug 2010 at 4:21