Hi Robert,

    I mentioned before I got much cpu usage on MFC window.  In osgMFC example, 
it uses a thread and for loop to keep calling _osgViewer->frame().  It is a 
reason why the cpu keeps loading and it also depended on how large of volume 
data loaded.  Now I have changed to call frame() on MFC OnPaint event. It can 
decrease much cpu usage.  I also added to call frame() on mouse move, mouse 
wheel and size events for zooming and rotating the image.  But all MFC events 
cannot be fired if the image is rotating by itself.  Thus, I am thinking 
whether osg has an event to detect the image is rotating. 

  I just found a solution to add MFC mouse button up and down to detect whether 
the user wants to rotate the image.  Then I can do it all on MFC event.


Regards,
Clement
________________________________________
From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Monday, 27 February 2012 8:17 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to detect rotating image

Hi Clement,

On 27 February 2012 06:26,  <clement....@csiro.au> wrote:
>   I would like to know how to detect the image is rotating.  For example, we 
> can use the mouse to rotate the image on viewer.  If we drag on the viewer, 
> the image will automatically rotate.  Any event I can get the image is 
> rotating by itself?  Thanks.

It's not possible to know precisely what you mean given the above.
What exactly do you mean by image?  A texture on a quad?  The whole
framebuffer? Are we talking about an object in the scene graph being
rotated by a transform, or simply an object moving because the camera
is moving.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to