www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Crate on March 08, 2006, 07:21:20 pm

Title: Object3D.addTriangle()
Post 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!
Title: Object3D.addTriangle()
Post by: EgonOlsen on March 08, 2006, 07:53:51 pm
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... :?
Title: Object3D.addTriangle()
Post by: Crate on March 08, 2006, 08:02:15 pm
thx for the quick answer. So my solution above would do it,
clear the object, re-add the triangles, call .rebuild() ?
Title: Object3D.addTriangle()
Post by: EgonOlsen on March 08, 2006, 08:08:13 pm
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:
Title: Object3D.addTriangle()
Post by: Crate on March 08, 2006, 08:43:36 pm
thx!! ;) I'll try it and report back...