Hi Allen,

I have a terrain manipulator I hope to release soon (which is ill-defined for where I work). For inspiration you can also look at the earth manipulator in osgEarth.

jp

Allen Saucier wrote:
Aaaah, that explains some of what I'm seeing.  Hum...  Using the 
TerrianManipulator is different from the trackball manipulator but the idea is 
the same: setByMatrix I have been assuming to capture the entire state of the 
manipulator and to properly situate my camera exactly where I want and at the 
rotation I want.

Guy, I am trying to rotate the camera 90 degrees with respect to a local 
coordinate frame.  The local coordinate frame is actually @ the edge of the 
earth (a sphere or ellipsoid) so the camera must be orientated on the terrain 
at a 90 degree angle to it.

Thank you both for your response.  I appreciate the help!



J.P. Delport wrote:
Hi Allen,

the problem with setMatrix is that it cannot fully encapsulate the state of the manipulator. Internally the manipulator (trackball) uses a distance, rotation and center, but all these variables do not fit into a matrix. The manipulator can calc a matrix from the internal variables, but not set them properly from an input matrix. E.g. the view might look OK, but the rotation point is somewhere weird.

Some pointers to the past:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/8588/focus=8612
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/19271/focus=19873

jp


Allen Saucier wrote:

Hi,

thanks JP! :)  I really appreciate your response.  It appears I am fighting 
something I didn't expect and something I don't fully understand: the terrain 
manipulator.

I understand what you've proposed but when I call the fucntion: setByMatrix() 
w/in the terrain manipulator, that function appears to be doing something to 
the matrix I send in that I am not expecting.

What you've proposed is pretty much what I do except that I'm using quaternions 
and then converting those quats into matrices.

So I can move the cam and I can even rotate it on the "Z" axis which is the position 
vector coming from the ECEF origin to the point on the terrain I'm working with and the cam is 
looking directly down that "Z" axis (local z-axis).

It's just when I do a 90 degree rotation about the local x or y axis I get 
something totally screwed up and I don't know why but I think the mystery is 
w/in the terrain manipulator which I've not investigated more thoroughly as yet.

I am hoping someone who has in depth knowledge about the terrain manipulator will 
see this post & buzz me back on it.  I have very limited understanding of the 
manipulator code w/in OSG as I'm still a novice w/ OSG so I get all mixed up when I 
delve into any of the manipulator classes: trackball, nodetracker and now terrain.

thanks though!

Thank you!

Cheers,
Allen

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





_______________________________________________
osg-users mailing list

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

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 ------------------
Post generated by Mail2Forum


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





_______________________________________________
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

Reply via email to