Hi,

Peter DeSantis wrote:
> Hi
>  
> thanks for that i got that to work,
> but i dont understand why the bellow option where i adjust the viewer 
> camera directly does not work as well ?
 > It only seems to work if i set them as nodes and add as childs. Why is
 > that ?
 >
 > It seems to me to be doing the same thing

The problem is that your settings get overwritten by die camera 
manipulator of the viewer itself.

viewer.run() does a lot of things automatically, including setting the 
camera matrix.

This message explains it quite well:
http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/16143/match=setViewMatrix

Have a search around for setViewMatrix, there might be other examples in 
the list archives as well.

>  
> In addition i assume
>  
> 1. using the ABSOLUTE_RF option sets the view matrix to the default 
> opengl (is that right ??) is it the same as the default opengl 
> glLoadidentity for a different axis alignment
Yes, I prefer to do 2D things in the default OpenGL coords as well, 
x-right, y-up, zero at bottom left.


>  
> 2.  then i would have to use osg:Matrix rot;
>                                            
> rot.makeRotate(90,osg::Vec3(1,0,0)); 
> to rotate the matrix so that i have a +x(right), +Y (up) axis 
> alignement.               

As long as your geometry and camera is in the same coords, you won't 
need rotations. If you use the osggeometry examples (drawn in x-z) with 
a camera looking along z-axis you would have to rotate to get them in x-y.

jp


-- 
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
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to