Re: [osg-users] Restoring a Viewer's MatrixManipulator

2009-10-12 Thread J.P. Delport

Hi,

also have a look at these old emails. It is still something I want to 
add to the manipulators to enable smooth switching between them.


Basically, the internal state of the manipulator is not fully encoded in 
the view matrix.


http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/8610

jp

Shiina Ringo wrote:
Hi,Phil 


I just have met the same problem , like the  switching of 2 MatrixManipulators 
, that the home position is not the position which is like the default position.

I just look forward to anyone could give some advice.

Thank you very much!

Cheers,
Shiina

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





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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] Restoring a Viewer's MatrixManipulator

2009-10-10 Thread Robert Osfield
On Sat, Oct 10, 2009 at 2:28 AM, Shiina Ringo osgfo...@tevs.eu wrote:
 Hi,Phil

 I just have met the same problem , like the  switching of 2 
 MatrixManipulators , that the home position is not the position which is like 
 the default position.

 I just look forward to anyone could give some advice.

You guys tried:

viewer.getCameraManipulator()-setHomePosition(..)

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


Re: [osg-users] Restoring a Viewer's MatrixManipulator

2009-10-09 Thread Shiina Ringo
Hi,Phil 

I just have met the same problem , like the  switching of 2 MatrixManipulators 
, that the home position is not the position which is like the default position.

I just look forward to anyone could give some advice.

Thank you very much!

Cheers,
Shiina

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





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


Re: [osg-users] Restoring a Viewer's MatrixManipulator

2009-10-08 Thread Tessier, Philip A (IS)
Greetings, all.

 

I've been a lightweight user of OSG for some time now, and have a fair
understanding on how the basic components fit together.  There's
something I'm missing, though, in my current quest.

 

I'm adding XML persistence to my OSG objects.  In general, I wrap OSG
objects in my own objects, and it's those objects that will be doing the
persisting.  For the most part, all is well.  My Viewer object, though,
is having trouble with restoring its camera.  I've succeeded in
restoring the camera to its home position, but have not been able to
restore its current position (getMatrix(), setByMatrix()).

 

My Viewer object uses either a MatrixManipulator or a Camera, and my XML
implementation persists the values of those correctly.  With respect to
the MatrixManipulator, I'm doing (paraphrased):

 

myViewerObject - its osgViewer -setCameraManipulator(
a restored myMaxtrixManipulator - its osgMatrixManipulator);

// I expect this to do the whole job, but...

 

myMatrixManipulator - its osgMatrixManipulator =
myViewerObject - its osgViewer -getCameraManipulator();

// setCameraManipulator seems to create a copy, and I
want to be wrapping the current one.

 

// Since the above seems to restore just the home
position and not the current, I've tried adding:

Matrixd testMatrix = myViewer - its osgViewer -
getCameraManipulator() -getMatrix(); // testMatrix is correct.

myViewerObject - its osgViewer -getCameraManipulator()
-setByMatrix( testMatrix);

// These last seem redundant (and aren't succeeding),
but I'm trying things where things seem broken.

 

I've disabled all home() calls, and yet, after loading a persisted
MatrixManipulator, I see my scene from the home position, not the saved
position.

 

I imagine I have a flawed mental model of some facet of this.  Can
someone point me in the right direction?

 

Thanks, in advance,

Phil

 

Philip A. Tessier 

 

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


[osg-users] Restoring a Viewer's MatrixManipulator

2009-10-05 Thread Tessier, Philip A (IS)
Greetings, all.

 

I've been a lightweight user of OSG for some time now, and have a fair
understanding on how the basic components fit together.  There's
something I'm missing, though, in my current quest.

 

I'm adding XML persistence to my OSG objects.  In general, I wrap OSG
objects in my own objects, and it's those objects that will be doing the
persisting.  For the most part, all is well.  My Viewer object, though,
is having trouble with restoring its camera.  I've succeeded in
restoring the camera to its home position, but have not been able to
restore its current position (getMatrix(), setByMatrix()).

 

My Viewer object uses either a MatrixManipulator or a Camera, and my XML
implementation persists the values of those correctly.  With respect to
the MatrixManipulator, I'm doing (paraphrased):

 

myViewerObject - its osgViewer -setCameraManipulator(
a restored myMaxtrixManipulator - its osgMatrixManipulator);

// I expect this to do the whole job, but...

 

myMatrixManipulator - its osgMatrixManipulator =
myViewerObject - its osgViewer -getCameraManipulator();

// setCameraManipulator seems to create a copy, and I
want to be wrapping the current one.

 

// Since the above seems to restore just the home
position and not the current, I've tried adding:

Matrixd testMatrix = myViewer - its osgViewer -
getCameraManipulator() -getMatrix(); // testMatrix is correct.

myViewerObject - its osgViewer -getCameraManipulator()
-setByMatrix( testMatrix);

// These last seem redundant (and aren't succeeding),
but I'm trying things where things seem broken.

 

I've disabled all home() calls, and yet, after loading a persisted
MatrixManipulator, I see my scene from the home position, not the saved
position.

 

I imagine I have a flawed mental model of some facet of this.  Can
someone point me in the right direction?

 

Thanks, in advance,

Phil

 

Philip A. Tessier 



 

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