I have embedded some static objects into the terrain (such as rocks for example). When I load the terrain in, I want to be able to access the mesh data for the terrain including the embedded objects.
I have some code like this that runs through the active world areas (I'm loading the world using WORLD_FULL and only have 4 areas).
Code:
for(int x=0; x>-2; --x)
for(int z=0; z>-2; --z)
{
Grid<Game::Area> *g = Game::World.areaActive(VecI2(x,z));
MeshGroup &mg = g->data->data()->mshg();
}
This lets me access the mesh data for each area so that I can perform some additional processing and terrain analysis. The MeshGroup for each area contains several LOD levels, each with one mesh part for the terrain in that area. There is nothing in there for the meshes of the embedded objects.
I can't access the static objects from the object container, i.e. setObjType(Statics,OBJ_STATIC), because the objects are embedded into the terrain. So they don't load into the object containers. The objects aren't in g->data->objs() either as they are embedded into the terrain.
Where is the mesh data for these objects stored and how do I access it? I don't want to modify them, just read the mesh data.