Re: [osg-users] problem in camera rotation

2009-09-10 Thread Akilan Thangamani
Hi, yeah. I found my geometry center as ( 0.04,0.075,0.0). So first I do the rotation of 90 degree about z-axis and then translating my geometry to 0 by subtracting the aboive center values. Again I m getting my geometry is translated and half of the geometry is off the view. Have a look at

Re: [osg-users] problem in camera rotation

2009-09-10 Thread Ümit Uzun
Hi Akilan; Matrix multiplaction is not commutative. If you change the order of matrix as a result the accumulated matrix will behave different as you anticipated. So order of matrix multiplexing is Scale, Rotate and lastly Translate. So in multiplexting operation order of them as follows;

Re: [osg-users] problem in camera rotation

2009-09-10 Thread Akilan Thangamani
Hi, I changed the order of matrix manipulations and put everything in a single transformation only. But the result I m getting is same. The geometry is going out of view. I dont understand the problem. Pls anyone correct me. Thank you! Cheers, Akilan -- Read this topic

Re: [osg-users] problem in camera rotation

2009-09-09 Thread J.P. Delport
Hi, Akilan Thangamani wrote: Hi, Yes. I changed the way I was doing. I set geometry under a matrix transform node and trying to rotate the geometry 90 degree over Z-axis. It s getting translated too. I want to know how much unit I have to translate it back and If I want to rotate on

Re: [osg-users] problem in camera rotation

2009-09-08 Thread J.P. Delport
Hi, Akilan Thangamani wrote: Hi, I understand that this problem has already been discussed . But as I was not able to understand clearly I post my simple camera rotation problem., I written a code osg::refosg::Camera g_camera=new osg:::camera;

Re: [osg-users] problem in camera rotation

2009-09-08 Thread Akilan Thangamani
Hi, Actually, I would like to simulate a navigation control for north orientation as available in google earth. I wanted to rotate the control along the X-axis(+/-) that will get reflected on geocentric virtual earth. I set the camera to the geometry(navigation control). What I thought was

Re: [osg-users] problem in camera rotation

2009-09-08 Thread J.P. Delport
Hi, Akilan Thangamani wrote: Hi, Actually, I would like to simulate a navigation control for north orientation as available in google earth. I wanted to rotate the control along the X-axis(+/-) that will get reflected on geocentric virtual earth. I set the camera to the geometry(navigation