[Papervision3D] An easier way to access mesh objects inside a DAE?

Seb Lee-Delisle sebstar55 at gmail.com
Thu Nov 20 05:37:45 PST 2008


and I would also store the resulting object into a property so you
don't have to perform the lookup every time.

so at the top of your class :

var bookTop: DisplayObject3D;

and when the collada has loaded :

bookTop = book.getChildByName('book_top", true);

then adjust the properties of bookTop as you like.

cheers!

Seb

On Thu, Nov 20, 2008 at 4:42 AM, Steve D <kruass at gmail.com> wrote:
> I haven't used recursive searching, but the getChildByName method supports a
> recursive search argument.
>
> book.getChildByName('book_top', true).rotationZ = animatedValue;
>
>
>
> On Wed, Nov 19, 2008 at 3:56 PM, Admiral <admiral at nuclearpixel.com> wrote:
>>
>> Hey everyone,
>> I was wondering if there is an easy way to get at one of several mesh
>> objects inside of a DAE instance.
>>
>> I've got a DAE file with two mesh objects inside of it, one named
>> "book_top"
>> and one named "book_bottom". I'm trying to display an animation of the
>> book
>> opening by rotating the "book_top" object -180 degrees. What I've got at
>> the
>> moment is really a pain to implement when just trying to change a property
>> on a single mesh object. Example of how it looks:
>>
>> book.getChildByName('COLLADA_Scene').getChildByName('book_top').rotationZ
>> =
>> animatedValue;
>>
>> I was wondering if there's an easier way of changing properties on those
>> mesh objects... Perhaps something a little shorter? Is there an easier way
>> to access those mesh objects? Is there a way directly access "book_top"
>> without having to ask for it through it's entire chain of parent objects,
>> ***without*** having to define and access it with something like the
>> following?:
>>
>> var book_top =
>> book.getChildByName('COLLADA_Scene').getChildByName('book_top');
>> book_top.rotationZ = animatedValue;
>>
>> Thanks,
>> -Admiral
>> --
>> View this message in context:
>> http://www.nabble.com/An-easier-way-to-access-mesh-objects-inside-a-DAE--tp20592273p20592273.html
>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>



-- 
Seb Lee-Delisle
Technical Director
Plug-in Media
pluginmedia.net
+44 (0) 1273 734540



More information about the Papervision3D mailing list