Hi,
I have problems with this topic.
I get my View Matrix by viewer-getCamera()-getViewMatrix() and apply a
rotation by preMult, but the camera rotates using the center of the world scene
as reference, not its own center.
How I can do this?
...
Thank you!
Cheers,
Rômulo
--
Hi Dženan,
I don't know if it is still of interest for you. If not, maybe someone else
can profit. Here is my solution for turning the camera arround the scene:
osg::Vec3 achse;
osg::Matrix rotation_matrix(view-trackball-getRotation());
if (orientation == Horizontal) {
Hi,
Thanks for suggestion. I played with it a bit, but with no success. Anyway, I
have debugged the code this procedure was supposed to test, so no need to spend
more time on it.
Cheers,
Dženan
--
Read this topic online here:
Hi,
Thanks for sharing, but I did not modify the frame loop of the viewer, and the
following code in Qt on-click event handler does not produce rotation:
Code:
mainForm.vis-setSceneData(my_object);
osg::Vec3 achse(0.1, 0.2, 0.974);
osg::Matrixd myRotationMatrix;
Hi Dženan,
my issue is to rotate the scene by wheels under and beside the window.
Unfortunately this is very essential for my application and I didn't manage it
so far.
But turning (somehow) in general works here.
My solution has 2 differences to what you wrote:
1) I don't set the scene in the
Hi,
I can tell you immediately that I gave up on this :D
Cheers,
Dženan
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31152#31152
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi Dženan,
On 30/08/10 20:35 , Dženan Zuki wrote:
mainForm.vis-setSceneData(my_object);
osg::Vec3 achse(0.1, 0.2, 0.974);
osg::Matrixd myRotationMatrix;
myRotationMatrix.makeRotate(osg::DegreesToRadians(2.0f), achse);
Hi Dženan,
Actually I have the same intention as you. My approach was like that:
osg::Vec3 achse;
if (orientation == Qt::Horizontal) {
achse = osg::Vec3(0.0, 0.0, 1.0);
} else {
achse = osg::Vec3(1.0, 0.0, 0.0);
}
osg::Matrixd myRotationMatrix;
Hi,
Is there a simple way to programmatically set rotation of a model in osgViewer?
[code]myViewer-setSceneData(fancyObject);
myViewer-run();[/code]
After this code, the object is displayed statically in the window. To get it to
rotate, the user must click and pull the object in the desired
Something quick and easy would be to calculate a new position for your camera
on each frame and set the view matrix as part of a frame() loop.
while(!myViewer-done())
{
myViewer-getCamera()-setViewMatrix(whatever it should be this frame);
myViewer-frame();
}
Cheers,
Tom
--
Read
Hi,
Well I was sort of hoping I could get away without constructing camera matrix,
as it involves a bit of computation.
If there is no quick and easy way to do it, I will just have to skip it (it is
not that important for my project, as it is for debugging purposes).
Thank you!
Cheers,
Thanks for your reply!
Now that I have a code that will allow me to move how can I use it inside the
osgviewer.cpp?
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16878#16878
___
osg-users mailing
Hi,
I am trying to move the camera using the osgviewer. The user robertosfield
already gave me the tipo to change the CameraManipulator, but I am still trying
to figure out how to do that, is there any tutorial or example that I can see
to help me? Where (among the source files) can I find
Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alex
Malhao
Sent: Friday, August 28, 2009 10:28 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Rotate camera
Hi,
I am trying to move the camera using
, 2009 10:28 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Rotate camera
Hi,
I am trying to move the camera using the osgviewer. The user
robertosfield already gave me the tipo to change the CameraManipulator,
but I am still trying to figure out how to do that, is there any
15 matches
Mail list logo