Added support for an update OperationQueue to Viewer and CompositeViewer to allow asyncrnous adding of operations to be added
to the view to be done during syncronous updateTraversal(). This feature can be used for doing things like merging subgraphs that have been loaded in a background thread.
This commit is contained in:
@@ -97,6 +97,17 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
/** Get the end barrier position.*/
|
||||
BarrierPosition getEndBarrierPosition() const { return _endBarrierPosition; }
|
||||
|
||||
|
||||
|
||||
/** Set the EventVisitor. */
|
||||
void setEventVisitor(osgGA::EventVisitor* eventVisitor) { _eventVisitor = eventVisitor; }
|
||||
|
||||
/** Get the EventVisitor. */
|
||||
osgGA::EventVisitor* getEventVisitor() { return _eventVisitor.get(); }
|
||||
|
||||
/** Get the const EventVisitor. */
|
||||
const osgGA::EventVisitor* getEventVisitor() const { return _eventVisitor.get(); }
|
||||
|
||||
/** Set the key event that the viewer checks on each frame to see if the viewer's done flag should be set to
|
||||
* signal end of viewers main loop.
|
||||
* Default value is Escape (osgGA::GUIEVentAdapter::KEY_Escape).
|
||||
@@ -112,6 +123,36 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
/** @return true if the viewer respond to the QUIT_APPLICATION-event */
|
||||
bool getQuitEventSetsDone() const { return _quitEventSetsDone; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** Set the UpdateVisitor. */
|
||||
void setUpdateVisitor(osgUtil::UpdateVisitor* updateVisitor) { _updateVisitor = updateVisitor; }
|
||||
|
||||
/** Get the UpdateVisitor. */
|
||||
osgUtil::UpdateVisitor* getUpdateVisitor() { return _updateVisitor.get(); }
|
||||
|
||||
/** Get the const UpdateVisitor. */
|
||||
const osgUtil::UpdateVisitor* getUpdateVisitor() const { return _updateVisitor.get(); }
|
||||
|
||||
|
||||
/** Set the Update OperationQueue. */
|
||||
void setUpdateOperations(osg::OperationQueue* operations) { _updateOperations = operations; }
|
||||
|
||||
/** Get the Update OperationQueue. */
|
||||
osg::OperationQueue* getUpdateOperations() { return _updateOperations.get(); }
|
||||
|
||||
/** Get the const Update OperationQueue. */
|
||||
const osg::OperationQueue* getUpdateOperations() const { return _updateOperations.get(); }
|
||||
|
||||
/** Add an update operation.*/
|
||||
void addUpdateOperation(osg::Operation* operation);
|
||||
|
||||
/** Remove an update operation.*/
|
||||
void removeUpdateOperation(osg::Operation* operation);
|
||||
|
||||
|
||||
/** Execute a main frame loop.
|
||||
* Equivialant to while (!viewer.done()) viewer.frame();
|
||||
* Also calls realize() if the viewer is not already realized,
|
||||
|
||||
Reference in New Issue
Block a user