How to get mesh faces/vertices in broomstick ?

Software: Away3D 4.x

BayOfXyz, Newbie
Posted: 18 August 2011 07:23 PM   Total Posts: 1

I want to know, how can I get mesh’s faces/vertices from Loader3D or ObjectContainer3D in broomstick ?
I just want to use them for ray intersection (method: getRayToTriangleIntersection)

   

Avatar
theMightyAtom, Sr. Member
Posted: 18 August 2011 08:31 PM   Total Posts: 669   [ # 1 ]
SubGeometry(_mesh.geometry.subGeometries[0]).vertexData

If you have more than one mesh in the loader, or more than one sub geometry in the mesh, you need to loop though them.

   

BayOfXyz, Newbie
Posted: 18 August 2011 09:25 PM   Total Posts: 1   [ # 2 ]

vertexData length equals to 3 (x, y, z) or n*3 ?

   

Avatar
theMightyAtom, Sr. Member
Posted: 18 August 2011 11:02 PM   Total Posts: 669   [ # 3 ]

Quite right, the vertexData is in triplets; x,y,z
There is also an indexData if you need faces (every 3 indices represent a face),
vertexNormalData, which gives the normal for each vertex,
and UVdata, which is in normalised u,v pairs, where there is one pair, for every triplet in vertexData.

   
   
‹‹ AWD2 and scene animation

X

Away3D Forum

Member Login

Username

Password

Remember_me



X