Removing triangle from merged mesh?

Software: Away3D 4.x

gtcanto, Newbie
Posted: 13 October 2011 04:41 PM   Total Posts: 6

I have a merged mesh which I would like to dynamically remove triangles from.  So far I’ve been able to go through the vertexData and set a triangle’s vertices to (0,0,0) to essentially make the triangle disappear.

However, when I try to remove a triangle’s vertices from vertexData and then update the vertexData, it seems to crash.

Is there a way to properly remove a triangle from vertexData?  Or am I taking the complete wrong approach to removing a triangle from a merged mesh?

Many Thanks!

   

Richard Olsson, Administrator
Posted: 13 October 2011 05:25 PM   Total Posts: 1192   [ # 1 ]

If you need to remove a triangle, it’s the index data that you should be modifying. Read the ActionScript documentation on VertexBuffer3D and IndexBuffer3D if you are not sure how to work with vertex and index buffers.

EDIT: It should be noted that you will never have to work with instances of said classes directly if you’re using Away3D, but the AS3 documentation for these classes (and links in that document) should provide you with the basic understanding that you need.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X