Author Topic: 3D Objects & IDs  (Read 4887 times)

Offline Tornado7

  • byte
  • *
  • Posts: 45
    • View Profile
3D Objects & IDs
« on: June 28, 2004, 11:17:50 am »
Hi Egon,

I'm here again... I'd ask you in which way, if it's possible, I can express a 3D Object using is ID instead of is name; i.e.:

something like Object3D(ID).animate instead of animateMe.animate

It's possible to force a 3D Object to get a specific id (I've just find out a method to set the id of the next obj)?

Bye and thanks

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12298
    • View Profile
    • http://www.jpct.net
3D Objects & IDs
« Reply #1 on: June 28, 2004, 04:48:30 pm »
You can use getObject() or getObjectByID() from World. But i don't think that this is a very smart idea in most cases, because it requires some lookups for the object which will cost some time. It's maybe neglectable though.
You can set the name of an object to whatever you want as long as it's unique. You can't really set the ID. The getNextID() and setNextID()-methods are for serialization of Object3Ds only. They are not meant to be used for anything else.

Offline Tornado7

  • byte
  • *
  • Posts: 45
    • View Profile
3D Objects & IDs
« Reply #2 on: June 29, 2004, 02:08:20 pm »
Ok Egon, thanx :)