Object3D.addTriangle()

Started by Crate, March 08, 2006, 07:21:20 PM

Previous topic - Next topic

Crate

Hi,
short question on addTriangle() - is there any way to remove triangles set using this method? Or is triangle data "lost" when adding triangles?

If I want to support changing Object3Ds on the fly using addTriangle(), would I have to store the triangle data somewhere and, if a triangle gets removed, clear the object, set all triangles and then call rebuild?

Thx!

EgonOlsen

No, there's no way to remove them. That's because objects are being "compiled" to ensure best possible performance. There's no way to "decompile" them... :?

Crate

thx for the quick answer. So my solution above would do it,
clear the object, re-add the triangles, call .rebuild() ?

EgonOlsen

Cooool...one can clear an Object3D. I can't remember when i've added this...:shock:  
So, yes...if it works, that's the solution to your problem. If it doesn't, i will have to check "clearObject()" for bugs... :wink:

Crate

thx!! ;) I'll try it and report back...