add vertices to mesh dynamically ?

Software: Away3D 4.x

Avatar
Choons, Sr. Member
Posted: 11 June 2011 11:29 PM   Total Posts: 281

Broomstick question:

Hi - been messing around with the Elevation class and subgeometry in general. I have a pretty good grasp on how to build a mesh by passing in a group of points. I’m wondering if it’s possible to then dynamically add vertices to the edge of an existing mesh? Seems like all the methods I’ve seen invalidate the geometry and then rebuild whole thing from scratch when you want modify it.

   

Avatar
Fabrice Closier, Administrator
Posted: 14 June 2011 08:21 AM   Total Posts: 1265   [ # 1 ]

You can do this now, using the delaunayMesh class.
But even if DelaunayMesh—> Merge—> remap would work, its not perse the right thing to do in your case, as the main mesh will only keep growing. You’d better define a grid, and each vertices that are not in visible range should be pushed into visible cell of this grid. This way endless mesh, no extra data. You could of course during this offsetting, add some y offsets from a map if you want mountainious and non repetitive landscapes.

   

Avatar
Choons, Sr. Member
Posted: 14 June 2011 09:18 AM   Total Posts: 281   [ # 2 ]

yeah thanks, Fabrice. I realized right after I posted that the Delaunay class was the way to do it. Had a look at it and that’s a nice bit of coding ; )

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X