Couple of questions it looks like after the object has been added to
the scene the ObjectContainer3D has a protected item
fish.implicitPartition._updatedEntityList.mesh this item contains the
mesh although it is protected.
When I clone the fish it will return an Object3D and that can be cast
to an ObjectContainer3D but when I add it to the scene it complains
because it is null? I do see that most of the parsers parse out the
data and then place the item in an ObjectContainer3D the exception to
this case so far being the md5mesh that will return a mesh.
1.What is the easiest way to clone the ObjectContainer3D?
2. Is their an easy way to retrieve a Mesh from an ObjectContainer3D?
I have been looking at the different methods and any input on this
would be greatly appreciated.
fishArr[i] = ObjectContainer3D();
for(var j:uint = 0; j<fish.numChildren; j++)
{
fishArr[i].addChild(fish.getChildAt(j).clone() as
ObjectContainer3D);
}
On Apr 27, 4:14 am, Fabrice3D <[email protected]> wrote:
> yes, Sven is right, tho, to make it clearer, i would first parse to retrieve
> the mesh you do need,
> then proceed the cloning
>
> Also to make something clear, I read often remarks when people assume data is
> of different nature coming from a different type of 3d formats.
> It is not true.
> Each file format holds a description of objects, the parsers deserialize this
> info and "translate" it to a data structure that Away understands/can use.
> Once this point is reached. Each and every bits of data is exactly the same,
> that you load from obj, 3ds, ac. collada or declare a new AS3 instance.
>
> Fabrice
>
> On Apr 27, 2011, at 1:28 AM, sven wrote:
>
>
>
>
>
>
>
> > I have no experience with awd stuff, but with obj I had to clone the meshes
> > - cloning the ObjectContainer didn't work for me.. So maybe try something
> > like this in your loop:
>
> > fishArr[i] = ObjectContainer3D();
> > for(var j:uint = 0; j<fish.numChildren; j++)
> > {
> > fishArr[i].addChild( Mesh(fish.getChildAt(j).clone()) );
> > }
>
> > cheers,
> > sven