Re: [osg-users] CAD style rotation
> > 3 - I haven't implemented the setByMatrix function, because I don't need > it. But this should be done. > Regards, Moji the Great Has this been implemented yet? > But I was wondering if it would be better as an extention to > TrackBallManipulator? The spherical mode is really just a set of constraints > to the regular trackball which you might want to turn on and off. For a CAD > app being able to lock and free individual rotation axes is certainly > useful. > > Martin > Another difference is the TrackBallManipulator rotates around the origin while SphericalManipulator should rotate around the centre of the screen. Richard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
thanks very much - that's just what I was after. Richard On Wed, Apr 22, 2009 at 6:37 PM, Mojtaba Fathi wrote: > > Hi > I have a developed a manipulator like the one you want. It has some extra > code specialized for my needs. Let me clean extra codes and send it to you. > Maybe it can help. > Regards, Moji the Great > > --- On *Wed, 4/22/09, Richard Baron Penman > > >* wrote: > > > From: Richard Baron Penman > > > Subject: [osg-users] CAD style rotation > To: "OpenSceneGraph Users" > Date: Wednesday, April 22, 2009, 11:14 AM > > > hello, > > I am after an osgManipulator with CAD style rotation. > In a typical CAD program the rotation keeps the roll fixed and orbits > around the centre of the screen. > In contrast the TrackballManipulator allows the roll to change and rotates > around the origin. > > Has anyone come across code that implements this type of rotation? > > thanks, > Richard > > -Inline Attachment Follows- > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org<http://mc/compose?to=osg-us...@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 > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
modjtabaf wrote: > > 1 - you have commented the body of zoomOn function, but it's declaration > exits in the class. I was just playing with. ZoomOn is intended to zoom fullscreen on a selected node ? That would be useful. You can submit it by simply posting the files to the submission forum. (zip the header/cpp - the forum has a problem with files without an extention). You will need to clean up a few things - like adding explanation comments for docgen for each function declaration - to get past Robert. But I was wondering if it would be better as an extention to TrackBallManipulator? The spherical mode is really just a set of constraints to the regular trackball which you might want to turn on and off. For a CAD app being able to lock and free individual rotation axes is certainly useful. Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10685#10685 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
Hi all Thanks Martin for his excellent work on SphericalManipulator. I will be so glad if this can be added to the submission list. But there are a few notes and questions: 1 - you have commented the body of zoomOn function, but it's declaration exits in the class. 2 - I think zoomOn function offers a good and useful functionality. Is it necessary to remove it from the manipulator? 3 - I haven't implemented the setByMatrix function, because I don't need it. But this should be done. 4 - There is an small issue in getInverseMatrix and getMatrix functions. Both compute the matrix even if it hasn't changed from the previous step. Maybe it is better to compute it when needed and just return the computed one otherwise. 5 - The member variable named _dragged is not necessary and can be removed. I use it in my specialized version only. Regards, Moji the Great --- On Thu, 4/23/09, Martin Beckett wrote: From: Martin Beckett Subject: Re: [osg-users] CAD style rotation To: osg-users@lists.openscenegraph.org Date: Thursday, April 23, 2009, 12:18 AM It's Moji's code so he should probably be the one to submit it. There seems to be a few functions that aren't necessary (perhaps for some other code) which could be cleaned up. It would be nice if there was a method to set a rotation origin in the model - or is there some general way to do this? Martin ps. There seems to be a lot of cut+paste code between the different manipulators - perhaps somebody who understands them better could look at how much could be moved to MatrixManipulator. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10679#10679 ___ 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
Re: [osg-users] CAD style rotation
It's Moji's code so he should probably be the one to submit it. There seems to be a few functions that aren't necessary (perhaps for some other code) which could be cleaned up. It would be nice if there was a method to set a rotation origin in the model - or is there some general way to do this? Martin ps. There seems to be a lot of cut+paste code between the different manipulators - perhaps somebody who understands them better could look at how much could be moved to MatrixManipulator. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10679#10679 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
Mojtaba and Martin, I like this manipulator and I think it is worthy of inclusion in OSG. Do you plan on submitting it to the submissions list? Cory Martin Beckett wrote: > Should be > bool _horizontalLock; > bool _verticalLock; > at the bottom of the SphericalManipulator definition. > > Sorry - I changed the name in the .h but the zip had the no-h version. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=10676#10676 > > > > > > ___ > 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
Re: [osg-users] CAD style rotation
Should be bool _horizontalLock; bool _verticalLock; at the bottom of the SphericalManipulator definition. Sorry - I changed the name in the .h but the zip had the no-h version. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10676#10676 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
I tried compiling this into the released 2.8 code and it complained about _horizontalLock and _verticalLock not being defined. Which source tree were you compiling against? Cory Martin Beckett wrote: I cleaned up the code a little to fit osg naming. Removed the Visual Studio pre-compiled headers so it will build anywhere Added mouse wheel zoom and the ability to select the mod keys (horizontal and vertical rotate only) programmatically. Can you check out the 'usage' function and note any other features I missed. Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10659#10659 ___ 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
Re: [osg-users] CAD style rotation
Yes, I've done this as well, pretty easy to write, just allows you to position the camera in altitude and azimuth while maintaining an up vector. I'd say it's more common in sim apps than CAD apps, though. I see someone else has posted code for this. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466 _ From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Richard Baron Penman Sent: Wednesday, April 22, 2009 12:44 AM To: OpenSceneGraph Users Subject: [osg-users] CAD style rotation hello, I am after an osgManipulator with CAD style rotation. In a typical CAD program the rotation keeps the roll fixed and orbits around the centre of the screen. In contrast the TrackballManipulator allows the roll to change and rotates around the origin. Has anyone come across code that implements this type of rotation? thanks, Richard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
Hi I have a developed a manipulator like the one you want. It has some extra code specialized for my needs. Let me clean extra codes and send it to you. Maybe it can help. Regards, Moji the Great --- On Wed, 4/22/09, Richard Baron Penman wrote: From: Richard Baron Penman Subject: [osg-users] CAD style rotation To: "OpenSceneGraph Users" Date: Wednesday, April 22, 2009, 11:14 AM hello, I am after an osgManipulator with CAD style rotation. In a typical CAD program the rotation keeps the roll fixed and orbits around the centre of the screen. In contrast the TrackballManipulator allows the roll to change and rotates around the origin. Has anyone come across code that implements this type of rotation? thanks, Richard -Inline Attachment Follows- ___ 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
[osg-users] CAD style rotation
hello, I am after an osgManipulator with CAD style rotation. In a typical CAD program the rotation keeps the roll fixed and orbits around the centre of the screen. In contrast the TrackballManipulator allows the roll to change and rotates around the origin. Has anyone come across code that implements this type of rotation? thanks, Richard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org