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
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
Re: [osg-users] setHeight in DriveManipulator
Hi Dieter, The whole point of the DriveManipulator is that is terrain following, switch off the intersection codes and it won't work as it's designed too. Perhaps a custom made manipulator is what you need. Robert. On Mon, Apr 21, 2008 at 10:32 AM, Dieter Pfeffer [EMAIL PROTECTED] wrote: 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 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] 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