Added Camera::s/getAllowsEventFocus() method to allow osgViewer to have non interfactive cameras such as RTT ones
This commit is contained in:
@@ -64,6 +64,13 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
|
||||
const osg::Stats* getStats() const { return _stats.get(); }
|
||||
|
||||
|
||||
/** Set whether this camera allows events to be generated by the associated graphics window to be associated with this camera.*/
|
||||
void setAllowEventFocus(bool focus) { _allowEventFocus = focus; }
|
||||
|
||||
/** Get whether this camera allows events to be generated by the associated graphics window to be associated with this camera.*/
|
||||
bool getAllowEventFocus() const { return _allowEventFocus; }
|
||||
|
||||
|
||||
/** Sets the clear color. */
|
||||
inline void setClearColor(const Vec4& color) { _clearColor = color; }
|
||||
|
||||
@@ -401,6 +408,8 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
|
||||
View* _view;
|
||||
|
||||
osg::ref_ptr<osg::Stats> _stats;
|
||||
|
||||
bool _allowEventFocus;
|
||||
|
||||
Vec4 _clearColor;
|
||||
GLbitfield _clearMask;
|
||||
|
||||
@@ -17,6 +17,7 @@ using namespace osg;
|
||||
|
||||
Camera::Camera():
|
||||
_view(0),
|
||||
_allowEventFocus(true),
|
||||
_clearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f)),
|
||||
_clearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT),
|
||||
_transformOrder(PRE_MULTIPLY),
|
||||
@@ -34,6 +35,7 @@ Camera::Camera(const Camera& camera,const CopyOp& copyop):
|
||||
Transform(camera,copyop),
|
||||
CullSettings(camera),
|
||||
_view(camera._view),
|
||||
_allowEventFocus(camera._allowEventFocus),
|
||||
_clearColor(camera._clearColor),
|
||||
_clearMask(camera._clearMask),
|
||||
_colorMask(camera._colorMask),
|
||||
|
||||
Reference in New Issue
Block a user