Accessing Vertices. Where did they go?

Software: Away3D 4.x

wesleysnipes, Newbie
Posted: 21 October 2011 05:57 PM   Total Posts: 20

Hi,

Trying to create a sphere in the away3d 4 alpha and target the sphere’s verts. In the previous version I could grab each vertex by looping through the vertices array. Can anyone explain the equivalent of this in the new version?

I see geometry and sub geometry and what seems to be the raw vertice data in the vector. Is there some type of utility to access this?

I’m trying to place images on the points of the sphere.

Any help at all is greatly appreciated.

Thanks

   

Avatar
80prozent, Sr. Member
Posted: 21 October 2011 06:52 PM   Total Posts: 430   [ # 1 ]

hi

the verticles - positions are now stored for each subgeometry in a vector.
the length of this vector is verticles-count * 3, since for each verticles the x-y- and z-value is stored.
if you want to attach something to all verticles of a mesh, you should consider that every verticle could be stored more than one time in this vector, since it could be shared between neighboured triangles or not.
if you need to rotate the objects you want to attach according to the surface they sit on, you will definitly need to look into the vertexnormalData too. it should have the same length as the vertexData Vector, and stores 3 values for each verticle descriping their rotation (normals).

hope that makes sense

80

 Signature 

sorry…i hope my actionscript is better than my english…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X