Re: [osg-users] Bug in OSG? getMatrix() and setByMatrix() is not enough to transrer camera state

2015-02-05 Thread Robert Osfield
Hi Dan,

It was never my intention that the osgGA::CameraManipualtor would become
THE way to manage cameras in OSG users applications, just a convenient tool
for most OSG examples and basic OSG applications.  They have kinda taken on
a bit of life of their own, beyond what really the merit they have.

So... rather than trying to make a square peg fit a round hole and try to
make the existing CameraManipualators fit your needs I'd suggest you
consider what you needs are for your own application.  How do you want to
manage camera control and interaction?  If the osgGA camera manipulators
don't fit the bill then don't feel uneasy about just rolling your own
camera management to do things exactly how you require of them.

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


Re: [osg-users] Bug in OSG? getMatrix() and setByMatrix() is not enough to transrer camera state

2015-02-05 Thread Dan Shebounin
For now, existing manipulators does fit. Well... almost :)

I have an idea to write my own, but for quick-n-dirty concept existing will be 
ok. 

Cheers,
Dan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62623#62623





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


Re: [osg-users] Bug in OSG? getMatrix() and setByMatrix() is not enough to transrer camera state

2015-02-05 Thread Dan Shebounin
Thanx, Robert!

Get it.

I suppose, the most convenient way then - is to subclass 
KeySwitchMatrixManipulator and override handle() method. My app knows, what 
manipulators will be added to KeySwitcher, and will perform all required 
additional settings during switch.

Cheers,
Dan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62621#62621





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


Re: [osg-users] Bug in OSG? getMatrix() and setByMatrix() is not enough to transrer camera state

2015-02-05 Thread Robert Osfield
Hi Dan,

The getMatrix/setByMatrix methods in the CamaraManipulators might be
convinient and sufficient for switching between some manipulators but there
are too many settings in some of the manipulators to be able to set it
purely from a 4x4 matrix so the manipulator has to make a guess at what
might be intended.  For instance a manipulator that uses a look distance,
centre of rotation and look vector direction isn't able to compute the look
distance from a 4x4 matrix, there simply is too my unknowns for the
constraints available.  So it's not a bug but a mathematical limitation.

Robert.

On 5 February 2015 at 12:00, Dan Shebounin danil.shebou...@gmail.com
wrote:

 I have discovered, that when working with manipulators, it is not enough
 to call getMatrix() and setByMatrix(), when switching between manipulators,
 say, with KeySwitchManipulator.

 You can try it: run osgsimulation example and try to switch between
 manipulators with '1' and '2' keys. The camera become crazy.

 I do not know the source code well, but suppose, that some mean should be
 created, that notifies manipulator, when it is switched in and out.

 Cheers,
 Dan

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=62609#62609





 ___
 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] Bug in OSG? getMatrix() and setByMatrix() is not enough to transrer camera state

2015-02-05 Thread Dan Shebounin
I have discovered, that when working with manipulators, it is not enough to 
call getMatrix() and setByMatrix(), when switching between manipulators, say, 
with KeySwitchManipulator.

You can try it: run osgsimulation example and try to switch between 
manipulators with '1' and '2' keys. The camera become crazy.

I do not know the source code well, but suppose, that some mean should be 
created, that notifies manipulator, when it is switched in and out.

Cheers,
Dan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62609#62609





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