Author Topic: Object3D.addTriangle()  (Read 2737 times)

Offline Crate

  • byte
  • *
  • Posts: 25
    • View Profile
Object3D.addTriangle()
« 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!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Object3D.addTriangle()
« Reply #1 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... :?

Offline Crate

  • byte
  • *
  • Posts: 25
    • View Profile
Object3D.addTriangle()
« Reply #2 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() ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Object3D.addTriangle()
« Reply #3 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:

Offline Crate

  • byte
  • *
  • Posts: 25
    • View Profile
Object3D.addTriangle()
« Reply #4 on: March 08, 2006, 08:43:36 pm »
thx!! ;) I'll try it and report back...