Re: [osg-users] 3D mice

2013-05-20 Thread Thomas Lerman
Yeah, it was no big deal. I did check out osgWorks and osgVRPN (part of 
osgToy). The only thing is it appears osgVRPN is on an old version of osg (2.2).

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54060#54060





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Jan Ciger
On Mon, May 20, 2013 at 3:43 PM, Thomas Lerman osgfo...@tevs.eu wrote:
 Yeah, it was no big deal. I did check out osgWorks and osgVRPN (part of 
 osgToy). The only thing is it appears osgVRPN is on an old version of osg 
 (2.2).

It is likely simpler to just instantiate your vrpn_TrackerRemote and
make an update callback on the OSG node that you want to drive with
the 3D mouse pull the data from VRPN. Perhaps 10-15 lines of code and
no additional dependency (apart from VRPN).

Regards,

Jan
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Chris Hanson
osgVRPN does has some nice convenience code, which is really its main
purpose.

I'm sure Mike would love some help updating the osgVRPN build.


On Mon, May 20, 2013 at 8:18 AM, Jan Ciger jan.ci...@gmail.com wrote:

 On Mon, May 20, 2013 at 3:43 PM, Thomas Lerman osgfo...@tevs.eu wrote:
  Yeah, it was no big deal. I did check out osgWorks and osgVRPN (part of
 osgToy). The only thing is it appears osgVRPN is on an old version of osg
 (2.2).

 It is likely simpler to just instantiate your vrpn_TrackerRemote and
 make an update callback on the OSG node that you want to drive with
 the 3D mouse pull the data from VRPN. Perhaps 10-15 lines of code and
 no additional dependency (apart from VRPN).

 Regards,

 Jan
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Thomas Lerman
Thank you Jan. I will have to check it out. I will take a look at the tutorial 
you mentioned previously to see how to do that (I presume that is where you 
would suggest looking). It would be great if it is 10-15 lines of code, no 
additional dependencies other than VRPN, and creates nice  smooth movements. 
Any other hints (I am rather limited on time, so anything is appreciated)?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54062#54062





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Jan Ciger
Hello Thomas,

On Mon, May 20, 2013 at 4:25 PM, Thomas Lerman osgfo...@tevs.eu wrote:
 Thank you Jan. I will have to check it out. I will take a look at the 
 tutorial you mentioned previously to see how to do that (I presume that is 
 where you would suggest looking). It would be great if it is 10-15 lines of 
 code, no additional dependencies other than VRPN, and creates nice  smooth 
 movements. Any other hints (I am rather limited on time, so anything is 
 appreciated)?

There is a simple (non-osg-specific) VRPN tuto here:

http://www.vrgeeks.org/vrpn/tutorial---use-vrpn

A callback to update a matrix on an osg::MatrixTrasform from the
quaternion/vector that you get from VRPN is just a copy  paste from
an example in OSG. Or, even simpler, you can do it from the VRPN
callbacks directly, just retrieve the data you want and set it to the
node's matrix.

Just don't forget to run the mainloop() function during the update
traversal of the scenegraph - that is when the above mentioned
callbacks get actually called if there are new data from the VRPN
server. That can be done either in an update callback on some node
somewhere or if you don't mind a bit of a mess in your code, put it in
the main loop, somehow like this:

while (!viewer.done())
{
tkr-mainloop();
viewer.frame();
}

That's pretty much all there is to VRPN on the client side. The other
classes (Button, Analog, Dial, etc.) work pretty much the same - open
a remote, register a callback and then call the mainloop() on the
remote.

Regards,

Jan
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgParticle::ExplosionEffect: assistance needed

2013-05-20 Thread Mike Metcalf
Sergey,

Thanks for the info on particle systems. I'll dig into it and see what I'm 
doing with my transforms. 

Out of frustration, I had implemented something similar to your suggestion for 
handling QT resources. I simply read a png directly from the QT resource and 
then write it out to the drive using a temporary file name. Then I hand my 
particle system the name of that file. It seems a bit sloppy but it works for 
now.

-Mike

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54067#54067





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Aric Aumann
There was an osgVRPN update from Will Hollingsworth last summer, it worked with 
OSG 3+

See: 

http://forum.openscenegraph.org/viewtopic.php?p=50550

IIRC, to get Mike Weiblen's last commit compiling against OSG 3, the main thing 
is to change TrackerManipulator's base class from the MatrixManipulator to 
CameraManipulator - post back here if that doesn't do it, and I'll see if I can 
figure out what else it took.


Once you have that going, you should be able to just use a TrackerManipulator 
to navigate your scene as shown in the osgVRPNviewer.cpp example, and set up 
your VRPN config to use your 3dConnexion device as pseudo-tracker 
(vrpn_Tracker_AnalogFly) - the navigator_usb.cfg in the osgVRPN does exactly 
that.


The Hollingsworth branch adds the typical VR navigation functions to translate 
or rotate in user space and a walled mode for use on a fixed screen, but I 
think if all you have is your 3D mouse, you will be fine with the previous 
version and the pseudo-tracker, which essentially does the navigation on the 
VRPN side instead of the OSG side.


Hope that helps,
Aric






 From: Thomas Lerman osgfo...@tevs.eu
To: osg-users@lists.openscenegraph.org 
Sent: Monday, May 20, 2013 10:25 AM
Subject: Re: [osg-users] 3D mice
 

Thank you Jan. I will have to check it out. I will take a look at the tutorial 
you mentioned previously to see how to do that (I presume that is where you 
would suggest looking). It would be great if it is 10-15 lines of code, no 
additional dependencies other than VRPN, and creates nice  smooth movements. 
Any other hints (I am rather limited on time, so anything is appreciated)?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54062#54062





___
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] [Viewer] Detecting mouse move

2013-05-20 Thread Asher Kamiraze
Hi all,

In some of my application, I would like to detect when a clic + mouse move
event happen. My goal is to display on screen during the clic + mouse move
only objects bounding boxes.

Do you have any hint on how to do this? Maybe some tips starting from
osgviewer could help!

Best regards,

Asher
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] AlphaPixel Whitepaper on VirtualPlanetBuilder/OSGDEM

2013-05-20 Thread David Glenn

Chris Hanson wrote:
 As promised last week:
 
 
 http://alphapixel.com/content/openscengraph-virtual-planet-builder-osgdem 
 (http://alphapixel.com/content/openscengraph-virtual-planet-builder-osgdem)
 
 
 
 
 
 Feedback welcomed.
 
 
 -- 
 Chris 'Xenon' Hanson, omo sanza lettere.  http://www.alphapixel.com/ 
 (http://www.alphapixel.com/)
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • 
 GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • 
 Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
 @alphapixel (https://twitter.com/alphapixel) facebook.com/alphapixel 
 (http://facebook.com/alphapixel) (775) 623-PIXL [7495]
 
  --
 Post generated by Mail2Forum


Greetings Chris!

I just learned about it this week so I got a copy to review. 

As far as I can tell, there are not many papers (if any) on this subject and 
VPB is a remarkable tool. 

It's nice to understand the Terrain Theory that the bases to how this works. 

I must admit that most of the other paging schemes that I had to deal with in 
the past did not go as far as this and did not do as well.  Mostly because they 
where hacks using preexisting terrain elements that where clearly not made for 
paging. This makes much more sense to me.


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54070#54070





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Thomas Lerman
Thank you, I will check it out. The difficulty that I see with osgWorks and 
osgToy is that they seem to maintain their own internal data that is used to 
set the view matrix. This is problematic for me as I want to still allow mouse 
and keyboard manipulation of the camera. So far, I have not seen how to 
basically translate from the current view to a new view based upon the 
movements of the 3D mouse.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54071#54071





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [Viewer] Detecting mouse move

2013-05-20 Thread Sergey Kurdakov
Hi Asher

 In some of my application, I would like to detect when a clic + mouse move 
 event happen. My goal is to display on screen during the clic + mouse move 
 only objects bounding boxes.

see osgkeyboardmouse example,

have an additional flag for clicked stateL

pseudocode:
case(osgGA::GUIEventAdapter::PUSH):
{
clicked = true;
 _mx = ea.getX();
 _my = ea.getY();
return false;
}

and for
case(osgGA::GUIEventAdapter::MOVE):
{
_mxnew = ea.getX();
 _mynew = ea.getY();

if(clicked)  coord of mouse changed
{
perform your actions
}
else
{
 _mx = _mxnew;
 _my = _mxnew;
return false;
}
 case(osgGA::GUIEventAdapter::RELEASE):
{
clicked = false;
}


On Tue, May 21, 2013 at 1:00 AM, Asher Kamiraze
asher.kamir...@gmail.com wrote:

 Hi all,

 In some of my application, I would like to detect when a clic + mouse move 
 event happen. My goal is to display on screen during the clic + mouse move 
 only objects bounding boxes.

 Do you have any hint on how to do this? Maybe some tips starting from 
 osgviewer could help!

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Thomas Lerman
Also, I actually really would like to interact with VRPN directly instead of 
yet another dependency (as Jan stated). I have it working where I see the 
vrpn_Analog  vrpn_Button classes. I need to take a look at 
vrpn_Tracker_AnalogFly (as Jan pointed out) to see if that is more useful. As 
mentioned in a previous post, I still want the regular mouse and keyboard to 
function whether or not the 3D mouse is attached. Ideally, I would take the 
current view matrix, pass it into a function to allow VRPN to manipulate it, 
and set the manipulated matrix as the new current view.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54073#54073





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Paul Martz
I'm not sure what you want to control with the spaceball, but... I'd like
to point out that osgwMx (part of osgWorks) controls a matrix. You can use
that matrix for whatever you want, such as controlling a view position or
MatrixTransform. So you should be able to use osgGA mouse/kbd to control
your view, and use osgwMx/spaceball to control whatever else you want to
control. They should be completely independent.


On Mon, May 20, 2013 at 5:21 PM, Thomas Lerman osgfo...@tevs.eu wrote:

 Thank you, I will check it out. The difficulty that I see with osgWorks
 and osgToy is that they seem to maintain their own internal data that is
 used to set the view matrix. This is problematic for me as I want to still
 allow mouse and keyboard manipulation of the camera. So far, I have not
 seen how to basically translate from the current view to a new view based
 upon the movements of the 3D mouse.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=54071#54071





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] AlphaPixel Whitepaper on VirtualPlanetBuilder/OSGDEM

2013-05-20 Thread Chris Hanson
Glad it helped you out!


On Mon, May 20, 2013 at 5:13 PM, David Glenn da...@dglenn.com wrote:


 Chris Hanson wrote:
  As promised last week:
 
 
 
 http://alphapixel.com/content/openscengraph-virtual-planet-builder-osgdem(
 http://alphapixel.com/content/openscengraph-virtual-planet-builder-osgdem)
 
 
 
 
 
  Feedback welcomed.
 
 
  --
  Chris 'Xenon' Hanson, omo sanza lettere.  http://www.alphapixel.com/ (
 http://www.alphapixel.com/)
  Training • Consulting • Contracting
  3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL
 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
  Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
  @alphapixel (https://twitter.com/alphapixel) facebook.com/alphapixel (
 http://facebook.com/alphapixel) (775) 623-PIXL [7495]
 
   --
  Post generated by Mail2Forum


 Greetings Chris!

 I just learned about it this week so I got a copy to review.

 As far as I can tell, there are not many papers (if any) on this subject
 and VPB is a remarkable tool.

 It's nice to understand the Terrain Theory that the bases to how this
 works.

 I must admit that most of the other paging schemes that I had to deal with
 in the past did not go as far as this and did not do as well.  Mostly
 because they where hacks using preexisting terrain elements that where
 clearly not made for paging. This makes much more sense to me.

 
 David Glenn
 ---
 D Glenn 3D Computer Graphics Entertainment.
 www.dglenn.com

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=54070#54070





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] DatabasePager setTargetMaximumNumberOfPageLOD behavior

2013-05-20 Thread Farshid Lashkari
Hi,

I'm hoping to get some clarification on how the
DatabasePager::setTargetMaximumNumberOfPageLOD is supposed to work. I am
setting this value to 3 in my application. I then use the following
function to create and add PagedLODs the the scene:

void AddPagedLOD()
{
  osg::ref_ptrosg::PagedLOD lod = new osg::PagedLOD;
  lod-addChild( new osg::Group, 10.0f, FLT_MAX );
  lod-setFileName(1,large.osgb);
  lod-setRange(1,0.0f,10.0f);
  root-addChild(lod);
}

When I add 3 PagedLODs to my scene and have them load the file, they are
never released from memory once I leave the active range. This makes sense
since the number PagedLODs is not above the target.

However, when I add 4 PagedLODs then leave the active range, all 4 files
are released from memory. I was expecting only 1 of the files to be
released.

Am I misunderstanding the behavior of this setting or should only 1 file be
released in this case?

I had a quick glance at the DatabasePager source and was able to make two
small changes to get the behavior I was expecting. However, I don't have
much experience dealing with PagedLODs and wanted to verify that this
should be the correct behavior before submitting a patch.

Cheers,
Farshid
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D mice

2013-05-20 Thread Thomas Lerman
I do not want the SpaceMouse to be completely independent of the mouse/keyboard 
control of the view . . . I was to be able to control it with either or both.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54080#54080





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org