Original Post
Hi, I have a qustion on what is the best way to handle objects in a code point of view.
I have a class called CWorld that I want to use to get access to a list of cameras and objects.
At the beginning, I don''t know how much of these cameras or objects I will have to manage on it and I''d like to dynamically create these things so I can then access them.
I tried to use defined camera and object tables (cameras[MAXCAMERAS] and objects[MAXOBJECTS]) but the way they work, it allocates all table cameras and objects which is a waste of memory and also performance when you try to search one of these objects.
I also tried from the STL (vector mCameras and vector mObjects) but my engine is within a dll which cause too much troubles in order to compile and link it (the STL classes are difficult to export from a dll).
I didn''t try trees because I thought it wouldn''t work correctly with the cameras but I may be wrong.
If anyone could give me some tips, I would appreciate.
thanks,
Amadrias