LLViewerRegion* region = gAgent.getRegion(); const LLViewerObjectList& obj_list = region->getObjects(); for (LLViewerObjectList::const_iterator iter = obj_list.begin(); iter != obj_list.end(); iter++) { LLViewerObject* obj = *iter; // do something with obj... }In this example, we first retrieve the current region that the agent is in (i.e. the one that the user's camera is currently located in). We then call `getObjects()` to obtain a list of all the objects in the region. Finally, we loop through this list and do something with each object (in this case, we just print its name). The package library for LLViewerRegion is likely to be part of the Second Life Viewer codebase itself, which is written in C++.