Moved the managing of frame stamp from osgProducer::Viewer into
osgProducer::OsgCamaraGroup. Added setting of trackball in osgcameragroup so its starts in the correct place for different models.
This commit is contained in:
@@ -152,6 +152,8 @@ class OSGPRODUCER_EXPORT OsgCameraGroup : public Producer::CameraGroup
|
||||
const osg::Matrix getViewMatrix() const;
|
||||
|
||||
|
||||
virtual void sync();
|
||||
|
||||
/** Dispatch the cull and draw for each of the Camera's for this frame.*/
|
||||
virtual void frame();
|
||||
|
||||
@@ -180,6 +182,10 @@ class OSGPRODUCER_EXPORT OsgCameraGroup : public Producer::CameraGroup
|
||||
|
||||
osg::ref_ptr<osg::DisplaySettings> _ds;
|
||||
bool _initialized;
|
||||
|
||||
unsigned int _frameNumber;
|
||||
osg::Timer _timer;
|
||||
osg::Timer_t _start_tick;
|
||||
osg::ref_ptr<osg::FrameStamp> _frameStamp;
|
||||
|
||||
void _init();
|
||||
|
||||
@@ -83,8 +83,6 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
|
||||
virtual bool realize();
|
||||
|
||||
virtual void sync();
|
||||
|
||||
virtual void update();
|
||||
|
||||
/** Dispatch the cull and draw for each of the Camera's for this frame.*/
|
||||
@@ -143,10 +141,6 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
|
||||
bool _done;
|
||||
|
||||
unsigned int _frameNumber;
|
||||
osg::Timer _timer;
|
||||
osg::Timer_t _start_tick;
|
||||
|
||||
osgProducer::KeyboardMouseCallback* _kbmcb;
|
||||
|
||||
EventHandlerList _eventHandlerList;
|
||||
|
||||
Reference in New Issue
Block a user