Original Post
Hi, I was wondering if any of you could just give me some suggestions on how to do this. Any help is appreciated! I want to do something similar to the Direct3DLight system. I want to have a unique ID for different types of terrains. For instance, terrain 1 could be a 3D Brute Force mesh terrain while terrain 2 could be a isometric terrain, both could be loaded and ready to go, but I would only enable and draw one at a time. So, my question is about the approach in storing the terrain data. I have a List template that will store items by name and return an index for the item. So, if you create a mesh, give it a name, it is stored by name and returns index 1 let's say. I want to use that approach with the terrains, but each terrain class will be very different. Should I do like Microsoft and pass in a data structure that contains all of the needed data along with the terrain type? I thought about using object inheritance, but none of the terrain types will have the same generation function or anything else for that matter. Is there a way to do that cleanly while still keeping my List object that assigns a unique ID to each terrain generated, no matter what type it is? Thanks! Chris