Re: [osg-users] Track map on a 3D view
Hi All, I'm sorry but there are several details related to this task. One more problem. Just to summarize the code status. I implemented a track view object as a view of a composite viewer. I set an osg::PositionAttitudeTransform node as scene data of the view. I then read an obj of thetrack and add as child of the position attutude transform. I update the viewport of the camera view to have width and height proportional to the track bounding box. Finally in some way I cal setViewMatrixAsLookAt() from the view camera to fit the track. Now, the problem. If I resize the window vertically I see the track resizing, while if I resize the window horizontally the track is not resized so thet it is cut (left/right) at a certain point. It seems the viewport is resized correctly. Any idea? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57090#57090 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Trajce Nikolov NICK wrote: > > since you dont need manipulator for the map view you can only set the > viewmatrix. Something like > > view->getCamera()->setViewMatrixAsLookAt() and you make a top down view > Thanks Nick, but I think I have to copy/paste part of the CameraManipulator::computeHomePosition(const osg::Camera *camera, bool useBoundingBox) code then, at least to calculate eye and center in the correct way. It would have been nice to have that code available without a manipulator. Anyway I solved that problem, thanks again. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57080#57080 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, since you dont need manipulator for the map view you can only set the viewmatrix. Something like view->getCamera()->setViewMatrixAsLookAt() and you make a top down view Nick On Mon, Nov 4, 2013 at 3:24 PM, Gianni Ambrosio wrote: > Hi All, > to disable mouse intaraction I used: > > view->getCamera()->setAllowEventFocus(false); > > Does it make sense? Is there a better way? > > In case this another option I have to set manually in my track map object > copy constructor since a clone method is not available for a view. > > Moreover, I set a camera manipulator to the track map view just to call > home() method to fit the track. In fact the home() implementation works > only if a manipulator is set. Since I really don't need a manipulator fot > that view, what should I do get the same behavior without a manipulator? > > Regards, > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=57061#57061 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi All, to disable mouse intaraction I used: view->getCamera()->setAllowEventFocus(false); Does it make sense? Is there a better way? In case this another option I have to set manually in my track map object copy constructor since a clone method is not available for a view. Moreover, I set a camera manipulator to the track map view just to call home() method to fit the track. In fact the home() implementation works only if a manipulator is set. Since I really don't need a manipulator fot that view, what should I do get the same behavior without a manipulator? Regards, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57061#57061 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Trajce Nikolov NICK wrote: > Hi Gianni, > so as I understand you you have one scene but you want to have a different > representationsof the objects from the main scene into the map scene. Yes Nick, that's correct. Thanks for the suggested implementation. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57005#57005 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, so as I understand you you have one scene but you want to have a different representationsof the objects from the main scene into the map scene. I would do it with updateCallback. Let say you have a car that MatrixTransfrom is moving in the main scene. And you want icon in the map scene but following an object from the main scene. So let say: main view: MatrixTransform * mainSceneObject = map view: MatrixTransofrm* mapSceneObject (this one with scale but following an object from the main scene). you do updateCallback on the mapSceneObject where you simply copy the matrix from the main scene for translation and use a scale, like class FollowNodeFromMainSceneNodeCallback : public osg::NodeCallback { public: FollowNodeFromMainSceneNodeCallback(osg::MatrixTransform* mxt) : _mainSceneObject(mxt) {} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::MatrixTransform* mapSceneObject = dynamic_cast(node); mapSceneObject->setMatrix(osg::Matrix::scale(x,y,z)*_mainSceneObject->getMatrix().getTrans()); } protected: osg::MatrixTransform* _mainSceneObject; }; and you do then mapSceneObject->setUpdateCallback( new FollowNodeFromMainSceneNodeCallback(mainSceneObject); this way you have two MatrixTransoform for the same object across the scenes, one following the other plus scale. On Wed, Oct 30, 2013 at 10:36 AM, Gianni Ambrosio wrote: > Hi Nick, > I'm not sure the point is the type of node used. I try to explain in > detail. > > Basically I would like to use the same sub-scene that represents my moving > object both on the main 3D view and on the track map. > > A moving object is insert in the scene of the main view. It can be scaled > and its transformation matrix changes during animation. The transformation > is a PositionAttitudeTransform but a MatrixTransform should work the same. > The problem is now related to the fact I would like to add the root node of > the sub-scene also to the root node of the track map view. That is useful > since updated transformations for the moving objects are automatically > reflected on the track map. That means the moving object moves correctly on > the track. But the track map view is much smaller than the main view. So > that, if the track graphics is fine, the moving objects on the track are > too small to be seen. So I need to scale the moving object on the track map > view, but without changing the scale on the 3D main view nor on the > transformation that must move correctly also on the track map view. > > Regards > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=57003#57003 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Nick, I'm not sure the point is the type of node used. I try to explain in detail. Basically I would like to use the same sub-scene that represents my moving object both on the main 3D view and on the track map. A moving object is insert in the scene of the main view. It can be scaled and its transformation matrix changes during animation. The transformation is a PositionAttitudeTransform but a MatrixTransform should work the same. The problem is now related to the fact I would like to add the root node of the sub-scene also to the root node of the track map view. That is useful since updated transformations for the moving objects are automatically reflected on the track map. That means the moving object moves correctly on the track. But the track map view is much smaller than the main view. So that, if the track graphics is fine, the moving objects on the track are too small to be seen. So I need to scale the moving object on the track map view, but without changing the scale on the 3D main view nor on the transformation that must move correctly also on the track map view. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57003#57003 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, I never used PositionAttitudeTransform. Try MatrixTransform instead. You can combine different transformation in the final Matrix. Something like: osg::MatrixTransform* mxt = new osg::MatrixTransform; mxt->setMatrix(osg::Matrix::scale(x,y,z)*osg::Matrix::translate(x,y,z)) Nick On Tue, Oct 29, 2013 at 3:50 PM, Gianni Ambrosio wrote: > Here I am again ... > > Every moving object is something like this: > > osg::PositionAttitudeTransform (for trasnformations wrt global) > osg::PositionAttitudeTransform (for scaling underlying graphics, not > transformations) > osg::Group (that contains real graphics) > > As suggested, the track map is basically an osgViewer::View with a > osg::PositionAttitudeTransform as scene data. As child of that > PositionAttitudeTransform I add a node with the track graphics and the > PositionAttitudeTransform (i.e. transfirmation node) of each moving object. > In this way I can see objects moving correctly on the track but they are > too small to be seen. Adding a PositionAttitudeTransform for scaling each > moving object does not work since also the PositionAttitudeTransform (i.e. > transformation node) is scaled accordingly. > > Now, is there a way (and does it make sense) to apply a scale for each > moving object only in the track map view so that transformations are > preserved? > Would it be a better solution to add a sphere with proper radius for each > moving object so that it can be rendered just in the track map view? > > Thanks for help > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56997#56997 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Here I am again ... Every moving object is something like this: osg::PositionAttitudeTransform (for trasnformations wrt global) osg::PositionAttitudeTransform (for scaling underlying graphics, not transformations) osg::Group (that contains real graphics) As suggested, the track map is basically an osgViewer::View with a osg::PositionAttitudeTransform as scene data. As child of that PositionAttitudeTransform I add a node with the track graphics and the PositionAttitudeTransform (i.e. transfirmation node) of each moving object. In this way I can see objects moving correctly on the track but they are too small to be seen. Adding a PositionAttitudeTransform for scaling each moving object does not work since also the PositionAttitudeTransform (i.e. transformation node) is scaled accordingly. Now, is there a way (and does it make sense) to apply a scale for each moving object only in the track map view so that transformations are preserved? Would it be a better solution to add a sphere with proper radius for each moving object so that it can be rendered just in the track map view? Thanks for help Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56997#56997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, On 25 October 2013 14:34, Gianni Ambrosio wrote: > Hi All, > just a couple of questions. > > I would like drag the view just like I can do with osgWidgets. > > At the moment I used an OrbitManipulator for each view but I really don't > need a manipulator for that view. But vithout a manipulator I can't see > anything. > I haven't heard of users wanting to drag a view before, but I would have thought it would be be possible my adjusting the View's Camera's Viewport in response to the mouse drag events. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi All, just a couple of questions. I would like drag the view just like I can do with osgWidgets. At the moment I used an OrbitManipulator for each view but I really don't need a manipulator for that view. But vithout a manipulator I can't see anything. Thanks for your help, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56976#56976 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Trajce Nikolov NICK wrote: > Hi Gianni, > > what do you mean by cloning a View? Clone the View structure or clone what is > in it displayed? If later you just share the scene across multiple views, put > the same node in setSceneData() > Hi Nick, I mean the view structure, since the manipulator of a view created by copy constructor is NULL. About the scene it seems correct to leave the choice of using the same scene root or something else. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56973#56973 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Moreover, which is the real effect of using "osg::CopyOp::DEEP_COPY_ALL" operation in osgViewer::View copy constructor? Regards, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56971#56971 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, what do you mean by cloning a View? Clone the View structure or clone what is in it displayed? If later you just share the scene across multiple views, put the same node in setSceneData() Nick On Fri, Oct 25, 2013 at 10:08 AM, Gianni Ambrosio wrote: > Hi, > since my track objcts are now osgViewer::View, what should I do to clone a > View? I didn't found a clone method so I used the copy constructor but in > this way the camera manipulator is not copied. A camera manipulator itself > doesn't have a clone method and since a view can have a camera manipulator > of any type I can't clone it exactly. > > Any idea? > > Regards > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56970#56970 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi, since my track objcts are now osgViewer::View, what should I do to clone a View? I didn't found a clone method so I used the copy constructor but in this way the camera manipulator is not copied. A camera manipulator itself doesn't have a clone method and since a view can have a camera manipulator of any type I can't clone it exactly. Any idea? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56970#56970 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
robertosfield wrote: > > Another alternative would be to not use CompositeViewer but instead place the > osg::Camera for each 2D track into the main scene graph. The osghud example > shows how to do this with an in scene graph osg::Camera as well as the more > conventional and recommend routes of placing the HUD as a slave Camera or > separate View. > OK, in fact I was trying to implement it this way. robertosfield wrote: > > The advantage of the CompositeViewer with separate Views is each View can > have it's won event handles and camera manipulator, so allows for unique > behaviours in convenient form. Conceptually it also easy to get your head > around. > Thanks for explaining the benefits of your suggested solution. I will try this also. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56876#56876 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
HI Gianni, On 18 October 2013 11:50, Gianni Ambrosio wrote: > If I undarstand correctly, then I have to create a composite viewer with a > proper view for a 2D track even if the user may not need it (i.e. 2D track > object not loaded). That would not be a real problem. > But on the other hand a user can load more then one 2D track object (even > if in this case it would not have really sense). Of course a new view can > be added for each 2D track object but that means my scene manager should > depend on the viewer (at the moment this dependency is not needed). > I would certainly code the application so the adding/removing of the 2D tracks would be done at a high level that knows about the CompositeVewer and can add/remove/recyle the required View. If you wanted the add code to not know about the viewer then I guess you could use a singleton method for accessing the current viewer, or pass the viewer pointer to add methods. Another alternative would be to not use CompositeViewer but instead place the osg::Camera for each 2D track into the main scene graph. The osghud example shows how to do this with an in scene graph osg::Camera as well as the more conventional and recommend routes of placing the HUD as a slave Camera or separate View. The advantage of the CompositeViewer with separate Views is each View can have it's won event handles and camera manipulator, so allows for unique behaviours in convenient form. Conceptually it also easy to get your head around. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Thank you again Robert! If I undarstand correctly, then I have to create a composite viewer with a proper view for a 2D track even if the user may not need it (i.e. 2D track object not loaded). That would not be a real problem. But on the other hand a user can load more then one 2D track object (even if in this case it would not have really sense). Of course a new view can be added for each 2D track object but that means my scene manager should depend on the viewer (at the moment this dependency is not needed). Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56862#56862 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, On 18 October 2013 10:34, Gianni Ambrosio wrote: > Hi Robert, > there's just one thing I don't like of this approach: the viewer is the > driver. In my application I have one scene and I attach the root node to > the viewer at startup. Then every model (xml) I load builds its own osg > sub-graph and is attached to the scene. So that code doesn't need to know > anything of the viewer. > There is no reason why you couldn't do this with a CompositeViewer. If you wanted just a single scene graph then the NodeMask/TraversalMask combination can be used to make sure each view gets to see what parts of the scene graph are of interest to it. See the osgstereoimage example for an illustration of using node masks/traversal masks (just change the traversal masks to CullMask for your purposes.) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Robert, there's just one thing I don't like of this approach: the viewer is the driver. In my application I have one scene and I attach the root node to the viewer at startup. Then every model (xml) I load builds its own osg sub-graph and is attached to the scene. So that code doesn't need to know anything of the viewer. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56857#56857 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, On 18 October 2013 08:44, Gianni Ambrosio wrote: > Thanks Robert. How could I overlap the two views? Looking at > osgcompositeviewer example it seems they can overlay but one rectangle > hides others while I need the 2D teack background to be transparent. > Simply set the ClearMask on the Camera that overlays to just clear the depth buffer. See the osghud example for guidance on this. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Thanks Robert. How could I overlap the two views? Looking at osgcompositeviewer example it seems they can overlay but one rectangle hides others while I need the 2D teack background to be transparent. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56846#56846 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, A CompositeViewer with two View's, potentially sharing the same window so that one view overlays the other like a HUD is the way I would tackle the tasks. The View's could share the same scene graph, or have their own scene graph. If you wanted to share the scene graph but view different parts of it the way to do it is use a NodeMask and Camera::CullMask combination to insure the each view traverses only the intended parts of the scene graph for that view. Robert. On 16 October 2013 14:35, Gianni Ambrosio wrote: > Thanks Nick, > I already implemented a HUD for 3D axes but whithout resizing and > dragging. Anyway thanks again for the hint. > > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56807#56807 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Thanks Nick, I already implemented a HUD for 3D axes but whithout resizing and dragging. Anyway thanks again for the hint. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56807#56807 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
You can use HUD for this. It will work better with resizing then the comosite viewer with views. In any case you will have a separate osg::Camera that for the HUD case will render to texture and apply to osg::Geometry. This is very simple task. Have a look at the hud sample, osgprerender for render to texture. If got stuck I can help you with some code Nick On Wed, Oct 16, 2013 at 4:06 PM, Gianni Ambrosio wrote: > Thanks Jordi and Nick for the replay. > I thought of a HUD but I didn't investigate if a hud can be dragged or > resized. If so then that's will be fine. > > I'm attaching an image to show what I need. Just consider that the 2D > track and 3D scene can be overlapped. > > Hope this is clearer. > > Regards > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56805#56805 > > > > > Attachments: > http://forum.openscenegraph.org//files/example_467.png > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Thanks Jordi and Nick for the replay. I thought of a HUD but I didn't investigate if a hud can be dragged or resized. If so then that's will be fine. I'm attaching an image to show what I need. Just consider that the 2D track and 3D scene can be overlapped. Hope this is clearer. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56805#56805 Attachments: http://forum.openscenegraph.org//files/example_467.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
I have solved this in the past with composite viewer. It's up to you what you put in your views, like, the 2D view can have ortho and rendering totaly different stuff then the 3D rendering complex graphics. Maybe try what Jordi suggested with hud display Nick On Wed, Oct 16, 2013 at 2:48 PM, Gianni Ambrosio wrote: > > Trajce Nikolov NICK wrote: > > Hi Gianni, > > > > have a look at osgcompositeviewer example. You can add another view in > the corner (no need of osgWidget::Window). There is a class > osgViewer::CompositeViewer and osgViewer::View. The example demonstrated > how to have multiple views each with separate renderings. > > > > Hi Nick, > I'm not sure the composite viewer is what I need. > I would like something that the user can move around. More over the scene > is not the same: I have a real and complex road graphics shown in the 3d > viewer, while the 2D track should show just the centerline of the road (so > a different graphic). > > Regards > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56801#56801 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, I'm not sure I've understood you fully, but maybe a HUD is enough to suit your needs. Take a look to osgHUD example. Cheers. 2013/10/16 Gianni Ambrosio > > Trajce Nikolov NICK wrote: > > Hi Gianni, > > > > have a look at osgcompositeviewer example. You can add another view in > the corner (no need of osgWidget::Window). There is a class > osgViewer::CompositeViewer and osgViewer::View. The example demonstrated > how to have multiple views each with separate renderings. > > > > Hi Nick, > I'm not sure the composite viewer is what I need. > I would like something that the user can move around. More over the scene > is not the same: I have a real and complex road graphics shown in the 3d > viewer, while the 2D track should show just the centerline of the road (so > a different graphic). > > Regards > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56801#56801 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Trajce Nikolov NICK wrote: > Hi Gianni, > > have a look at osgcompositeviewer example. You can add another view in the > corner (no need of osgWidget::Window). There is a class > osgViewer::CompositeViewer and osgViewer::View. The example demonstrated how > to have multiple views each with separate renderings. > Hi Nick, I'm not sure the composite viewer is what I need. I would like something that the user can move around. More over the scene is not the same: I have a real and complex road graphics shown in the 3d viewer, while the 2D track should show just the centerline of the road (so a different graphic). Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56801#56801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Track map on a 3D view
Hi Gianni, have a look at osgcompositeviewer example. You can add another view in the corner (no need of osgWidget::Window). There is a class osgViewer::CompositeViewer and osgViewer::View. The example demonstrated how to have multiple views each with separate renderings. Nick On Tue, Oct 15, 2013 at 2:56 PM, Gianni Ambrosio wrote: > Hi All, > I have a scene with moving objects (basically cars) in a 3D view and a > fixed object (i.e. the track). Now I need to show a simplified track (just > the centerline of the track, coming from a separate graphic file, if > needed) in one corner of the 3D viewer with runnig cars as simple colored > points. > > I thought of an object derived from osgWidget::Window, or simply a Camera, > or both? Anything else is more appropriated? > > Thank you! > > Regads, > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56786#56786 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org