[osg-users] osgManipulator dragger switch
Hi could s.o. give me a short hint how I could attach different draggers to one node and switch between these draggers ? Thanks Dieter Unclassified Mail Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg+QT MODKEY How to
Hi Legeo I had a similar problem - using osg, qt4 and the AdapterWidget example. In AdapterWidget::keypressEvent (...) osgGA::GUIEventAdapter::KeySymbol) * (event-text().toAscii().data() returns 0 in the call _gw-getEventQueue()-keyPress( (... ) ) for keys like: Qt::Key_up ... Have a look at the Qt documentation Qt::Key. I have managed it with: int c = *event-text().toAscii().data(); if ( c == 0) { switch (event-key()) { case Qt::Key_PageDown: _gw-getEventQueue()-keyPress( osgGA::GUIEventAdapter::KeySymbol::KEY_Page_Down ); break; case Qt::Key_PageUp: _gw-getEventQueue()-keyPress( osgGA::GUIEventAdapter::KeySymbol::KEY_Page_Up ); break; case Qt::Key_Up: _gw-getEventQueue()-keyPress( osgGA::GUIEventAdapter::KEY_Up); break; } } else _gw-getEventQueue()-keyPress( (osgGA::GUIEventAdapter::KeySymbol) * (event-text().toAscii().data() ) ); There might be a better solution but it works. Dieter Unclassified Mail -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of legeochen Sent: Saturday, 07 March, 2009 09:14 To: OpenSceneGraph Users Subject: [osg-users] osg+QT MODKEY How to Hi all, I'm trying to add a Modkey event handler to my application with osg and qt4. But it seems that the getModKeyMask() fuction fails to work. Return value of getModKeyMask() always is 0, even if I have a MODKEY pressed. And, this is my code: if ( ea.getEventType() == osgGA::GUIEventAdapter::PUSH ea.getButtonMask() == osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON ea.getModKeyMask() == osgGA::GUIEventAdapter::MODKEY_SHIFT ) { /*- do something here -*/ } How can I handle it? Thanks in advance! cheers legeo Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Troubles building osg_Freetype plugin
Hello Jean-Sebastien when I use your link VisualStudio 7.1 - https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty _win32binaries_vs71/ I find the freetype219.lib, but I thought I need the never version of the freetype (freetype235.lib?) libs. Dieter Unclassified Mail -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of Jean-Sebastien Guay Sent: Monday, 02 March, 2009 18:11 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Troubles building osg_Freetype plugin Hello Ernesto, I have downloaded the 3rdParty dependencies form here (http://www.openscenegraph.org/downloads/dependencies/Windows/VisualStudio7/ 3rdParty_Win32binaries_2005_05_10.zip). That's the old 3rdparty package, which is not useful anymore because we need a newer version of the Freetype lib in particular, which is why you're getting that error. The Dependencies page clearly states where to get the dependencies for VS7.1 (2003): http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies VisualStudio 7.1 - https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty _win32binaries_vs71/ (Note that I removed the Visual Studio 7 item in the list, it was misleading since VS7 is not really supported and it linked to the old dependencies zip from 2005 which will not work as you discovered. The page should now be more accurate.) Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] picking / trackball question - compositeviewer
Robert thanks and sorry for the confusing questions (I have mixed two applications) I try to explain my 2. question again : I use the trackballmanipulator in one view and only picking in another view (topview); but when I switch off the topview (topView-getCamera()-setNodeMask (0x0);), I don't have trackball functionality in the area of this view (upper right part of the window) Dieter -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of Robert Osfield Sent: Friday, 20 February, 2009 11:57 To: OpenSceneGraph Users Subject: Re: [osg-users] picking / trackball question - compositeviewer Hi Dieter, Your use mixing of the use of views and master and slaves is rather confusing. The osgViewer approach is to separate both the implementation and concept of View and Cameras, this is done to keep clear what class does what, and when to use to different configuration. A single View has a master Camera, and a list of zero or more slave Camera. There is no such thing as a master View, or slave View, only master Camera and slave Camera within a single View. A single View is controlled by single CameraManipulator which controls the master Camera, the slave Camera's within this view are then sync'd relative to the master Camera on each frame. An osgViewer::Viewer is a View, so has one master, and the ability to have zero or more slave Camera, and only has a single CameraManipulator. This keeps the Viewer class quite straight forward, yet still have the capability of doing power walls etc. An osgViewer::CompositeViewer has a list of View, each View has it's own master Camera, it's own slaves, it own CameraManipulator. At your end you need to decide what type of viewer configuration you need. If it's just a single conceptual view then use Viewer, even if you require an advanced display configuration as the slave cameras can handle this. If you have multiple conceptual views (i.e. the view that two different viewpoints on the scene or two different scenes) then use CompositeViewer. Robert. On Fri, Feb 20, 2009 at 10:39 AM, Dieter Pfeffer dieter.pfef...@nl.thalesgroup.com wrote: Hi I have 2 questions concerning multiple views with compositeviewer 1. when I have three views (1 master and two slaves) - is it possible to have the Trackballmanipulator over all three views (now I have the trackball only in the master view) ? 2. in another configuration I use the trackballmanipulator in the master view and only picking in a slave view (see the attached image - picking in the top view); but when I switch off the slave view (topview), I don't have trackball functionality in the area of this view (upper right part of the window) Thanks Dieter Unclassified Mail -- -- Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. -- -- ___ 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 Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] picking / trackball question - compositeviewer
Robert I have attached example source code to explain what I mean: in the viewport area of the topview (upper right part of the window) I can't use the trackball. To switch off the topView, should I better use viewer.removeView(topView) instead of topView-setNodeMask (0x0); ? Dieter -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of Dieter Pfeffer Sent: Friday, 20 February, 2009 13:08 To: OpenSceneGraph Users Subject: Re: [osg-users] picking / trackball question - compositeviewer Robert thanks and sorry for the confusing questions (I have mixed two applications) I try to explain my 2. question again : I use the trackballmanipulator in one view and only picking in another view (topview); but when I switch off the topview (topView-getCamera()-setNodeMask (0x0);), I don't have trackball functionality in the area of this view (upper right part of the window) Dieter -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of Robert Osfield Sent: Friday, 20 February, 2009 11:57 To: OpenSceneGraph Users Subject: Re: [osg-users] picking / trackball question - compositeviewer Hi Dieter, Your use mixing of the use of views and master and slaves is rather confusing. The osgViewer approach is to separate both the implementation and concept of View and Cameras, this is done to keep clear what class does what, and when to use to different configuration. A single View has a master Camera, and a list of zero or more slave Camera. There is no such thing as a master View, or slave View, only master Camera and slave Camera within a single View. A single View is controlled by single CameraManipulator which controls the master Camera, the slave Camera's within this view are then sync'd relative to the master Camera on each frame. An osgViewer::Viewer is a View, so has one master, and the ability to have zero or more slave Camera, and only has a single CameraManipulator. This keeps the Viewer class quite straight forward, yet still have the capability of doing power walls etc. An osgViewer::CompositeViewer has a list of View, each View has it's own master Camera, it's own slaves, it own CameraManipulator. At your end you need to decide what type of viewer configuration you need. If it's just a single conceptual view then use Viewer, even if you require an advanced display configuration as the slave cameras can handle this. If you have multiple conceptual views (i.e. the view that two different viewpoints on the scene or two different scenes) then use CompositeViewer. Robert. On Fri, Feb 20, 2009 at 10:39 AM, Dieter Pfeffer dieter.pfef...@nl.thalesgroup.com wrote: Hi I have 2 questions concerning multiple views with compositeviewer 1. when I have three views (1 master and two slaves) - is it possible to have the Trackballmanipulator over all three views (now I have the trackball only in the master view) ? 2. in another configuration I use the trackballmanipulator in the master view and only picking in a slave view (see the attached image - picking in the top view); but when I switch off the slave view (topview), I don't have trackball functionality in the area of this view (upper right part of the window) Thanks Dieter Unclassified Mail -- -- Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. -- -- ___ 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 Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578
[osg-users] multi view stereo cameras
Hi I have a running OpenGL example to define several views for a 3d-display; I would like to transfer it to my osg-application. Therefore I have managed the views similar to setUpViewFor3DSphericalDisplay and setUpViewForWoWVxDisplay. However I can't figure out how to set the projectionOffset and viewOffset in addSlave (I have read all mails concerning addSlave, but I haven't found a solution). The OpenGL code: glMatrixMode (GL_PROJECTION) glLoadIdentity() glFrustum(...) glTranslated() // concerning the left and right cameras Could s.o. give me a hint how to transfer this to the addSlave function or where I can find more info about the projectionOffset and viewOffset Thanks Dieter Unclassified Mail Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multi view stereo
Thanks Robert I will try this Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Thursday, 11 December, 2008 11:37 To: OpenSceneGraph Users Subject: Re: [osg-users] multi view stereo Hi Dieter, You shouldn't need any special draw code the OSG can do multiple cameras already, you just need to set up a single View with multiple slave Cameras, you can have as many as you want, 5 will be no problem. The code in osgViewer::View::setUpViewForSpephicalCode(..) would setUpViewForWoWVxDisplay(..) would probably be good places to start with learning how to configure all the cameras. Robert. On Thu, Dec 11, 2008 at 10:07 AM, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi I would like to use a special opengl draw code to render for a multi view stereo display (5 views). How can I implement this code into my osg application ? Any hints ? Thanks Dieter Unclassified Mail -- -- Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. -- -- ___ 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 Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] present3d + compositeViewer
Hi I would like to combine my application (using osgcompositeviewer with multiple views) and present3d, so that I can switch between the two parts by pressing a key. Any hints what the best way is to combine these ? Thanks Dieter Unclassified Mail Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] present3d + compositeViewer
Hi Robert thanks for the hints - - to use it as a single view within a viewer - does this mean that I can change in the present3d sources from viewer to view and use addView (present3d_view) in my application? Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Friday, 22 August, 2008 10:11 To: OpenSceneGraph Users Subject: Re: [osg-users] present3d + compositeViewer Hi Dieter, Combining Present3D with other applications would require refactoring of Present3D a bit as it isn't built as a shared library at all - just a straight application. Present3D is also under the GPL, so if you wish to make a derivative work, such as what you describe, it will also have to be GPL'd. If your app is GPL'd and want to move to integrating with Present3D in some way, then it might be possible to set Present3D to use a single view within a Viewer. Present3D is a bit of tangled mess in the main, and awaits a rewrite that I'll be doing over the next year, so it might be possible to move things in a direction that is more interoperable. Robert. On Fri, Aug 22, 2008 at 8:13 AM, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi I would like to combine my application (using osgcompositeviewer with multiple views) and present3d, so that I can switch between the two parts by pressing a key. Any hints what the best way is to combine these ? Thanks Dieter Unclassified Mail Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ 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 Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] transparency becomes dark
Hi Ulrich thanks - you are right - it was the wrong place Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ulrich Hertlein Sent: Thursday, 31 July, 2008 01:34 To: OpenSceneGraph Users Subject: Re: [osg-users] transparency becomes dark Hi Dieter, Dieter Pfeffer wrote: I supposed that it has s.th to do with the missing material paramters; my idea was to change the original material of the node, therefore I set: osg::StateSet *ss = loadedModel -getOrCreateStateSet(); osg::Material* blendMaterial = (osg::Material*)(ss-getAttribute(osg::StateAttribute::MATERIAL)); but the material is always NULL so I don't have the original material Is this the wrong function call ? The function call is correct, you're probably looking in the wrong spot ;-) I assume 'loadedModel' is the Node returned from 'readNodeFile'? If this is the case than most likely this is only a Group node that contains the rest of the scene graph. If you take a look at e.g. 'cow.osg' (or most of the examples) you'll see that the Material isn't actually attached to the top node. What you'll need to do is traverse the scene graph and find the Material node(s) you're looking for. For example you could look for a Node with a certain name and fetch it's Material. Also keep in mind that Materials are attached to StateSets which may be attached to Nodes *or* Drawables (attached to Geodes). Cheers! /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Disclaimer: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Considering the inherent risks of the use of e-mail communication, Thales Nederland BV shall not be liable for any damage derived from it. Thales Nederland BV is seated in Hengelo (Ov.), the Netherlands, and registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] transparency becomes dark
Thanks Ulrich and Dimi I supposed that it has s.th to do with the missing material paramters; my idea was to change the original material of the node, therefore I set: osg::StateSet *ss = loadedModel -getOrCreateStateSet(); osg::Material* blendMaterial = (osg::Material*)(ss-getAttribute(osg::StateAttribute::MATERIAL)); but the material is always NULL so I don't have the original material Is this the wrong function call ? Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ulrich Hertlein Sent: Saturday, 26 July, 2008 08:08 To: OpenSceneGraph Users Subject: Re: [osg-users] transparency becomes dark Hi Dieter, Dieter Pfeffer wrote: I am trying to set the object transparency from 1.0 - 0.0 and vice versa; but when I start changing the alpha of the material the object becomes dark. I have changed the material parameters but without success; when I look in the loaded model (for example cow.osg) for material, the material is always null. I have modified the osgviewer example and attached it. Could s.o. give me a hint what I am doing wrong ? You're creating a new Material that overrides the material of the node you're fading. However, you're not setting the Material properties (ambient, diffuse, specular, emissive, shininess) and the default values for Material are unlikely to match that of the node you're trying to blend. Hence when you override the original material it will switch from the original settings to the default Material. For an experiment, have a look at any .osg file and look at the material properties. Then set those values on the 'blendMaterial' node you're creating and it should look smooth. You're probably better off modifying the original Material(s) of the node hierarchy. Or try another approach, like using blendcolor. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Disclaimer: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Considering the inherent risks of the use of e-mail communication, Thales Nederland BV shall not be liable for any damage derived from it. Thales Nederland BV is seated in Hengelo (Ov.), the Netherlands, and registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] transparency becomes dark
Hi I am trying to set the object transparency from 1.0 - 0.0 and vice versa; but when I start changing the alpha of the material the object becomes dark. I have changed the material parameters but without success; when I look in the loaded model (for example cow.osg) for material, the material is always null. I have modified the osgviewer example and attached it. Could s.o. give me a hint what I am doing wrong ? Thanks Dieter Unclassified Mail Disclaimer: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Considering the inherent risks of the use of e-mail communication, Thales Nederland BV shall not be liable for any damage derived from it. Thales Nederland BV is seated in Hengelo (Ov.), the Netherlands, and registered at the Chamber of Commerce under number 06061578. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This application is open source and may be redistributed and/or modified * freely and without restriction, both in commericial and non commericial applications, * as long as this copyright notice is maintained. * * This application is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #include osgDB/ReadFile #include osgUtil/Optimizer #include osg/CoordinateSystemNode #include osg/Switch #include osgText/Text #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers #include osgGA/TrackballManipulator #include osgGA/FlightManipulator #include osgGA/DriveManipulator #include osgGA/KeySwitchMatrixManipulator #include osgGA/StateSetManipulator #include osgGA/AnimationPathManipulator #include osgGA/TerrainManipulator #include osg/Material #include osg/BlendFunc #include iostream int doAlpha; float currentAlpha; osg::ref_ptrosg::Node loadedModel; void setAlpha() { if ( doAlpha == 1) currentAlpha +=.01; if ( doAlpha == 2) currentAlpha -=.01; if (loadedModel.valid()) { osg::StateSet *ss = loadedModel -getOrCreateStateSet(); osg::Material* blendMaterial = 0; blendMaterial = (osg::Material*)(ss-getAttribute(osg::StateAttribute::MATERIAL)); if(blendMaterial ==0) { blendMaterial = new osg::Material(); } if (doAlpha == 1) { if (currentAlpha 1.0) { blendMaterial-setAlpha( osg::Material::FRONT_AND_BACK, currentAlpha); } else { blendMaterial-setAlpha( osg::Material::FRONT_AND_BACK, 1.0); doAlpha = 0; } } else if (doAlpha == 2) { if (currentAlpha .0) { blendMaterial-setAlpha( osg::Material::FRONT_AND_BACK, currentAlpha); } else { blendMaterial-setAlpha( osg::Material::FRONT_AND_BACK, 0.0); doAlpha = 0; } } osg::BlendFunc *bl = new osg::BlendFunc(); bl-setFunction(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE_MINUS_SRC_ALPHA); ss-setAttributeAndModes(bl, osg::StateAttribute::ON |osg::StateAttribute::OVERRIDE); ss-setMode(GL_BLEND, osg::StateAttribute::ON |osg::StateAttribute::OVERRIDE); ss-setAttributeAndModes(blendMaterial ,osg::StateAttribute::ON |osg::StateAttribute::OVERRIDE); ss-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); loadedModel-setStateSet( ss ); // not neccessary if (currentAlpha =1 ) { doAlpha = 0; ss-setMode(GL_BLEND, osg::StateAttribute::OFF); ss-setAttributeAndModes(blendMaterial,osg::StateAttribute::OFF); } if (currentAlpha 0) doAlpha = 1; } } int main(int argc, char** argv) { // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(argc,argv); arguments.getApplicationUsage()-setApplicationName(arguments.getApplicationName());
[osg-users] cloned node without texture
Hi I am trying to attach a cloned node to the scene when I press a key (source code below)- I can see the geometry but no texture. I have implemented it in the osgViewer example. When I put this source directly into the viewer source, it works. I am using osg 2.3.6, Windows XP. Any hints ? Thanks Dieter extern osg::ref_ptrosg::Group scene; extern osg::ref_ptrosg::Node l_node ; bool myKeyboard::handle(const osgGA::GUIEventAdapter ea,osgGA::GUIActionAdapter ) { switch(ea.getEventType()) { case(osgGA::GUIEventAdapter::KEYDOWN): { if (ea.getKey()=='y') { osg::ref_ptrosg::Node new_node = dynamic_castosg::Node*(l_node-clone(osg::CopyOp::DEEP_COPY_ALL)); osg::MatrixTransform* positioned = new osg::MatrixTransform; positioned-setMatrix( osg::Matrix::translate(osg::Vec3 (10.,0.,10.))); positioned-addChild(new_node.get()); osg::PositionAttitudeTransform* objXform = new osg::PositionAttitudeTransform; objXform-addChild(positioned); scene.get()-addChild (objXform); //osgUtil::Optimizer optimizer; //optimizer.optimize(scene.get()); return true; } return false; } Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cloned node without texture
Hi it seems that for my purpose - clone(osg::CopyOp::DEEP_COPY_NODES); is the best one (geometry and texture) DIeter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dieter Pfeffer Sent: Monday, 14 July, 2008 17:24 To: osg-users@lists.openscenegraph.org Subject: [osg-users] cloned node without texture Hi I am trying to attach a cloned node to the scene when I press a key (source code below)- I can see the geometry but no texture. I have implemented it in the osgViewer example. When I put this source directly into the viewer source, it works. I am using osg 2.3.6, Windows XP. Any hints ? Thanks Dieter extern osg::ref_ptrosg::Group scene; extern osg::ref_ptrosg::Node l_node ; bool myKeyboard::handle(const osgGA::GUIEventAdapter ea,osgGA::GUIActionAdapter ) { switch(ea.getEventType()) { case(osgGA::GUIEventAdapter::KEYDOWN): { if (ea.getKey()=='y') { osg::ref_ptrosg::Node new_node = dynamic_castosg::Node*(l_node-clone(osg::CopyOp::DEEP_COPY_ALL)); osg::MatrixTransform* positioned = new osg::MatrixTransform; positioned-setMatrix( osg::Matrix::translate(osg::Vec3 (10.,0.,10.))); positioned-addChild(new_node.get()); osg::PositionAttitudeTransform* objXform = new osg::PositionAttitudeTransform; objXform-addChild(positioned); scene.get()-addChild (objXform); //osgUtil::Optimizer optimizer; //optimizer.optimize(scene.get()); return true; } return false; } Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] multiple texture loading of identical objects
Hi when I start osgViewer with e.g. 29 identical objects(.flt) , the framerate is about 30 fps, but starting with 30 identical objects the frame rate drops down to 1 fps. This has s.th. to do with the texture , when I press 't' the framerate increases to 30 fps. Is it possible to load the texture only once and not every identical object (similar to SGI pfuDownloadTexlist) ? Windows XP, OSG 2.3.6 Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Quicktimeplugin livestreaming documentation/examples
Hi Colin it works with a low cost webcam but not with a more expensive one - so it has s.th to do with the webcam Thanks Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Thursday, 19 June, 2008 17:53 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktimeplugin livestreaming documentation/examples Hi Dieter, did you actually change your webcam settings to default the webcam to use 640 x 480 by default (prior to running 0:3.live)? Did you see osgmovie with a higher resolution (live stream) on windows ? Any other hints? Yes my webcam will do 1024x768 and various downward resolutions ok. This is using AbstractPlane wrapper and setting the camera resolution up in advance via it's settings prior to running osgmovie as said. My capture card does full 1080p via HDMI and this is also captured successfully via osgmovie as well as various flavours of PAL via composite in eg 576i. This card has a native QuickTime driver though for Windows (rare) and is accessed without the DirectShow wrapper. As far as any hints I have found that the AbstractPlane wrapper will sometimes not offer ALL the resolutions of the DirectShow devices and only a subset? The plug-in was intended for native QuickTime drivers on OSX/Windows and the fact it works via the AbstractPlane wrapper is just a bonus but is an indirection that the OSG or the plug-in has any control over regarding problems. Let me know if you have any success. Cheers, Colin. Dieter Pfeffer wrote: Hi Colin thanks for your answer - but I have no success with a higher resolution. When I use the 0:3.live which matches a resolution of 640x480, I only see a white rectangle though the width and height of the image is 640 x 480 (in debugger). No other locking application is running. I can use 320x240 or smaller resolutions like 160x120. When I start the application with 0:3.live (640x480) the webcam is turned off in osgDB::readImageFile(...) and I can't see the output of fps_counter in QuicktimeLiveImageStream.cpp and no error message - with 320x240 I see the output of the fps_counter. Did you see osgmovie with a higher resolution (live stream) on windows ? Any other hints? Thanks Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Wednesday, 18 June, 2008 23:09 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktimeplugin livestreaming documentation/examples Hi Dieter, you sometimes have to change the resolution of your webcam via it's own preference settings. Then you can use this new resolution via the corresponding x:y.live that matches the --devices output equal to your new resolution. Basically it's the same for the capture cards and you can't (via OSG right now) alter some of the card/webcam settings programatically. Hope this makes sense. Also make sure that you close any webcam apps/previews/setting priot to running osgmovie as you will likely get locked out as there seems to be some OS thing going on restricting one app to the hardware at any one time wrt the AbstractPlane DirectShow/QT wrapper. Cheers, Colin. Dieter Pfeffer wrote: Hi I am using osgmovie like Colin has described to visualise a live stream from a webcam (and it works very good) - but I can only see a resolution of 320x240; is there a limitation to this resolution ? - is there any way to realise a higher resolution ? Using Windows XP and OSG 2.3.6 Thanks Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Tuesday, 08 April, 2008 17:07 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktime plugin livestreaming documentation/examples Hi Adrian, I've not documented anything on the wiki yet but below is how the result was achieved on Windows XP. See my previous post for any more detail. The demo/example is really just a quad with your live feed playing - so a I've just tweaked osgmovie here to force load the plug-in from a .live association and then interpret the file basename to get a device and input ID - ugly but working... 0. If you have NO QuickTime driver for your device then install http://www.abstractplane.com/products/vdig.jsp Use the latest version and do the manual install from the zip. You will jave to live with the demo mode or fork out some $$$. If your capture device has a QuickTime driver then you do not need this VDIG for Windows thing eg BlackMagic Intensity Pro. 1. Modify the osgmovie.cpp and make sure that the .live extension is associated with the osgdb_qt plugin: osgDB::Registry::instance()-addFileExtensionAlias(live,qt); 2. run osgmovie --devices If you have any live feed devices associated with a QuickTime driver then this will spit out some command line options and associations
Re: [osg-users] Quicktimeplugin livestreaming documentation/examples
Hi Colin thanks for your answer - but I have no success with a higher resolution. When I use the 0:3.live which matches a resolution of 640x480, I only see a white rectangle though the width and height of the image is 640 x 480 (in debugger). No other locking application is running. I can use 320x240 or smaller resolutions like 160x120. When I start the application with 0:3.live (640x480) the webcam is turned off in osgDB::readImageFile(...) and I can't see the output of fps_counter in QuicktimeLiveImageStream.cpp and no error message - with 320x240 I see the output of the fps_counter. Did you see osgmovie with a higher resolution (live stream) on windows ? Any other hints? Thanks Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Wednesday, 18 June, 2008 23:09 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktimeplugin livestreaming documentation/examples Hi Dieter, you sometimes have to change the resolution of your webcam via it's own preference settings. Then you can use this new resolution via the corresponding x:y.live that matches the --devices output equal to your new resolution. Basically it's the same for the capture cards and you can't (via OSG right now) alter some of the card/webcam settings programatically. Hope this makes sense. Also make sure that you close any webcam apps/previews/setting priot to running osgmovie as you will likely get locked out as there seems to be some OS thing going on restricting one app to the hardware at any one time wrt the AbstractPlane DirectShow/QT wrapper. Cheers, Colin. Dieter Pfeffer wrote: Hi I am using osgmovie like Colin has described to visualise a live stream from a webcam (and it works very good) - but I can only see a resolution of 320x240; is there a limitation to this resolution ? - is there any way to realise a higher resolution ? Using Windows XP and OSG 2.3.6 Thanks Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Tuesday, 08 April, 2008 17:07 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktime plugin livestreaming documentation/examples Hi Adrian, I've not documented anything on the wiki yet but below is how the result was achieved on Windows XP. See my previous post for any more detail. The demo/example is really just a quad with your live feed playing - so a I've just tweaked osgmovie here to force load the plug-in from a .live association and then interpret the file basename to get a device and input ID - ugly but working... 0. If you have NO QuickTime driver for your device then install http://www.abstractplane.com/products/vdig.jsp Use the latest version and do the manual install from the zip. You will jave to live with the demo mode or fork out some $$$. If your capture device has a QuickTime driver then you do not need this VDIG for Windows thing eg BlackMagic Intensity Pro. 1. Modify the osgmovie.cpp and make sure that the .live extension is associated with the osgdb_qt plugin: osgDB::Registry::instance()-addFileExtensionAlias(live,qt); 2. run osgmovie --devices If you have any live feed devices associated with a QuickTime driver then this will spit out some command line options and associations. It will also spit out any pseudo Windows VDIG wrapped Direct Show devices in the same way eg: ... 4:1.liveBlackmagic HDTV 720Intensity HDTV 720p 59.94 ... 1:4.liveHauppauge WinTV 418 Video Capture (4E384A6E048F0)S-Video 3 UYVY @ 720x480 ... 3. run osgmovie and pass it a pseudo file name that will be translated by the plug-in to point at an input device eg $ osgmovie x:y.live This will force load the osgdb_qt plug-in, and then attempt to decode the x:y.live where x and y are the input and channel of your input - eg 5:0.live I plan to submit to Robert an osgvideo example which wraps some of this up a bit better. Cheers, Colin. Adrian Egli OpenSceneGraph (3D) wrote: Hi any demo / example ? regards 2008/4/3, Mike Greene [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Colin, Success! Using the later version of VDIG that you referenced, I was able to get a live stream to work with osgmovie. I'm using a KOCOM camera running video through a Canopus ADVC 110 A/D video convertor into a firewire cable. This is on Windows XP, OSG 2.3.5, Visual Studio 2005 debug, Quicktime SDK 7.3. Mike Greene ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli
Re: [osg-users] Quicktime plugin livestreaming documentation/examples
Hi I am using osgmovie like Colin has described to visualise a live stream from a webcam (and it works very good) - but I can only see a resolution of 320x240; is there a limitation to this resolution ? - is there any way to realise a higher resolution ? Using Windows XP and OSG 2.3.6 Thanks Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Colin Dunlop Sent: Tuesday, 08 April, 2008 17:07 To: OpenSceneGraph Users Subject: Re: [osg-users] Quicktime plugin livestreaming documentation/examples Hi Adrian, I've not documented anything on the wiki yet but below is how the result was achieved on Windows XP. See my previous post for any more detail. The demo/example is really just a quad with your live feed playing - so a I've just tweaked osgmovie here to force load the plug-in from a .live association and then interpret the file basename to get a device and input ID - ugly but working... 0. If you have NO QuickTime driver for your device then install http://www.abstractplane.com/products/vdig.jsp Use the latest version and do the manual install from the zip. You will jave to live with the demo mode or fork out some $$$. If your capture device has a QuickTime driver then you do not need this VDIG for Windows thing eg BlackMagic Intensity Pro. 1. Modify the osgmovie.cpp and make sure that the .live extension is associated with the osgdb_qt plugin: osgDB::Registry::instance()-addFileExtensionAlias(live,qt); 2. run osgmovie --devices If you have any live feed devices associated with a QuickTime driver then this will spit out some command line options and associations. It will also spit out any pseudo Windows VDIG wrapped Direct Show devices in the same way eg: ... 4:1.liveBlackmagic HDTV 720Intensity HDTV 720p 59.94 ... 1:4.liveHauppauge WinTV 418 Video Capture (4E384A6E048F0)S-Video 3 UYVY @ 720x480 ... 3. run osgmovie and pass it a pseudo file name that will be translated by the plug-in to point at an input device eg $ osgmovie x:y.live This will force load the osgdb_qt plug-in, and then attempt to decode the x:y.live where x and y are the input and channel of your input - eg 5:0.live I plan to submit to Robert an osgvideo example which wraps some of this up a bit better. Cheers, Colin. Adrian Egli OpenSceneGraph (3D) wrote: Hi any demo / example ? regards 2008/4/3, Mike Greene [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Colin, Success! Using the later version of VDIG that you referenced, I was able to get a live stream to work with osgmovie. I'm using a KOCOM camera running video through a Canopus ADVC 110 A/D video convertor into a firewire cable. This is on Windows XP, OSG 2.3.5, Visual Studio 2005 debug, Quicktime SDK 7.3. Mike Greene ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie error message
Hi I get an application error (The instruction at ... referenced memory at The memory could not be read.) when I stop my application with esc. When I run in debug mode, it breaks in QTUtils.cpp with the message Unhandled exception .. Access violation reading location ... My application has parts of osgmovie included and I can reproduce this message in osgmovied (windows xp, osg2.3.6) when I comment in the function myCreateTexturedQuadGeometry () the line // pictureQuad-getOrCreateStateSet()-setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); for useTextureRectangle It makes no sense to do this and I don't do it in my application, but I am trying to find out the reason for the application error. Any idea ? Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmovie with mpgs or avis on windows
Hi osgmovie is running on my windows computer with .mov and .mpg - I am using osg2.3.6 and quicktime71sdk; so it should also work for you Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stephan Maximilian Huber Sent: Tuesday, 10 June, 2008 14:05 To: OpenSceneGraph Users Subject: Re: [osg-users] osgmovie with mpgs or avis on windows David De Weerdt schrieb: yes, that works for .mov and .mp4, but not for .mpg and .avi quicktime can't play movies of type avi or mpg. You can install these codecs on OS X via Perian or other tools but IMHO not on Windows. The best would be a directshow-plugin for windows, so all these video-types can be played on windows. You can can convert your media to mp4, that should work. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding input device Part 2
Renan, if you are working under windows, you can do in the main loop DispatchLoop () with: (the difference to the examples is: use PeekMessage instead of GetMessage) int DispatchLoopNT () { int num; /* number of button pressed */ MSG msg; /* incoming message to be evaluated */ BOOL handled; /* is message handled yet */ SiSpwEvent Event; /* SpaceWare Event */ SiGetEventData EData; /* SpaceWare Event Data */ handled = SPW_FALSE; /* init handled */ /* start message loop */ { if (PeekMessage (msg, NULL, 0,0,PM_REMOVE)) { Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Renan Mendes Sent: Tuesday, 22 April, 2008 14:36 To: OSG Mailing List Subject: [osg-users] Adding input device Part 2 Hi, As some of you may remember, i was trying to add a new input device to my OSG application. This device was the SpaceNavigator. I had access to the code that gets the 3D coordinates from it any time it is activated. But, when it is idle, that code makes my application stop and wait for any signal from SN. I was inserting that loop in the event type FRAME. But, as you may imagine, when I stopped moving with SN, my application entered that waiting stage, and the regular cycles of traversal, culling and drawing were blocked. Someone else suggested that I added this device in a new Event Handler class. Is that right? How do I do that, exactly? Any examples? Thanks, Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setHeight in DriveManipulator
Thanks Paul, I have seen this in the source, but I would like to do this while the application is running (with a key or gui) Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Martz Sent: Friday, 18 April, 2008 17:36 To: 'OpenSceneGraph Users' Subject: Re: [osg-users] setHeight in DriveManipulator You can control this with an environment variable. The following is from the OSG Reference Manual v2.2: 3.2.16 OSG_DRIVE_MANIPULATOR_HEIGHT Specifies the view offset from ground level that the DriveManipulator uses. The value is in world coordinate units. Valid values: Any floating-point number. Default value: 1.5 Hope that helps, -Paul From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dieter Pfeffer Sent: Friday, April 18, 2008 5:32 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] setHeight in DriveManipulator Hi, how can I set the height in DriveManipulator ? When I use setHeight, it has no effect, specially when I remove the intersectTraversal. When I look in the source code, I can't find how the height effects the calculation. Or do I miss something ? Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setHeight in DriveManipulator
Hi Robert, but isn't it correct that the height only effects the calculation if s.th is hit ? (DriveManipulator.cpp: if (!hitList.empty())...) when I set drive-setIntersectTraversalMask(0x0); (or is this wrong? - I would like to remove the collsion test) - nothing happens when I use setHeight(); if I remove this, it works like I expect Thanks Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Monday, 21 April, 2008 10:44 To: OpenSceneGraph Users Subject: Re: [osg-users] setHeight in DriveManipulator Hi Dieter, The setHeight should take an effect, the DriveManipulator::calcMovement() contains the code that uses the _height member variable. The next frame event should trigger the manipulator to update its position accordingly. The DriveManipulator::setNode(osg::Node* node) method will currently override the _height value, this will be called if you viewer changes its scene graph. Perhaps this is what is causing problems. If so then try using putenv/setenv to set the OSG_DRIVE_MANIPULATOR_HEIGHT env var to the value you want. Robert. On Fri, Apr 18, 2008 at 12:32 PM, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi, how can I set the height in DriveManipulator ? When I use setHeight, it has no effect, specially when I remove the intersectTraversal. When I look in the source code, I can't find how the height effects the calculation. Or do I miss something ? Thanks Dieter Unclassified Mail ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] setHeight in DriveManipulator
Hi, how can I set the height in DriveManipulator ? When I use setHeight, it has no effect, specially when I remove the intersectTraversal. When I look in the source code, I can't find how the height effects the calculation. Or do I miss something ? Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3dconnexion for windows
I have used the 3dconnexion cityfly example (function: SbMotionEvent) - one try: eye_to_world matrix as vMatrix or: MatrixToHpr (rot, eye_to_world) //(extracting the rotation from the matrix) but this is not really osg; my idea was whether s.o. has implemented it in osg and could give me a hint how to get the rotation and set the viewmatrix Thanks Mike - I will have a look at osgVRPN Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Wednesday, 05 March, 2008 10:40 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows The point is that it is not obvious to me how you convert the rotation information from the 3Dconnexion driver into an osg rotation... Dieter Pfeffer a écrit : Hi I don' t use a MatrixManipulator but would like to set the camera viewmatrix: viewer.getCamera()-setViewMatrix (vMatrix * osg::Matrix::rotate (-(osg::PI_2),1,0,0)); with tMatrix = rot * trans; vMatrix = tMatrix.inverse (tMatrix); Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Tuesday, 04 March, 2008 11:02 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows I guess that this is deeply related to the MatrixManipulator you are using . What MM are you using ? Please also note that there is a setting in the 3D connexion driver to set the translation as dominant . Rémy Dieter Pfeffer a écrit : Hi has s.o. implemented the 3dconnexion input device and can give me a hint (or source) how to match it to the viewmatrix in osg. I have no problems in translation but I can't figure out how to set the corrrect rotation. If I use only heading it's correct but not heading and pitch together. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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 -- - Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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
[osg-users] 3dconnexion for windows
Hi has s.o. implemented the 3dconnexion input device and can give me a hint (or source) how to match it to the viewmatrix in osg. I have no problems in translation but I can't figure out how to set the corrrect rotation. If I use only heading it's correct but not heading and pitch together. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3dconnexion for windows
Hi I don' t use a MatrixManipulator but would like to set the camera viewmatrix: viewer.getCamera()-setViewMatrix (vMatrix * osg::Matrix::rotate (-(osg::PI_2),1,0,0)); with tMatrix = rot * trans; vMatrix = tMatrix.inverse (tMatrix); Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Tuesday, 04 March, 2008 11:02 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows I guess that this is deeply related to the MatrixManipulator you are using . What MM are you using ? Please also note that there is a setting in the 3D connexion driver to set the translation as dominant . Rémy Dieter Pfeffer a écrit : Hi has s.o. implemented the 3dconnexion input device and can give me a hint (or source) how to match it to the viewmatrix in osg. I have no problems in translation but I can't figure out how to set the corrrect rotation. If I use only heading it's correct but not heading and pitch together. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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] osgParticleEffect attached to a node
Robert I received the mail now - but was sent some weeks ago - so no response from me Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Wednesday, 15 August, 2007 20:07 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgParticleEffect attached to a node Hi Dieter, Unfortunately the info below doesn't really give me much more of an ideal of where the problems has stemmed from. Could you try a debug build and see if you can catch the location of the problem. As a general note about particle effects which are being transformed, what you will need to do place the particle system itself at the root of your scene graph, rather nested in the scene graph, as you should be emitting particles into the air rather than local to the particle source. The osgparticleeffects example provides an example of this. Robert. On 8/15/07, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi Robert that is what I can see in the stack - but I suppose it is my fault, because I have made a similar hierarchie (less complex but with the same structure) in the osgparticleeffects example and it works: kernel32.dll!77e7aafc() msvcr71d.dll!_nh_malloc_dbg(unsigned int nSize=1, int nhFlag=3, int nBlockUse=14609864, const char * szFileName=0x00deef44, int nLine=787401) Line 267 + 0x7 C msvcr71d.dll!_CxxThrowException(void * pExceptionObject=0x00deede4, const _s__ThrowInfo * pThrowInfo=0x104f6150) + 0x39 C++ msvcp71d.dll!std::_Nomemory() Line 10 C++ osgParticled.dll!011f545f() The application stops in the debugger: in dbgheap.c /* do the allocation */ pvBlk = _heap_alloc_dbg(nSize, nBlockUse, szFileName, nLine); #ifdef _MT } __finally { /* unlock the heap */ _munlock(_HEAP_LOCK); } #endif /* _MT */ I am using osg 2.0 Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Wednesday, 15 August, 2007 16:55 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgParticleEffect attached to a node Hi Dieter, Things should certainly not hang so this is a bug. Could you break the app and find out where its hanging. Robert. On 8/15/07, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi I would like to use the SmokeTrailEffect similar to the example, but not attached to a picked node but to a selected object. This is my hierarchie:: osg::Group - osg::Switch - osg::PositionAttitudeTransform - osg::Node (from osgDB::readNodeFile (name)) When I attach the effectsGroup (form the example) to the first group, I can see the effect but no trail effect; when I attach it to the PositionAttitudeTransform or the Node - my application hangs. The object is moving by: osg::PositionAttitudeTransform -setPosition / setAttitude What do I wrong ? Thanks Dieter Unclassified Mail ___ 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 ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT in a multichannel app
Robert, I meant the view offset of the offset slaves (left: -40; right 40) The RTT camera is in the scene graph itself - but I have one scene for the three cameras; I thought I need three RTT cameras, one for every channel; but when I set the ReferenceFrame to RELATIVE_RF, I suppose I have the view matrix of the center camera for all three RTT cameras or do I misunderstand something ? Thanks Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Wednesday, 26 September, 2007 18:05 To: OpenSceneGraph Users Subject: Re: [osg-users] RTT in a multichannel app On 9/26/07, Dieter Pfeffer [EMAIL PROTECTED] wrote: how can I set my rtt camera view matrix so that I have the same view offset ? The same view offset as what? The master camera? One of the already offset slaves? For a RTT slave to have the same view matrix as the master simply use an identity matrix. If your RTT Camera is in the scene graph itself then just set its view matrix to identity and then set the ReferenceFrame to RELATIVE_RF. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] differences between osgViewer and osgCompositeViewer
Hi when I load an object with a generated internal sequence, I can see this sequence automatically in the osgviewer example but not in the osgcompositeviewer example. I have a similar point when I set an AnimationPathCallback in a CompositeViewer application, I have modified the osgparticleeffects example and use osgViewer::CompositeViewer, but then the model is not animated. Is it possible to activate in my application which uses osgViewer::CompositeViewer (multi views and multi scenes) the sequence automatically ? Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Plugin find - linux
Hi I have with osg2.1.6 a similar problem (like the plugin find behaviour discussion) with the plugin path: I get the message: could not find plugin to read objects from file xxx.flt; but the viewer has no problem to find xxx.ive or xxx.osg files; so I suppose the directory structure and path is correct. The OpenFlight lib is in the plugin directory. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgParticleEffect attached to a node
Hi I would like to use the SmokeTrailEffect similar to the example, but not attached to a picked node but to a selected object. This is my hierarchie:: osg::Group - osg::Switch - osg::PositionAttitudeTransform - osg::Node (from osgDB::readNodeFile (name)) When I attach the effectsGroup (form the example) to the first group, I can see the effect but no trail effect; when I attach it to the PositionAttitudeTransform or the Node - my application hangs. The object is moving by: osg::PositionAttitudeTransform -setPosition / setAttitude What do I wrong ? Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgParticleEffect attached to a node
Hi Robert that is what I can see in the stack - but I suppose it is my fault, because I have made a similar hierarchie (less complex but with the same structure) in the osgparticleeffects example and it works: kernel32.dll!77e7aafc() msvcr71d.dll!_nh_malloc_dbg(unsigned int nSize=1, int nhFlag=3, int nBlockUse=14609864, const char * szFileName=0x00deef44, int nLine=787401) Line 267 + 0x7 C msvcr71d.dll!_CxxThrowException(void * pExceptionObject=0x00deede4, const _s__ThrowInfo * pThrowInfo=0x104f6150) + 0x39 C++ msvcp71d.dll!std::_Nomemory() Line 10 C++ osgParticled.dll!011f545f() The application stops in the debugger: in dbgheap.c /* do the allocation */ pvBlk = _heap_alloc_dbg(nSize, nBlockUse, szFileName, nLine); #ifdef _MT } __finally { /* unlock the heap */ _munlock(_HEAP_LOCK); } #endif /* _MT */ I am using osg 2.0 Dieter Unclassified Mail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Osfield Sent: Wednesday, 15 August, 2007 16:55 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgParticleEffect attached to a node Hi Dieter, Things should certainly not hang so this is a bug. Could you break the app and find out where its hanging. Robert. On 8/15/07, Dieter Pfeffer [EMAIL PROTECTED] wrote: Hi I would like to use the SmokeTrailEffect similar to the example, but not attached to a picked node but to a selected object. This is my hierarchie:: osg::Group - osg::Switch - osg::PositionAttitudeTransform - osg::Node (from osgDB::readNodeFile (name)) When I attach the effectsGroup (form the example) to the first group, I can see the effect but no trail effect; when I attach it to the PositionAttitudeTransform or the Node - my application hangs. The object is moving by: osg::PositionAttitudeTransform -setPosition / setAttitude What do I wrong ? Thanks Dieter Unclassified Mail ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org