www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: Crate on March 08, 2006, 07:21:20 pm
-
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!
-
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... :?
-
thx for the quick answer. So my solution above would do it,
clear the object, re-add the triangles, call .rebuild() ?
-
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:
-
thx!! ;) I'll try it and report back...