1
0
Fork 0

src/Viewer/CameraGroup.*: give const access to 'CameraList _cameras;' member.

E.g. this allows callers to find Compositor(s) owned by CameraGroup.
This commit is contained in:
Julian Smith 2021-10-26 17:22:10 +01:00
parent a77eabb9dc
commit 69344c29c0
2 changed files with 8 additions and 1 deletions

View file

@ -913,6 +913,11 @@ osg::Camera* getGUICamera(CameraGroup* cgroup)
return cgroup->getGUICamera()->compositor->getPass(0)->camera;
}
const CameraGroup::CameraList& CameraGroup::getCameras()
{
return _cameras;
}
static bool
computeCameraIntersection(const CameraGroup *cgroup,
const CameraInfo *cinfo,

View file

@ -206,6 +206,9 @@ public:
CameraInfo *getGUICamera() const;
typedef std::vector<osg::ref_ptr<CameraInfo>> CameraList;
const CameraList& getCameras();
protected:
friend CameraGroupListener;
friend bool computeIntersections(const CameraGroup* cgroup,
@ -214,7 +217,6 @@ protected:
intersections);
friend void reloadCompositors(CameraGroup *cgroup);
typedef std::vector<osg::ref_ptr<CameraInfo>> CameraList;
CameraList _cameras;
osg::ref_ptr<osgViewer::View> _viewer;
static osg::ref_ptr<CameraGroup> _defaultGroup;