How to get the geometry of a DAE object in Papervision3D

Lately i was looking for a way to get the geometry of a DAE DisplayObject3D in Papervision. Normaly you can get the geometry property of a DO3D by accessing myDO3D.geometry. But as soon as you try to get it from a DAE object, the geometry property returns null. After some googleling i found a solution to my problem:

var geometry:GeometryObject3D = myDAE.getChildByName(“COLLADA_Scene”).getChildByName(“nameOfTheObject”).geometry;
for short you can also write:
var geometry:GeometryObject3D = myDAE.getChildByName(“nameOfTheObject”, true).geometry; // note the true flag for recursive search

Now we can get things like calculating a BoundingBox ore better – a BoundingSphere by accessing the boundingSphere property like this:

Notice! If you for exsample want to get the real dimension of the BoundingSphere in the scene you have to thake account of the actual scale faktor of the myDAE object.


var myDAEWidthAndHight:Number = myDAE.scale * geometry.boundingSphere.radius;

I agree with you that this is quite a ugly hack – but it was the only way to access the geometry prop.  Better ways of doing that are welcome!


FOTB’08 speakers bio & session – printable document

… thought it would be usefull for all attendees of the flash on the beach conference to have a printable version of the speakers bio and session which you can read during your journey. all contents are copied from the original website, so please dont blame me if the are not correct. cu you on fotb!

download here : fotb08_speakers_bio_and_session

yes, i’m going to Flash on the Beach!!!

… it’s 3:30 – just a view hours before my trip to brighton beach. my bags are packet and the batteries are loaded. something forgotten? this will be my verry first time on flash on the beach (FOTB). i’m anxious to see all the crazy flash gurus from all around the world! now it’s time to sleep some hours …

cu on fotb!