From: Ulrich E. <Doo...@kn...> - 2001-03-25 12:58:34
|
> > - the World now stores the Objects and Terrains in a std::list. I'm=20 > > notyet sure what the interface (accessing the objects inside=20 > > the map) will have to look like, it remains unchanged up to now >=20 > GetObject > AddObject > DelObject those are easy and clear .... What if you don't find a certain Object ? Returning a zero pointer or ret= urn=20 an Object whos ID clearly marks it as illegal ? > Surround( Object, Distance ) this slightly less:=20 return a list with pointers to the actual objects or return a list with=20 copies ?=20 Give it an iterator to put the object-pointers to ? Give it an iterator to copy the objects to ? If not copying, how to make sure no one accidentially deletes the objects= ? What about locking issues ? What is more expensive: locking or copying ? The question is rather on what level to achieve what function, I put that= =20 decision back since it currently only involves glue-code.=20 One of my next goals is to give the Terrain the same gfx-interface (using= =20 GFXResume ) as Object, and then merging both in a common base-class. uli |