Re: [osg-users] current View Point

2008-12-17 Thread olfat ibrahim
i have two viewers and put the scene in groups one for the whole scene and one 
for the pointer i want to move:

osg::Group* root = new osg::Group; // groupp have all other objects
osg::Group* Mainroot = new osg::Group; // the whole scene
Mainroot-addChild(root);

osgViewer::Viewer viewer;
osgViewer::Viewer viewer1;

//set left camera for left view
osg::ref_ptrosg::Camera cameraL = new osg::Camera;
...
// add the matrix transformation 
osg::MatrixTransform* mt = new osg::MatrixTransform;
mt-setMatrix( cameraL-getViewMatrix() );
mt-addChild( loadedMode35 );
Mainroot-addChild(mt);

viewer.setCameraManipulator( keyswitchManipulatorL.get() );

//set right camera for the right view
osg::ref_ptrosg::Camera cameraR = new osg::Camera;

viewer1.setCameraManipulator( keyswitchManipulatorR.get() );



//load data for each viewer
viewer.setSceneData( root);
viewer1.setSceneData( Mainroot);


//run the viewer
while( !viewer.done() )
{
// fire off the cull and draw traversals of the scene.
viewer.frame();
viewer1.frame();

}

now the object i used did not move what is the problem ??

--- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

 From: Vincent Bourdier vincent.bourd...@gmail.com
 Subject: Re: [osg-users] current View Point
 To: olfat_ibra...@yahoo.com, OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
 Date: Wednesday, December 17, 2008, 2:46 AM
 Hi,
 
 Please, make replies to your posts ! do not make a new
 thread each time ...
 If you reply to your post, we will have all the mailing
 history of this
 question, and we can see the evolution of the problem.
 
 Next, just with this code, we cannot see what the problem
 is.
 Tell us what is good in your code, what you want to do with
 this code...
 
 For your problem : maybe it works, but you need a callback
 or a loop to see
 the matrix changing in real-time... Not easy to understand
 this little peace
 of code without more explanations.
 
 Regards,
Vincent.
 
 2008/12/16 olfat ibrahim olfat_ibra...@yahoo.com
 
  hi :
 
  iam creating a program that have two windows one i
 make a drive in it and
  the other is like a map i want to put indecator in the
 2nd window that
  indicate my current position in the first one
 
  i used the following code but nothing happend:
 
 
  // Projection and ModelView matrices
 osg::Matrixd proj;
 osg::Matrixd mv;
  ...
  proj = cameraL-getProjectionMatrix();
 
   mv = cameraL-getViewMatrix();
 // Create parent MatrixTransform to
 transform the view
  volume by
 // the inverse ModelView matrix.
 osg::MatrixTransform* mt = new
 osg::MatrixTransform;
 mt-setMatrix(
 osg::Matrixd::inverse( mv ) );
 mt-addChild( loadedMode35 );
 Mainroot-addChild(mt);
 
  ...
 
 
  can some one tell me where iam going wrong ??
 
 
  tahnks
 
 
 
 
  ___
  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] current View Point

2008-12-17 Thread Vincent Bourdier
Each frame, you have to update your matrix. For the moment you set it, next
you frame() the viewer, nothing more. Matrix will no update itself.

To update it, do it in the viewer loop (after/before frame()), or create a
new nodeCallback. Have a look on nodeCallback to see how to use it.

Regards,
   Vincent.

2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com

 i have two viewers and put the scene in groups one for the whole scene and
 one for the pointer i want to move:

 osg::Group* root = new osg::Group; // groupp have all other objects
osg::Group* Mainroot = new osg::Group; // the whole scene
Mainroot-addChild(root);

 osgViewer::Viewer viewer;
 osgViewer::Viewer viewer1;

 //set left camera for left view
 osg::ref_ptrosg::Camera cameraL = new osg::Camera;
 ...
 // add the matrix transformation
 osg::MatrixTransform* mt = new osg::MatrixTransform;
 mt-setMatrix( cameraL-getViewMatrix() );
 mt-addChild( loadedMode35 );
Mainroot-addChild(mt);

 viewer.setCameraManipulator( keyswitchManipulatorL.get() );

 //set right camera for the right view
 osg::ref_ptrosg::Camera cameraR = new osg::Camera;

 viewer1.setCameraManipulator( keyswitchManipulatorR.get() );



 //load data for each viewer
 viewer.setSceneData( root);
 viewer1.setSceneData( Mainroot);


 //run the viewer
 while( !viewer.done() )
{
// fire off the cull and draw traversals of the scene.
viewer.frame();
viewer1.frame();

}

 now the object i used did not move what is the problem ??

 --- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

  From: Vincent Bourdier vincent.bourd...@gmail.com
  Subject: Re: [osg-users] current View Point
  To: olfat_ibra...@yahoo.com, OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
  Date: Wednesday, December 17, 2008, 2:46 AM
  Hi,
 
  Please, make replies to your posts ! do not make a new
  thread each time ...
  If you reply to your post, we will have all the mailing
  history of this
  question, and we can see the evolution of the problem.
 
  Next, just with this code, we cannot see what the problem
  is.
  Tell us what is good in your code, what you want to do with
  this code...
 
  For your problem : maybe it works, but you need a callback
  or a loop to see
  the matrix changing in real-time... Not easy to understand
  this little peace
  of code without more explanations.
 
  Regards,
 Vincent.
 
  2008/12/16 olfat ibrahim olfat_ibra...@yahoo.com
 
   hi :
  
   iam creating a program that have two windows one i
  make a drive in it and
   the other is like a map i want to put indecator in the
  2nd window that
   indicate my current position in the first one
  
   i used the following code but nothing happend:
  
  
   // Projection and ModelView matrices
  osg::Matrixd proj;
  osg::Matrixd mv;
   ...
   proj = cameraL-getProjectionMatrix();
  
mv = cameraL-getViewMatrix();
  // Create parent MatrixTransform to
  transform the view
   volume by
  // the inverse ModelView matrix.
  osg::MatrixTransform* mt = new
  osg::MatrixTransform;
  mt-setMatrix(
  osg::Matrixd::inverse( mv ) );
  mt-addChild( loadedMode35 );
  Mainroot-addChild(mt);
  
   ...
  
  
   can some one tell me where iam going wrong ??
  
  
   tahnks
  
  
  
  
   ___
   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] Removing the tgz, osgtgz and zip plugins

2008-12-17 Thread Michael Bosse'
I doubt very seriously that it would take much effort to port these to
a less hackish method. If I get some free time, i'll look into doing
it.


It is only necessary to make war with five things: with the maladies
of the body, with the ignorances of the mind, with the passions of the
body, with the seditions of the city, with the discords of families.
- Tacitus

The desire for safety stands against every great and noble
enterprise. - Tacitus

Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety. - Benjamin
Franklin

Numquam ponenda est pluralitas sine necessitate. - William of Ockham



On Wed, Dec 17, 2008 at 1:42 AM, Gordon Tomlinson
gor...@gordon-tomlinson.com wrote:
 I use them and would not want to lose them, IVE, OSGA is not a suitable
 replacement for me

 I don't see why they need to removed they work( maybe not to everyone's
 liking but they work ), they're useful to some

 As to re-implementation , who's going to pay my company for the time and
 expenses to re-rite these go through all r
 Testing ands sign off procedures ?

 Why change something that is not broken, might not be the best solution but
 they work


 

 Capture the magic of Christmas this year see http://www.capturethemagic.com
 
 __
 Gordon Tomlinson

 gor...@gordontomlinson.com
 IM: gordon3db...@3dscenegraph.com
 www.vis-sim.com www.gordontomlinson.com
 
 __


 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
 Sent: Tuesday, December 16, 2008 11:56 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Removing the tgz, osgtgz and zip plugins

 Ulrich Hertlein wrote:
 I agree that the implementation is hacky but the functionality is
 definitively
 useful
 (speaking for zip files only):
 - they are a common way to distribute a complete model (non-OSG objects,
 textures, etc.)
 - they can be easily created by the artists, no need to have OSG installed
 - usable by other packages; .osg, .osga, and .ive are leaf file formats if
 you
 will


 That, and couldn't they be re-implemented using zlib (which is already
 necessary for the png plugin)?

 --J

 ___
 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] [osgAL] Link error in release

2008-12-17 Thread Sukender
Hi Anna,

It was so obvious that I didn't see it! Yes, adding the lib into the project 
fixed it. I was so sure that could not be so simple that I didn't even checked 
it.
Thank you very much.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Le Wed, 17 Dec 2008 00:28:42 +0100, Anna Sokol annaso...@gmail.com a écrit:

 Hi Sukender,

 unresolved external symbol unsigned int __thiscall
 OpenThreads::Atomic::operator++()
 referenced in function osg::ref_ptrosgDB::DotOsgWrapper  
 osg::ref_ptrclass
 osgDB::DotOsgWrapper::operator=(osgDB::DotOsgWrapper *)

 The above error occurs because OpenThreads is not included in the
 library dependencies for osgAL.
 This didn't cause any errors with osg2.4 but did cause compile errors
 with osg2.6. and osg2.6.1 .
 By including OpenThreads library dependency the compile errors went
 away with osg2.6 and osg2.6.1 .
 I haven't tried to compile with osg2.7.x or the osg SVN. There might
 be additional incompatibilities there.
 I used Microsoft Visual Studio 2005 to compile.
 Hope this helps.

  - Anna
 ___
 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] Help Rendering and Reading Floating Point Textures

2008-12-17 Thread David Spilling
Brian, JP,

The osgmultiplerendertargets example uses (by default) GL_FLOAT_RGBA32_NV,
rather than either GL_RGBA32F_ARB, or even GL_RGBA16F_ARB. Could this be a
card issue?

I would be interested to know whether this example works for you if you
change to GL_RGBA32F_ARB or GL_RGBA16F_ARB. I admit, I haven't tried it
myself yet - and now intend to - but certainly in my own app (on ATI), I
have had issues with GL_RGBA16F_ARB and GL_FLOAT in the past. Things might
be better now.

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


Re: [osg-users] osg firefox plugin alpha

2008-12-17 Thread Ralph Kern
Hi all,

the LD_LIBRARY_PATH issue for the linux plugin is still annoying.

I tried to use a proxy shared lib, which sets up an appriopriate path
using setenv() and then calls dlopen() on the plugin lib.

But it fails because LD_LIBRARY_PATH is only evaluated once during
startup of the firefox program. It cannot be manipulated later.

any more ideas?

regards Ralph

Ralph Kern schrieb:
 Hi Andreas,
 
 I'm making some progress in the linux port. I already can see the models
 on your page, but only if I start firefox with LD_LIBRARY_PATH set to
 the plugin directory.
 
 Now I need to search for some hack to port your library search path
 extensions to linux. This is not easy, because the plugin is not lazily
 loaded like in Windows. And there's no SetDllDirectory like in Windows.
 
 So I need to find a way to patch the search path before the FF plugin is
 loaded, otherwise the load fails because it cannot locate libosgdb.so
 and libosgViewer.so.
 
 I think the right path is to have a proxy plugin, which manipulates the
 path and then loads the correct plugin using dlopen().
 
 If someone knows a better way, let me know!
 
 Regards Ralph
 
 
 
 Andreas Goebel schrieb:
 Hi,

 I have changed a little bit in the xpi and in the plugin itself. It now
 not only adds the plugin-directory to the osg-file-path, but to the
 windows-dll-search-path. This worked at least on my machine to enable
 .ive-support without having the osg-libs in your path.

 Please: Those people who didn´t see the lower three models, uninstall
 the old plugin, install the new one and try. Note that that function
 (named SetDllDirectory ) is only available from WinXP SP1 onwards, so
 this plugin won´t work with older windows versions. I think that only
 very few people are using older windows now.

 Hope this works ...


 Regards,

 Andreas
 ___
 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] Build error on MAc OSX 10.4 and OSG 2.7.4

2008-12-17 Thread Robert Osfield
Hi Paul,

I believe this one has already been addressed in the 2.7.x dev series,
could you try 2.7.7 or svn/trunk.

Robert.

On Wed, Dec 17, 2008 at 4:11 PM, Paul Fotheringham osg_u...@yahoo.co.uk wrote:
 Hi,

 I think I know what the problem is. I'm getting the same unresolved symbols 
 building on MacOS 10.4 and OSG 2.6.1 using cmake. Your link line has

 /usr/lib/libm.dylib

 rather than your SDK version of the library. I don't know much about these 
 things myself as I've only been using a Mac for about 1 day now but this blog 
 entry details the issue

 http://www.red-sweater.com/blog/246/missing-link

 As far as cmake goes, and I've only been looking at _that_ for about 2 days, 
 it seems the problem is in the top-level CMakeLists.txt file where it has the 
 line

 FIND_LIBRARY(MATH_LIBRARY m)

 wrapped in an IF(UNIX) clause.

 I think this particular line should also be wrappend in an IF(NOT APPLE) 
 clause. Doing this fixes up the link lines for me and the problem goes away. 
 As I say I'm certainly no Mac expert so maybe this isn't quite right. I'm 
 certainly not confident enough to post it to osg-submissions :)

 I haven't looked at the Xcode project at all but I imagine something similar 
 must be going on there?

 Paul Fotheringham




 ___
 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] An observation on the 2.7.7 dae plugin build

2008-12-17 Thread Roger James




I don't use the osg third party sources, preferring to keep my own
copies of dependant libary sources. So I switch on the advanced mode of
CMake and fill in my own include and library locations. I filled in (I
think they may actually have been filled in automatically, but I am not
going back to check)

COLLADA_DYNAMIC_LIBRARY, COLLADA_DYNAMIC_LIBRARY_DEBUG,
COLLLADA_STATIC_LIBRAY, COLLADA_STATIC_LIBRARY_DEBUG

and I set COLLADA_USE_STATIC to OFF.

However I still got a static build, which gave me errors as it could
not find my libxml2 library (another problem!). The only way I could
get a dynamic build was to set the entries for the the static libraries
to empty. I find this a bit confusing as the help for
COLLADA_USE_STATIC says "Set to ON to build OpenSceneGraph with static
Collada support".

Enjoy,

Roger




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


[osg-users] Bypassing the use of the CURL plugin for all http requests

2008-12-17 Thread Jason Beverage
Hi Robert,

Is there a way to bypass the use of the CURL plugin for all http requests?
For most cases this is nice, but I'm working on a few plugins where it would
be very beneficial to simply have the full URL passed in so that I can deal
with it myself rather than having CURL try to download the file.  The
workaround I've been using currently is sticking a prefix on the address and
having my plugin strip it off before it uses it.

So, something like osgviewer server:http://www.server.com/myfile.extension.
This works well so far, I'm just curious if there is a better way.  Maybe an
option in ReaderWriterOptions?

Thanks!

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


Re: [osg-users] osgPPU v0.3 cycles problem (Art Tevs)

2008-12-17 Thread alexandre amyot murray
It does work fine.

Thanks

 Hi Alexandre,


 The problem is that from somewhere in the osg there is a node visitor
running over the osgPPU pipeline which hasn't specified type. I would expect
here to run the update visitor first, but there is some other visitor
running, and I do not know which one ;(, because the visitor has no
specified type information (getVisitorType() returns just NODE_VISITOR).

 I have updated the trunk version of osgPPU. It seems the problems with the
cycles are gone now. Test it out. If you would like to stay on version 0.3
of osgPPU, then you have to rewrite the ::traverse method of Processor.cpp
from the trunk in your copy of osgPPU.

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


Re: [osg-users] osgVolume development report?

2008-12-17 Thread Robert Osfield
Hi Aitor,

The Joint Medical Visualization Project that funds my work on
osgVolume has had me address the multi-media side of the 3D
educational lectures that project is about, this has meant working on
Pdf readers, Vnc clients and Browers in 3D, rather than push on with
osgVolume.  osgVolume isn't forgotten though, just a bit delayed by
the shuffle of priorities.

This week I'll be spending a day porting the volume rendering
functionality from the osgvolume example into osgVolume, this will
serve as the basis for osgVolume for the OSG-2.8 release.  It won't be
too sophisticated, just basic shader based ray tracing and iso surface
rendering.  A big chunk of osgVolume is the Dicom loader, and this is
already available in svn/trunk, although used in conjunction with the
osgvolume example right now rather than generate osgVolume nodes,
although for 2.8 this should be available.

Robert.

On Wed, Dec 17, 2008 at 3:30 PM, Aitor Moreno aitormor...@gmail.com wrote:
 Hi all,

 I read in previous mails that the osgVolume is currently being implemented
 with a bunch of new functionality that would be great. In the SVN, I can see
 that there is some uploaded source code
 (http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgVolume),
 but it seems to be the very first steps of the development (no commits in
 the last 3 months).

 Can any involved developer write a few lines about the state of the
 osgVolume?

 Thanks in advance.

 --
 Aitor Moreno
   aitormoreno [...@] gmail.com


 ___
 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] Bypassing the use of the CURL plugin for all http requests

2008-12-17 Thread Robert Osfield
Hi Jason,

The only way I can think of right now to bpass the http/curl mechanism
in the Registry would to have Registry::ReadFileCallback that catches
the reads and then passes it to your custom code on demand.

This behaviour is something that really should be configurable in a so
that one can control how the protocol prefixes are handled.  This
would require mods to Registry.  Perhaps via a callback that allows
you to override the default behaviour.

The other route would be to have the option of simply disabling the
use of the curl plugin in case of http prefix, such as via
ReaderWriter::Options.

Right now I'm very busy with other work so can't go diving into code,
you're welcome to come up with a Registry revision.  The second of the
above suggestions feels like the most reusable solution to me.

Robert.

On Wed, Dec 17, 2008 at 6:01 PM, Jason Beverage jasonbever...@gmail.com wrote:
 Hi Robert,

 Is there a way to bypass the use of the CURL plugin for all http requests?
 For most cases this is nice, but I'm working on a few plugins where it would
 be very beneficial to simply have the full URL passed in so that I can deal
 with it myself rather than having CURL try to download the file.  The
 workaround I've been using currently is sticking a prefix on the address and
 having my plugin strip it off before it uses it.

 So, something like osgviewer server:http://www.server.com/myfile.extension.
 This works well so far, I'm just curious if there is a better way.  Maybe an
 option in ReaderWriterOptions?

 Thanks!

 Jason

 ___
 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] Frame buffer object in cull traversal

2008-12-17 Thread guher b
Hi,

Is is possible to use frame buffer objects of opengl without creation of a 
secondary camera in openscenegraph? 

In the single cull traversal phase of the scene graph, I would like to draw one 
specific geode to a FBO and all other geodes to the frame buffer.To do that, in 
the cull traversal of geode (e.g. in user defined cull callback of geode) with 
gl commands, would it be stable to change the render target to a FBO with gl 
command syntax? 

Thanks in advance






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


Re: [osg-users] Bypassing the use of the CURL plugin for all http requests

2008-12-17 Thread Jason Beverage
Thanks Robert,

I'll take a look at it when I get a chance, the prefix route is working out
well right now.

Thanks!

Jason

On Wed, Dec 17, 2008 at 2:05 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Jason,

 The only way I can think of right now to bpass the http/curl mechanism
 in the Registry would to have Registry::ReadFileCallback that catches
 the reads and then passes it to your custom code on demand.

 This behaviour is something that really should be configurable in a so
 that one can control how the protocol prefixes are handled.  This
 would require mods to Registry.  Perhaps via a callback that allows
 you to override the default behaviour.

 The other route would be to have the option of simply disabling the
 use of the curl plugin in case of http prefix, such as via
 ReaderWriter::Options.

 Right now I'm very busy with other work so can't go diving into code,
 you're welcome to come up with a Registry revision.  The second of the
 above suggestions feels like the most reusable solution to me.

 Robert.

 On Wed, Dec 17, 2008 at 6:01 PM, Jason Beverage jasonbever...@gmail.com
 wrote:
  Hi Robert,
 
  Is there a way to bypass the use of the CURL plugin for all http
 requests?
  For most cases this is nice, but I'm working on a few plugins where it
 would
  be very beneficial to simply have the full URL passed in so that I can
 deal
  with it myself rather than having CURL try to download the file.  The
  workaround I've been using currently is sticking a prefix on the address
 and
  having my plugin strip it off before it uses it.
 
  So, something like osgviewer server:
 http://www.server.com/myfile.extension.
  This works well so far, I'm just curious if there is a better way.  Maybe
 an
  option in ReaderWriterOptions?
 
  Thanks!
 
  Jason
 
  ___
  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] osgVolume development report?

2008-12-17 Thread Aitor Moreno
Hi all,

I read in previous mails that the osgVolume is currently being implemented
with a bunch of new functionality that would be great. In the SVN, I can see
that there is some uploaded source code (
http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgVolume),
but it seems to be the very first steps of the development (no commits in
the last 3 months).

Can any involved developer write a few lines about the state of the
osgVolume?

Thanks in advance.

-- 
Aitor Moreno
  aitormoreno [...@] gmail.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Removing the tgz, osgtgz and zip plugins

2008-12-17 Thread Jason Daly

Gordon Tomlinson wrote:

As to re-implementation , who's going to pay my company for the time and
expenses to re-rite these go through all r
Testing ands sign off procedures ?
  


I don't understand this point.  If you get the same functionality, just 
with a real library implementation and not a hacky system() call, why 
would you or your company care?




Why change something that is not broken, might not be the best solution but
they work 
  


To me, because it's not the best solution  is a good enough reason to 
change them (to reimplement them in a non-hacky way).  I agree that they 
should not be removed, though.


--J


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


Re: [osg-users] osg firefox plugin alpha

2008-12-17 Thread Ralph Kern
Hi Andreas,

your proposal is what I have already done:

The current shutdown is:

void nsPluginInstance::shut()
{
#ifdef _WIN32
 subclass it back
SubclassWindow(mhWnd, lpOldProc);
#endif
mThread-cancel();
while (mThread-isRunning())
  sleep(1);
delete mThread;
viewer = NULL;  viewer is destructed here!
mhWnd = NULL;
mInitialized = FALSE;
}

regards Ralph



Andreas Goebel schrieb:
 Hi Ralph,
 
 thanks for porting the plugin. To me the stack-trace sounds as if
 osgViewer tried to make the gl-context current that is no longer
 existant. Maybe Firefox first deletes the window-context and then calls
 the plugins destructor.
 Maybe you could destroy the GL context actively here:
 void nsPluginInstance::shut()
 {
// We add DisableOpenGL
DisableOpenGL( mhWnd, hDC, hRC );
// subclass it back
SubclassWindow(mhWnd, lpOldProc);
mhWnd = NULL;
mInitialized = FALSE;
 }
 instead of waiting for the Viewers destructor to do it.
 
 Regards,
 
 Andreas

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


Re: [osg-users] current View Point

2008-12-17 Thread Vincent Bourdier
Have a look on the Third person view example... You get your code from it,
and this example works well, so you should use it a base code, and modify it
to have what you are looking for.
You will be able to reply yourself I think.

2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com

 sorry for much truble but i looked and found two ways can not understand
 how they work

 the first way is to use call back :

 so i added to the code :


 class UpdateCallback : public osg::NodeCallback
 {
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
std::coutupdate callback - pre traversenodestd::endl;
traverse(node,nv);
std::coutupdate callback - post traversenodestd::endl;
}
 };

 and to the main loop :

 mt-setUpdateCallback(new UpdateCallback());

 but it made no changes.

 the second way :

 i added to the code :


 // Given a Camera, create a wireframe representation of its
 // view frustum. Create a default representation if camera==NULL.
 osg::Node*
 makeFrustumFromCamera( osg::Camera* camera )
 {
osg::Node* loadedMode35 ;
loadedMode35 = osgDB::readNodeFile(red.3DS);

// Projection and ModelView matrices
osg::Matrixd proj;
osg::Matrixd mv;
 if (camera)
{
proj = camera-getProjectionMatrix();
mv = camera-getViewMatrix();
}
else
{
// Create some kind of reasonable default Projection matrix.
proj.makePerspective( 30., 1., 1., 10. );
// leave mv as identity
}

// Get near and far from the Projection matrix.
const double near = proj(3,2) / (proj(2,2)-1.0);
const double far = proj(3,2) / (1.0+proj(2,2));

// Get the sides of the near plane.
const double nLeft = near * (proj(2,0)-1.0) / proj(0,0);
const double nRight = near * (1.0+proj(2,0)) / proj(0,0);
const double nTop = near * (1.0+proj(2,1)) / proj(1,1);
const double nBottom = near * (proj(2,1)-1.0) / proj(1,1);

// Get the sides of the far plane.
const double fLeft = far * (proj(2,0)-1.0) / proj(0,0);
const double fRight = far * (1.0+proj(2,0)) / proj(0,0);
const double fTop = far * (1.0+proj(2,1)) / proj(1,1);
const double fBottom = far * (proj(2,1)-1.0) / proj(1,1);


// Create parent MatrixTransform to transform the view volume by
// the inverse ModelView matrix.
osg::MatrixTransform* mt = new osg::MatrixTransform;
mt-setMatrix( osg::Matrixd::inverse( mv ) );
mt-addChild( loadedMode35 );

 return mt;
 }


 and i was suppose to change the loop to :

 while (!viewer.done())
{
// Update the wireframe frustum
root-removeChild( 0, 1 );
root-insertChild( 0, makeFrustumFromCamera(
viewer.getView( 0 )-getCamera() ) );

viewer.frame();
}


 but i was not sure what is this suppose to do ??
 also i did not find viewer.getView function or equivelant to it


 is there some way to help me fix or understand one of the two previous ways
 or is there a way to directly update the node positon from the camira
 position in the loop like using :

 osg::NodeCallback* nc = new osg::AnimationPathCallback(
 ),osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees());
transform-setUpdateCallback(nc);

 or transform(x,y,z)
   rotate (h,p,r);

 and get it directly from the current camera position matrix ?


 please help
 --- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

  From: Vincent Bourdier vincent.bourd...@gmail.com
  Subject: Re: [osg-users] current View Point
  To: olfat_ibra...@yahoo.com, OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
  Date: Wednesday, December 17, 2008, 3:09 AM
  Each frame, you have to update your matrix. For the moment
  you set it, next
  you frame() the viewer, nothing more. Matrix will no update
  itself.
 
  To update it, do it in the viewer loop (after/before
  frame()), or create a
  new nodeCallback. Have a look on nodeCallback to see how to
  use it.
 
  Regards,
 Vincent.
 
  2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com
 
   i have two viewers and put the scene in groups one for
  the whole scene and
   one for the pointer i want to move:
  
   osg::Group* root = new osg::Group; // groupp have all
  other objects
  osg::Group* Mainroot = new osg::Group; // the
  whole scene
  Mainroot-addChild(root);
  
   osgViewer::Viewer viewer;
   osgViewer::Viewer viewer1;
  
   //set left camera for left view
   osg::ref_ptrosg::Camera cameraL = new
  osg::Camera;
   ...
   // add the matrix transformation
   osg::MatrixTransform* mt = new osg::MatrixTransform;
   mt-setMatrix(
  cameraL-getViewMatrix() );
   mt-addChild( loadedMode35 );
  Mainroot-addChild(mt);
  
   viewer.setCameraManipulator(
  keyswitchManipulatorL.get() );
  
   //set right camera for the right view
   osg::ref_ptrosg::Camera cameraR = new
  osg::Camera;
  
   viewer1.setCameraManipulator(
  

Re: [osg-users] osg firefox plugin alpha

2008-12-17 Thread Robert Osfield
Hi Ralf,

I don't have any fresh ideas for solving the path issue, save perhaps
for installing the OSG in standard paths.

The alternative to playing with paths is to try a static build of the
OSG and your plugin.

Robert.

On Wed, Dec 17, 2008 at 9:35 AM, Ralph Kern usene...@rk-se.de wrote:
 Hi all,

 the LD_LIBRARY_PATH issue for the linux plugin is still annoying.

 I tried to use a proxy shared lib, which sets up an appriopriate path
 using setenv() and then calls dlopen() on the plugin lib.

 But it fails because LD_LIBRARY_PATH is only evaluated once during
 startup of the firefox program. It cannot be manipulated later.

 any more ideas?

 regards Ralph

 Ralph Kern schrieb:
 Hi Andreas,

 I'm making some progress in the linux port. I already can see the models
 on your page, but only if I start firefox with LD_LIBRARY_PATH set to
 the plugin directory.

 Now I need to search for some hack to port your library search path
 extensions to linux. This is not easy, because the plugin is not lazily
 loaded like in Windows. And there's no SetDllDirectory like in Windows.

 So I need to find a way to patch the search path before the FF plugin is
 loaded, otherwise the load fails because it cannot locate libosgdb.so
 and libosgViewer.so.

 I think the right path is to have a proxy plugin, which manipulates the
 path and then loads the correct plugin using dlopen().

 If someone knows a better way, let me know!

 Regards Ralph



 Andreas Goebel schrieb:
 Hi,

 I have changed a little bit in the xpi and in the plugin itself. It now
 not only adds the plugin-directory to the osg-file-path, but to the
 windows-dll-search-path. This worked at least on my machine to enable
 .ive-support without having the osg-libs in your path.

 Please: Those people who didn´t see the lower three models, uninstall
 the old plugin, install the new one and try. Note that that function
 (named SetDllDirectory ) is only available from WinXP SP1 onwards, so
 this plugin won´t work with older windows versions. I think that only
 very few people are using older windows now.

 Hope this works ...


 Regards,

 Andreas
 ___
 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] current View Point

2008-12-17 Thread olfat ibrahim
sorry for much truble but i looked and found two ways can not understand how 
they work 

the first way is to use call back :

so i added to the code :


class UpdateCallback : public osg::NodeCallback
{
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{ 
std::coutupdate callback - pre traversenodestd::endl;
traverse(node,nv);
std::coutupdate callback - post traversenodestd::endl;
}
};

and to the main loop :

mt-setUpdateCallback(new UpdateCallback());

but it made no changes. 
 
the second way :

i added to the code :


// Given a Camera, create a wireframe representation of its
// view frustum. Create a default representation if camera==NULL.
osg::Node*
makeFrustumFromCamera( osg::Camera* camera )
{
osg::Node* loadedMode35 ;
loadedMode35 = osgDB::readNodeFile(red.3DS);

// Projection and ModelView matrices
osg::Matrixd proj;
osg::Matrixd mv;
if (camera)
{
proj = camera-getProjectionMatrix();
mv = camera-getViewMatrix();
}
else
{
// Create some kind of reasonable default Projection matrix.
proj.makePerspective( 30., 1., 1., 10. );
// leave mv as identity
}

// Get near and far from the Projection matrix.
const double near = proj(3,2) / (proj(2,2)-1.0);
const double far = proj(3,2) / (1.0+proj(2,2));

// Get the sides of the near plane.
const double nLeft = near * (proj(2,0)-1.0) / proj(0,0);
const double nRight = near * (1.0+proj(2,0)) / proj(0,0);
const double nTop = near * (1.0+proj(2,1)) / proj(1,1);
const double nBottom = near * (proj(2,1)-1.0) / proj(1,1);

// Get the sides of the far plane.
const double fLeft = far * (proj(2,0)-1.0) / proj(0,0);
const double fRight = far * (1.0+proj(2,0)) / proj(0,0);
const double fTop = far * (1.0+proj(2,1)) / proj(1,1);
const double fBottom = far * (proj(2,1)-1.0) / proj(1,1);


// Create parent MatrixTransform to transform the view volume by
// the inverse ModelView matrix.
osg::MatrixTransform* mt = new osg::MatrixTransform;
mt-setMatrix( osg::Matrixd::inverse( mv ) );
mt-addChild( loadedMode35 );

return mt;
}
 

and i was suppose to change the loop to :

while (!viewer.done())
{
// Update the wireframe frustum
root-removeChild( 0, 1 );
root-insertChild( 0, makeFrustumFromCamera(
viewer.getView( 0 )-getCamera() ) );

viewer.frame();
}


but i was not sure what is this suppose to do ??
also i did not find viewer.getView function or equivelant to it 


is there some way to help me fix or understand one of the two previous ways or 
is there a way to directly update the node positon from the camira position in 
the loop like using :

osg::NodeCallback* nc = new osg::AnimationPathCallback( 
),osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees());
transform-setUpdateCallback(nc);

or transform(x,y,z)
   rotate (h,p,r);

and get it directly from the current camera position matrix ?


please help
--- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

 From: Vincent Bourdier vincent.bourd...@gmail.com
 Subject: Re: [osg-users] current View Point
 To: olfat_ibra...@yahoo.com, OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
 Date: Wednesday, December 17, 2008, 3:09 AM
 Each frame, you have to update your matrix. For the moment
 you set it, next
 you frame() the viewer, nothing more. Matrix will no update
 itself.
 
 To update it, do it in the viewer loop (after/before
 frame()), or create a
 new nodeCallback. Have a look on nodeCallback to see how to
 use it.
 
 Regards,
Vincent.
 
 2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com
 
  i have two viewers and put the scene in groups one for
 the whole scene and
  one for the pointer i want to move:
 
  osg::Group* root = new osg::Group; // groupp have all
 other objects
 osg::Group* Mainroot = new osg::Group; // the
 whole scene
 Mainroot-addChild(root);
 
  osgViewer::Viewer viewer;
  osgViewer::Viewer viewer1;
 
  //set left camera for left view
  osg::ref_ptrosg::Camera cameraL = new
 osg::Camera;
  ...
  // add the matrix transformation
  osg::MatrixTransform* mt = new osg::MatrixTransform;
  mt-setMatrix(
 cameraL-getViewMatrix() );
  mt-addChild( loadedMode35 );
 Mainroot-addChild(mt);
 
  viewer.setCameraManipulator(
 keyswitchManipulatorL.get() );
 
  //set right camera for the right view
  osg::ref_ptrosg::Camera cameraR = new
 osg::Camera;
 
  viewer1.setCameraManipulator(
 keyswitchManipulatorR.get() );
 
 
 
  //load data for each viewer
  viewer.setSceneData( root);
  viewer1.setSceneData( Mainroot);
 
 
  //run the viewer
  while( !viewer.done() )
 {
 // fire off the cull and draw traversals of the
 scene.
 viewer.frame();
 viewer1.frame();
 
 }
 
  now the object i used did not move what is the 

Re: [osg-users] osgPPU v0.3 cycles problem

2008-12-17 Thread Art Tevs
Hi Alexandre,


The problem is that from somewhere in the osg there is a node visitor running 
over the osgPPU pipeline which hasn't specified type. I would expect here to 
run the update visitor first, but there is some other visitor running, and I do 
not know which one ;(, because the visitor has no specified type information 
(getVisitorType() returns just NODE_VISITOR).

I have updated the trunk version of osgPPU. It seems the problems with the 
cycles are gone now. Test it out. If you would like to stay on version 0.3 of 
osgPPU, then you have to rewrite the ::traverse method of Processor.cpp from 
the trunk in your copy of osgPPU.

Cheers,
art



--- alexandre amyot murray alex.amyotmur...@gmail.com schrieb am Di, 
16.12.2008:

 Von: alexandre amyot murray alex.amyotmur...@gmail.com
 Betreff: [osg-users] osgPPU v0.3 cycles problem
 An: osg-users@lists.openscenegraph.org
 Datum: Dienstag, 16. Dezember 2008, 22:19
 Hi (Art :) )
 
 I just upgrade osgPPU to version 0.3. After I changed every
 osgPPU::Shader
 to osgPPU::ShaderAttribute, my application still crashes in
 an unexpected
 way.
 
 But after a couple of hours of investigation (I almost went
 back to version
 0.2), I finally found what was the bug. I have a lot of
 UnitInOut in my
 application that add themself to create a specific effect.
 
 Exemple  :
 
 osgPPU::UnitInOut * aUnit = new osgPPU::UnitInOut();
 
 osgPPU::ShaderAttribute* aShaderAttribute = new
 osgPPU::ShaderAttribute();
 aShaderAttribute-addShader(someShader);
 
 aShaderAttribute-add(tex0,
 osg::Uniform::SAMPLER_2D);
 aShaderAttribute-set(tex0, 0);
 aShaderAttribute-add(tex1,
 osg::Uniform::SAMPLER_2D);
 aShaderAttribute-set(tex1, 1);
 
 aUnit-getOrCreateStateSet()-setAttributeAndModes(aShaderAttribute);
 
 previousUnit-addChild( aUnit );
 aUnit-addChild( aUnit );   
 // this
 line seems to not be valid anymore
 
 It seems like this is not a good practice anymore and I
 didn't find a way to
 replicate it.
 
 
 Hope you can help me
 
 Thanks
 
 Alex
 ___
 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] Precipitation effect coming too fast, and hiding on some areas

2008-12-17 Thread Jefferson Pinheiro
Hi Robert,

On Mon, Dec 15, 2008 at 7:55 AM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Fred  Jefferson,

 On Sun, Dec 14, 2008 at 10:49 AM, Frederic Bouvier fredlis...@free.fr
 wrote:
  I have a patch to PrecipitationEffect that seems to work. I'll submit it
  to osg-submissions

 I've just done a review of these changes and don't feel that there are
 mostr straightforward and effecient way to implement what is
 effectively near plan clipping.  The code will make the vertex program
 slower, and not cut down on rasteristation and fill load.

 I feel a better route would be to either:

 1) use two Camera's to depth partition the scene as suggested earlier
 in this thread, as this would give you control over the worlds depth
 range where the precipitation exists


This one works!



 2) Use an osg::ClipPlane to clip the precipitation effect.  Using a
 clip plan would also allow you to control angle of the clipping.


I don't know how to use that (I'm a beginner). Fred, I would be grateful if
you could share your code, if you do it.



 Neither the above routes require any changes to the core OSG, and both
 would not affect the vertex program load, and would clip out fragment
 so would cut down the fragment program load so would be more efficient
 than the submitted fix.

 Could you test out the above suggestions?

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




-- 
Jefferson Pinheiro
(51) 9192 3535
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg firefox plugin alpha

2008-12-17 Thread Ralph Kern
Hi Robert,

I tried now to use the standard installed OpenSceneGraph (Ubuntu 8.10
has osg 2.4.0-1.1). But I find the appropriate include files in the
Ubuntu packages.

I'll try otherway round to install the svn version to see if it works
with standard paths.

regards Ralph

Robert Osfield schrieb:
 Hi Ralf,
 
 I don't have any fresh ideas for solving the path issue, save perhaps
 for installing the OSG in standard paths.
 
 The alternative to playing with paths is to try a static build of the
 OSG and your plugin.
 
 Robert.
 

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


Re: [osg-users] Unknown visitor running first and general visitor types

2008-12-17 Thread Art Tevs
Sorry, I have send the message before completing it:

unsigned int osg::computeVisitorType(const std::string type_id)
{
   return some_hash(type_id);
}

This would enable the possibility to check out which type of visitor is 
currently traversing the node. Also in future releases or in external 
applications with just different visitors there would be a possibility to 
detect visitor types in a simple way.

All osg visitors might be named with osg_ prefix and hence make them more or 
less unique (of course in the limitation of the hash function used).

What about that idea?

art
 It seems that in the current version of osg, there is some
 unknown node visitor running over all of my nodes. The node
 type does return just NODE_VISITOR=0. Hence I do not see any
 way to find out, which type of visitor is traversing there.
 
 Currently there exists so many different node visitors in
 the core osg, that it is somehow very strange to have the
 VisitorType enum only describing couple of them, which are
 even come from osgUtil and not from osg ;). I would propose
 to have here some other kind of identification of a visitor.
 
 What about being the visitor type not an enumeration but an
 integer and create new visitor types by something like a
 hash function over a string or so. Maybe a global method in
 the core osg like:
 unsigned int osg::computeVisitorType(const std::string
 type_id)
 {
 
 }
 
 
 
   
 ___
 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] Unknown visitor running first and general visitor types

2008-12-17 Thread Art Tevs
Hi

yes we could also add some kind of getName() which returns a string. However 
using a hash based approach would have more performance, because only integer 
comparison is needed (if you want to check for the visitor type during a 
traversal call for example). It will also remove the VisitorType enum which 
isn't really covers the whole bunch of visitor types.

cheers,
art




--- Robert Osfield robert.osfi...@gmail.com schrieb am Mi, 17.12.2008:

 Von: Robert Osfield robert.osfi...@gmail.com
 Betreff: Re: [osg-users] Unknown visitor running first and general visitor 
 types
 An: stud_in...@yahoo.de, OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
 Datum: Mittwoch, 17. Dezember 2008, 12:17
 Hi Art,
 
 All osg::Object's have a className() method. 
 NodeVisitor is just
 subclass from osg::Referenced so doesn't have this, but
 we could
 certainly add it, it'd be less effort and more
 informative than the
 coming up with some hashmap scheme.
 
 Robert.
 
 On Wed, Dec 17, 2008 at 10:30 AM, Art Tevs
 stud_in...@yahoo.de wrote:
  Hi folks,
 
  It seems that in the current version of osg, there is
 some unknown node visitor running over all of my nodes. The
 node type does return just NODE_VISITOR=0. Hence I do not
 see any way to find out, which type of visitor is traversing
 there.
 
  Currently there exists so many different node visitors
 in the core osg, that it is somehow very strange to have the
 VisitorType enum only describing couple of them, which are
 even come from osgUtil and not from osg ;). I would propose
 to have here some other kind of identification of a visitor.
 
  What about being the visitor type not an enumeration
 but an integer and create new visitor types by something
 like a hash function over a string or so. Maybe a global
 method in the core osg like:
  unsigned int osg::computeVisitorType(const
 std::string type_id)
  {
 
  }
 
 
 
 
  ___
  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] osg firefox plugin alpha

2008-12-17 Thread Andreas Goebel

Ralph Kern schrieb:

Hi Robert and others,

I now made an install of the OpenSceneGraph sources.

The FireFox plugin now works insofar it can show Andreas' website examples.

But I have two issues:
- there's some BadMatch XError Event generated (which I just ignore for now)
- when leaving the page, FireFox crashes with an segmentation violation,
and that's a big problem

Stack trace says:
#0  0xaff0ace0 in ?? ()
#1  0xb0734a60 in glXMakeCurrent () from /usr/lib/libGL.so.1
#2  0xb08d8324 in osgViewer::GraphicsWindowX11::makeCurrentImplementation ()
   from /usr/local/lib/libosgViewer.so.48
#3  0xb0b9fd34 in osg::GraphicsContext::makeCurrent ()
   from /usr/local/lib/libosg.so.48
#4  0xb0ba1147 in osg::GraphicsContext::close ()
   from /usr/local/lib/libosg.so.48
#5  0xb08c1f59 in osgViewer::Viewer::~Viewer ()
   from /usr/local/lib/libosgViewer.so.48
#6  0xb1e775d0 in osg::Referenced::unref (this=0xa400134)
at ../OpenSceneGraph/include/osg/Referenced:184
#7  0xb1e7763f in osg::ref_ptrosgViewer::Viewer::operator=
(this=0x9afe590,
ptr=0x0) at ../OpenSceneGraph/include/osg/ref_ptr:54
#8  0xb1e75e46 in nsPluginInstance::shut (this=0x9afe580) at plugin.cpp:320
#9  0xb1e78ff3 in NPP_Destroy (instance=0xa1acd48, save=0xbffef4c4)
at npp_gate.cpp:86
#10 0xb78c054d in ?? () from /usr/lib/xulrunner-1.9.0.4/libxul.so
#11 0xb747e092 in ?? () from /usr/lib/xulrunner-1.9.0.4/libxul.so
#12 0xb747e174 in ?? () from /usr/lib/xulrunner-1.9.0.4/libxul.so
[...]

I already switched to SingleThreaded, but with no avail.
  

Hi Ralph,

thanks for porting the plugin. To me the stack-trace sounds as if 
osgViewer tried to make the gl-context current that is no longer 
existant. Maybe Firefox first deletes the window-context and then calls 
the plugins destructor.

Maybe you could destroy the GL context actively here:
void nsPluginInstance::shut()
{
   // We add DisableOpenGL
   DisableOpenGL( mhWnd, hDC, hRC );
   // subclass it back
   SubclassWindow(mhWnd, lpOldProc);
   mhWnd = NULL;
   mInitialized = FALSE;
}
instead of waiting for the Viewers destructor to do it.

Regards,

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


Re: [osg-users] Unknown visitor running first and general visitor types

2008-12-17 Thread Robert Osfield
Hi Art,

All osg::Object's have a className() method.  NodeVisitor is just
subclass from osg::Referenced so doesn't have this, but we could
certainly add it, it'd be less effort and more informative than the
coming up with some hashmap scheme.

Robert.

On Wed, Dec 17, 2008 at 10:30 AM, Art Tevs stud_in...@yahoo.de wrote:
 Hi folks,

 It seems that in the current version of osg, there is some unknown node 
 visitor running over all of my nodes. The node type does return just 
 NODE_VISITOR=0. Hence I do not see any way to find out, which type of visitor 
 is traversing there.

 Currently there exists so many different node visitors in the core osg, that 
 it is somehow very strange to have the VisitorType enum only describing 
 couple of them, which are even come from osgUtil and not from osg ;). I would 
 propose to have here some other kind of identification of a visitor.

 What about being the visitor type not an enumeration but an integer and 
 create new visitor types by something like a hash function over a string or 
 so. Maybe a global method in the core osg like:
 unsigned int osg::computeVisitorType(const std::string type_id)
 {

 }




 ___
 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] Unknown visitor running first and general visitor types

2008-12-17 Thread Art Tevs
Hi folks,

It seems that in the current version of osg, there is some unknown node visitor 
running over all of my nodes. The node type does return just NODE_VISITOR=0. 
Hence I do not see any way to find out, which type of visitor is traversing 
there.

Currently there exists so many different node visitors in the core osg, that it 
is somehow very strange to have the VisitorType enum only describing couple of 
them, which are even come from osgUtil and not from osg ;). I would propose to 
have here some other kind of identification of a visitor.

What about being the visitor type not an enumeration but an integer and create 
new visitor types by something like a hash function over a string or so. Maybe 
a global method in the core osg like:
unsigned int osg::computeVisitorType(const std::string type_id)
{

}



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


[osg-users] my current position

2008-12-17 Thread olfat ibrahim



--- On Wed, 12/17/08, olfat ibrahim olfat_ibra...@yahoo.com wrote:

 From: olfat ibrahim olfat_ibra...@yahoo.com
 Subject: my current position
 To: OSG osg-users@lists.openscenegraph.org
 Date: Wednesday, December 17, 2008, 9:01 AM
 i am using keyswitchManipulator :
 
 i need to print my current location while iam driving in
 the scene :
 
 i tried the functions :
 
 keyswitchManipulatorL-getMatrix()
 viewer.getCamera()-getViewMatrixAsLookAt(eye, center,
 up)
 cameraL-getViewMatrixAsLookAt(eye, center, up)
 
 all of those does not get me my moving statuse .
 i need my x,y,z and h,p,r current position ;
 
 is there a function should i call to get me what i need ?
 
 thanks


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


Re: [osg-users] my current position

2008-12-17 Thread Vincent Bourdier
Hi,

2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com




 --- On Wed, 12/17/08, olfat ibrahim olfat_ibra...@yahoo.com wrote:

  From: olfat ibrahim olfat_ibra...@yahoo.com
  Subject: my current position
  To: OSG osg-users@lists.openscenegraph.org
  Date: Wednesday, December 17, 2008, 9:01 AM
  i am using keyswitchManipulator :
 
  i need to print my current location while iam driving in
  the scene :
 
  i tried the functions :
 
  keyswitchManipulatorL-getMatrix()
  viewer.getCamera()-getViewMatrixAsLookAt(eye, center,
  up)


eye is camera position.



  cameraL-getViewMatrixAsLookAt(eye, center, up)
 
  all of those does not get me my moving statuse .
  i need my x,y,z and h,p,r current position ;
 


Are you sure you get the position each frame ? because theses functions will
give you
vector copy, so if you don't get them each frame, they will not change.

What do you meen by h,r,p ? second camera position ?

Vincent.


  is there a function should i call to get me what i need ?
 
  thanks



 ___
 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] Build error in osgdb_osgAnimation (Windows, SVN)

2008-12-17 Thread Robert Osfield
Thanks JS, fix merged and submitted to SVN.

On Wed, Dec 17, 2008 at 3:04 AM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
 Hi again,

 Perhaps a missing EXPORT or something like that?

 Yep. Fix attached.

 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

 /*  -*-c++-*-
  *  Copyright (C) 2008 Cedric Pinson morni...@plopbyte.net
  *
  * This library is open source and may be redistributed and/or modified
 under
  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  * (at your option) any later version.  The full license is in LICENSE file
  * included with this distribution, and on the openscenegraph.org website.
  *
  * This library 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.  See the
  * OpenSceneGraph Public License for more details.
 */

 #ifndef OSGANIMATION_SKELETON_H
 #define OSGANIMATION_SKELETON_H

 #include osg/MatrixTransform
 #include osgAnimation/Bone
 #include osgAnimation/Export

 namespace osgAnimation
 {

class OSGANIMATION_EXPORT Skeleton : public Bone
{
public:
META_Node(osgAnimation, Skeleton);

struct OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
{
META_Object(osgAnimation, UpdateSkeleton);
UpdateSkeleton() {}
UpdateSkeleton(const UpdateSkeleton us, const osg::CopyOp
 copyop= osg::CopyOp::SHALLOW_COPY) : osg::NodeCallback(us, copyop) {}
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
};

Skeleton(const Skeleton b, const osg::CopyOp copyop=
 osg::CopyOp::SHALLOW_COPY) : Bone(b,copyop) {}
Skeleton();
void setDefaultUpdateCallback(void);
void computeBindMatrix() { _invBindInSkeletonSpace =
 osg::Matrix::inverse(_bindInBoneSpace); }
};

 }

 #endif

 ___
 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] out-of-source builds don't work reliably?

2008-12-17 Thread Don Leich

Hi J-S,

We've never tried multiple platforms with the same in-source tree,
and I wouldn't expect that it should work. However, I would expect that
we'd be able to build debug and release versions for a single platform
in the same in-source tree.  Has this been working reliably for you?

We've been trying to set up all builds as out of source with exceptions
for Windows (because of our network more than any other reason), and now
Mac OS X.  These platforms each have their own source trees.

Thanks again for your help and experience with this.  On your advice I'll
stick with out-for-source for 32 and 64 bit Linux.

-Don

Jean-Sébastien Guay wrote:

Hi Don,

Because of way our network is set up we build Windows on a seperate 
drive,

so it's always been built in-source.  We have several flavors of Linux,
Mac, and maybe even Solaris (if we get around to it) that I've been 
trying

to build off the same source directory.



Well, building multiple platforms in-source in the same source tree (or 
in the same build/ directory, or installing to the same directory) isn't 
a good idea in general. Apart from the fact that the Config file (for 
both OpenThreads and OSG) will be (and must be) different on different 
platforms, it can introduce subtle problems, especially for similar 
platform like unices (which will typically use the same filenames for 
shared objects, for example).


I think you may be making things difficult for yourself :-)

My advice: build out-of-source, and use the install target. I find it's 
easier to have control over what you get that way.


J-S


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


Re: [osg-users] Removing the tgz, osgtgz and zip plugins

2008-12-17 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gordon Tomlinson wrote:
 I use them and would not want to lose them, IVE, OSGA is not a suitable
 replacement for me
 
 I don't see why they need to removed they work( maybe not to everyone's
 liking but they work ), they're useful to some
 
 As to re-implementation , who's going to pay my company for the time and
 expenses to re-rite these go through all r
 Testing ands sign off procedures ?
 
 Why change something that is not broken, might not be the best solution but
 they work 

Completely seconded. Maybe they should be reimplemented using a better
method, but to throw out support for zip files would be a mistake - it
is infinitely easier to move models around in a zip file than to explain
to a designer how to make an osga file or ive file, requiring extra
tools and so on. It is also easier to archive such models - everything
is in one place and I can always open them. IVE or osga formats can
change over time and I cannot load them back into a modeling tool.

I think these should be kept and perhaps fixed.

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJSOYEn11XseNj94gRAlLOAKCH0CsenXYQXdabzb4Txlxc15p/qgCgrNTQ
HrcqqLag/v1RDl7nFpxIy0M=
=5Kdv
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help Rendering and Reading Floating Point Textures

2008-12-17 Thread J.P. Delport

Hi David,

David Spilling wrote:

Brian, JP,

The osgmultiplerendertargets example uses (by default) 
GL_FLOAT_RGBA32_NV, rather than either GL_RGBA32F_ARB, or even 
GL_RGBA16F_ARB. Could this be a card issue?


Yes, if I remember correctly, at the time I made the example I was 
fiddling with various settings. On the card I tested, the 
GL_FLOAT_RGBA32_NV was faster than GL_RGBA32F_ARB.


There is no real reason to not use the ARB formats. I'll submit a 
modified example with the NV options commented out and documented.




I would be interested to know whether this example works for you if you 
change to GL_RGBA32F_ARB or GL_RGBA16F_ARB. I admit, I haven't tried it 
myself yet - and now intend to - but certainly in my own app (on ATI), I 
have had issues with GL_RGBA16F_ARB and GL_FLOAT in the past. Things 
might be better now.


I know GL_RGBA32F_ARB and GL_FLOAT work fine, we use it all the time on 
NVidia 8-series and up.


I've just tested GL_RGBA16F_ARB with GL_FLOAT and it works fine after I 
replaced all e-12 and e12 with e-3 and e3. This is on GeForce 7400Go.


jp




David




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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] osg firefox plugin alpha

2008-12-17 Thread Ralph Kern
Hi Andreas,

just browsed along through the sources, it seems the right time to
handle the viewer destruction is in nsPluginInstance::SetWindow() when
called with NULL:

see
http://devedge-temp.mozilla.org/library/manuals/2002/plugin/1.0/npp_api12.html

and

npp_gate.cpp:
 // during this call we know when the plugin window is ready or
 // is about to be destroyed so we can do some gui specific
 // initialization and shutdown
 NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
 {
   if(instance == NULL)
 return NPERR_INVALID_INSTANCE_ERROR;
 
   NPError rv = NPERR_NO_ERROR;
 
   if(pNPWindow == NULL)
 return NPERR_GENERIC_ERROR;
 
   nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance-pdata;
 
   if(plugin == NULL) 
 return NPERR_GENERIC_ERROR;
 
   // window just created
   if(!plugin-isInitialized()  (pNPWindow-window != NULL)) { 
 if(!plugin-init(pNPWindow)) {
   NS_DestroyPluginInstance(plugin);
   return NPERR_MODULE_LOAD_FAILED_ERROR;
 }
   }
 
   // window goes away
   if((pNPWindow-window == NULL)  plugin-isInitialized())
 return plugin-SetWindow(pNPWindow);   
 
   // window resized?
   if(plugin-isInitialized()  (pNPWindow-window != NULL))
 return plugin-SetWindow(pNPWindow);
 
   // this should not happen, nothing to do
   if((pNPWindow-window == NULL)  !plugin-isInitialized())
 return plugin-SetWindow(pNPWindow);
 
   return rv;
 }

regards Ralph

Ralph Kern schrieb:
 Hi Andreas,
 
 your proposal is what I have already done:
 
 The current shutdown is:
 
 void nsPluginInstance::shut()
 {
 #ifdef _WIN32
    subclass it back
   SubclassWindow(mhWnd, lpOldProc);
 #endif
   mThread-cancel();
   while (mThread-isRunning())
 sleep(1);
   delete mThread;
   viewer = NULL;  viewer is destructed here!
   mhWnd = NULL;
   mInitialized = FALSE;
 }
 
 regards Ralph
 
 
 
 Andreas Goebel schrieb:
 Hi Ralph,

 thanks for porting the plugin. To me the stack-trace sounds as if
 osgViewer tried to make the gl-context current that is no longer
 existant. Maybe Firefox first deletes the window-context and then calls
 the plugins destructor.
 Maybe you could destroy the GL context actively here:
 void nsPluginInstance::shut()
 {
// We add DisableOpenGL
DisableOpenGL( mhWnd, hDC, hRC );
// subclass it back
SubclassWindow(mhWnd, lpOldProc);
mhWnd = NULL;
mInitialized = FALSE;
 }
 instead of waiting for the Viewers destructor to do it.

 Regards,

 Andreas
 

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


Re: [osg-users] Unknown visitor running first and general visitor types

2008-12-17 Thread Robert Osfield
Hi Art,

On Wed, Dec 17, 2008 at 11:33 AM, Art Tevs stud_in...@yahoo.de wrote:
 yes we could also add some kind of getName() which returns a string. However 
 using a hash based approach would have more performance, because only integer 
 comparison is needed (if you want to check for the visitor type during a 
 traversal call for example). It will also remove the VisitorType enum which 
 isn't really covers the whole bunch of visitor types.

Um... I'm absolutely not about to go breaking the API so VisitorType
stays. The VisitorType is very useful for detecting specific types of
visitors such as event visitors, cull visitors etc as these have a
special role in the OSG as they are a fundamental part of each frame.
The rest of the NodeVisitor provided specialist functions.

className() is not getName(), one uses getName() for names of objects,
className() in the OSG is used exclusively for reporting the name of
the class.  This is both useful for serialisation and debugging
purposes.

I'm afraid I don't get the value of hash map in this context, the
performance aspect is trivial as this type of operation is done so
rarely per frame.

I have begun adding className and libraryName and a META_NodeVisitor
macro definition of these to all the core OSG node visitor, you are
welcome use this or ignore them.  I'm certainly not about to drop
existing API's to appease you preferences.

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


Re: [osg-users] please test... SSAO (v1.0)

2008-12-17 Thread Vincent Bourdier
Hi,

Some ref_ptr error in code...

Sorry, but on my old PC shader/OpenGl problem... I will test on newer PC if
I have time.

Regards,

   Vincent.

2008/12/17 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi all ,

 please test this first version of SSAO Effect (Node)

 There is still a problem (512 x 512) texture,
 gaussian filter purly implemented on GPU

 finally i have 10-15 FPS



 /adrian


 --
 
 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] Open Inventor like Sensors in OSG?

2008-12-17 Thread Alejandro Aguilar Sierra
Hi,

In Open Inventor, sensors are special classes that respond when an
object state is changed and call a callback. They were IMHO not very
clean, designed before Design Patterns, but I think they are like
observers or signal/slot objects. Is there anything similar in Open
Scenegraph?

Regards,

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


Re: [osg-users] my current position

2008-12-17 Thread olfat ibrahim
thanks again for your help :

but i have another problem :

while( !viewer.done() || !viewer1.done() )
{
viewer.getCamera()-getViewMatrixAsLookAt(eye, center, up);

cout  eye2   eye.x() eye.y() eye.z() 
 endl;
cout  center   center.x() center.y() 
center.z()  endl;
cout  up   up.x() up.y() up.z()  
endl;

osg::Matrixd m(viewer.getCamera()-getViewMatrix());
mt-setMatrix(osg::Matrix::translate(eye.x(),eye.y(),eye.z())*
osg::Matrix::rotate(m.getRotate().inverse()));


i tried m.getRotate().inverse() and m.getRotate()
they rotate the object but i the wrong way they flip it 
does any one have recomendations ??




--- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

 From: Vincent Bourdier vincent.bourd...@gmail.com
 Subject: Re: [osg-users] my current position
 To: olfat_ibra...@yahoo.com
 Date: Wednesday, December 17, 2008, 9:58 AM
 You can do it using different things:
 
  * You get eye, center, up . With theses vector, you can
 compute the front,
 up, side vectors of the camera, an so compute the rotation.
 (eye is camera position, center is the point the camera
 look at)
 
  * You can get the matrix from the manipulator, and
 getRotation from it. You
 will have the quaternion representing the rotation. (or
 rotation inverse, I
 don't remember)
 
  * you can get the matrix from manipulator, and use
 getFrontVector(...),
 getSidevector() and getUpVector() from it. After that, just
 compute the
 rotation.
 
 Vincent.
 
 
 2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com
 
  you were right thank you very much
  now i need to get the H P R
 
  by H P R i mean the rotation arround x ,y ,  z axis .
 
 
  i tried the three functions in the following mannare :
 
  osg::Vec3f eye;
 osg::Vec3f center;
 osg::Vec3f up;
 
 osg::Vec3f eye1;
 osg::Vec3f center1;
 osg::Vec3f up1;
 
 osg::Vec3f position;
 osg::Matrixd
 m(keyswitchManipulatorL-getCoordinateFrame(position));
 
 while( !viewer.done() || !viewer1.done() )
 {
 cameraL-getViewMatrixAsLookAt(eye1,
 center1, up1);

 viewer.getCamera()-getViewMatrixAsLookAt(eye, center,
 up);
 osg::Matrixd
 
 m(keyswitchManipulatorL-getCoordinateFrame(position));
  //  cout  position.x  
 position.y   position.z  endl;
 cout  eye  
 position.x() position.y()
   
   position.z()  endl;
 
 cout  eye  
 eye.x() eye.y() 
   
  eye.z()  endl;
 cout  center 
  center.x()
 center.y()   
   center.z()  endl;
 cout  up  
 up.x() up.y() 
up.z() 
  endl;
 
 
 cout  eye  
 eye1.x() eye1.y() 
   
  eye1.z()  endl;
 cout  center 
  center1.x()
 center1.y()  
center1.z()  endl;
 cout  up  
 up1.x() up1.y() 
up1.z()
   endl;
 // fire off the cull and draw traversals of the
 scene.
 viewer.frame();
 }
 
  can any ong give me ideas ??
 
 
  --- On Wed, 12/17/08, Vincent Bourdier
 vincent.bourd...@gmail.com wrote:
 
   From: Vincent Bourdier
 vincent.bourd...@gmail.com
   Subject: Re: [osg-users] my current position
   To: olfat_ibra...@yahoo.com, OpenSceneGraph
 Users 
  osg-users@lists.openscenegraph.org
   Date: Wednesday, December 17, 2008, 9:37 AM
   Hi,
  
   2008/12/17 olfat ibrahim
 olfat_ibra...@yahoo.com
  
   
   
   
--- On Wed, 12/17/08, olfat ibrahim
   olfat_ibra...@yahoo.com wrote:
   
 From: olfat ibrahim
   olfat_ibra...@yahoo.com
 Subject: my current position
 To: OSG
   osg-users@lists.openscenegraph.org
 Date: Wednesday, December 17, 2008,
 9:01 AM
 i am using keyswitchManipulator :

 i need to print my current location
 while iam
   driving in
 the scene :

 i tried the functions :

 keyswitchManipulatorL-getMatrix()

 viewer.getCamera()-getViewMatrixAsLookAt(eye,
   center,
 up)
  
  
   eye is camera position.
  
  
   
 cameraL-getViewMatrixAsLookAt(eye,
 center,
   up)

 all of those does not get me my moving
 statuse .
 i need my x,y,z and h,p,r current
 position ;

  
  
   Are you sure you get the position each frame ?
 because
   theses functions will
   give you
   vector copy, so if you don't get them each
 frame, they
   will not change.
  
   What do you meen by h,r,p ? second camera
 position ?
  
   Vincent.
  
  
 is there a function should i call to
 get me what
   i need ?

 thanks
   
   
   
   
 ___
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

Re: [osg-users] principle of Light and LightSource

2008-12-17 Thread Jim Brooks
So, when I want to use more lights I see only the first light.

Thats the graph with two lights:


To render with multiple lights,
arrange the LightSource group nodes vertically:


root
|
V
lightSource 0
|
V
lightSource 1
|
V
  geodes
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-17 Thread Hartmut Seichter


Hi Jose-Luis,

be assured I seen these messages before and also did the whole 
patches/linker flags etc. pp. that were suggested there. Still, the RTTI 
is stripped - so *nix is not going to work. Admittetly, I updated the 
osgLua sources in an intree version and added my own copy of Lua 5.1.4 
into the buildsys (with the patch). Again, I checked that in the whole 
chain mentioned libs are being compiled with these flags.


Its a pitty that this is been ignored by the Lua developers - I can't 
see why it is so outragous difficult to add this options. I will try to 
investigate in more depth - after all this is a very specific use-case.


Are you still working on osgLua? I can flick you a few patches that 
might fix a couple of problems.


Cheers,
Hartmut


Jose Luis Hidalgo wrote:

Hi Hartmut,
  The problem is how lua loads libraries, is an issue that comes from
time to time, and never is important enough to be solved:

http://lua-users.org/lists/lua-l/2007-10/msg00098.html

the answer from Luiz was:

http://lua-users.org/lists/lua-l/2007-10/msg00120.html

Basically that means you can not use osgLua properly from a vanilla
lua interpreter+libraries.

I tried myself to ask for it on the list:

http://lua-users.org/lists/lua-l/2006-11/msg00174.html

But... nothing :(

Hope it helps.

Jose-Luis.
On Mon, Dec 15, 2008 at 9:34 PM, Hartmut Seichter
li...@technotecture.com wrote:

No, not from Lua (or I guess a lua interpreter) itself - I have a wxWidgets
application which loads various plugins and one of them is a based around
osgLua - thus, lua_open etc pp should happen in that context. On Windows and
Mac this whole mechanism works fine - on Linux the RTTI seems to be the
showstopper. I added the Linkerflags mentioned somewhere to the whole chain
of dependencies: App  Plugin  Lua Lib

Any other ideas?


H


Jose Luis Hidalgo wrote:

Hi Hartmut,
  How do you try to load osgLua? from lua itself?

Cheers,
  Jose-Lus.

On Sun, Dec 14, 2008 at 10:25 PM, Hartmut Seichter
li...@technotecture.com wrote:


Hi there,

I am trying to combine the power of osgLua and osgSWIG in a new project
(no
I am not mad :)) ... However, I couldn't get osgLua play nicely on Linux
- I
did all the patching mentioned but no avail. I am on 64bit Ubuntu ... any
idea where things go haywire ... seems that RTTI get still stripped -
print(osg.Node) returns some mangled reference to osgObject.

Cheers,
Hartmut

--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow,
HITLabNZ

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








--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ

___
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] Light Position Behavior

2008-12-17 Thread Ryan Morris
I understand that positioning the camera SHOULD fix my problem, but it
isn't. I have the light positioned at (0,0,100,1) and even after i set my
camera with setViewMatrixAsLookAt it is still trying to view the entire
bounding box of the scene. This is the fix i was looking for when i started
the post =) Looking forward to some guidance! Thanks!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] synchronize two view windows

2008-12-17 Thread olfat ibrahim
hello :

i need to synchronize two view windows .
i created two views and one key switch Manipulator 

i want as i walk in one window my view synchronized in the other window with 
solaly differ view. 

this is my try but it is drive in the first view but no moves happened in the 
second view :

while( !viewer.done() || !viewer1.done() )
{
viewer.getCamera()-getViewMatrixAsLookAt(eye, center, up);
viewer1.getCamera()-setViewMatrixAsLookAt(eye, center, up);

 viewer.frame();
viewer1.frame();
}

what iam doing wrong ?



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


Re: [osg-users] Light Position Behavior

2008-12-17 Thread Ryan Morris
it seems that by using setUpViewerAsEmbeddedInwindow() it does not
reposition based on the world's bounding sphere. interesting for those who
didn't already know that. Anyway hope this helps someone else!
-Rusty

On Wed, Dec 17, 2008 at 5:01 PM, Ryan Morris russell.co...@gmail.comwrote:

 I understand that positioning the camera SHOULD fix my problem, but it
 isn't. I have the light positioned at (0,0,100,1) and even after i set my
 camera with setViewMatrixAsLookAt it is still trying to view the entire
 bounding box of the scene. This is the fix i was looking for when i started
 the post =) Looking forward to some guidance! Thanks!

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


[osg-users] Building the Collada plugin

2008-12-17 Thread R Fritz

OSG 2.6.1, VS 2008.

So far I've downloaded COLLADA_1.4.1_DOM_1.3.0.zip, built it, and got  
a slew of errors trying to build the plugin.  (Collada DOM 2.2, which  
looks like it might be downward compatible, uses a different library  
structure, and I've no idea which files are still needed.)


Which version of Collada is known to work?  Does the plugin work at  
all with VS 2008?


Randolph

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


Re: [osg-users] synchronize two view windows

2008-12-17 Thread Michael Bosse'
Did you remove the camera manipulator for the second view?


It is only necessary to make war with five things: with the maladies
of the body, with the ignorances of the mind, with the passions of the
body, with the seditions of the city, with the discords of families.
- Tacitus

The desire for safety stands against every great and noble
enterprise. - Tacitus

Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety. - Benjamin
Franklin

Numquam ponenda est pluralitas sine necessitate. - William of Ockham



On Wed, Dec 17, 2008 at 8:25 PM, olfat ibrahim olfat_ibra...@yahoo.com wrote:
 hello :

 i need to synchronize two view windows .
 i created two views and one key switch Manipulator

 i want as i walk in one window my view synchronized in the other window with 
 solaly differ view.

 this is my try but it is drive in the first view but no moves happened in the 
 second view :

 while( !viewer.done() || !viewer1.done() )
{
viewer.getCamera()-getViewMatrixAsLookAt(eye, center, up);
viewer1.getCamera()-setViewMatrixAsLookAt(eye, center, up);

  viewer.frame();
viewer1.frame();
}

 what iam doing wrong ?




 ___
 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] my current position

2008-12-17 Thread Vincent Bourdier
Hi,

Try manipulator-getMatrix() instead of camera view matrix...

Next, it is possible to have a rotation of the matrix along X of +/- PI/2...
don't know exactly when or why, but this can help...

Vincent.

2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com

 thanks again for your help :

 but i have another problem :

 while( !viewer.done() || !viewer1.done() )
{
 viewer.getCamera()-getViewMatrixAsLookAt(eye, center, up);

 cout  eye2   eye.x() eye.y()
 eye.z()  endl;
 cout  center   center.x() center.y()   
  center.z()  endl;
cout  up   up.x() up.y() up.z() 
 endl;

 osg::Matrixd m(viewer.getCamera()-getViewMatrix());

  mt-setMatrix(osg::Matrix::translate(eye.x(),eye.y(),eye.z())*
osg::Matrix::rotate(m.getRotate().inverse()));


 i tried m.getRotate().inverse() and m.getRotate()
 they rotate the object but i the wrong way they flip it
 does any one have recomendations ??




 --- On Wed, 12/17/08, Vincent Bourdier vincent.bourd...@gmail.com wrote:

  From: Vincent Bourdier vincent.bourd...@gmail.com
  Subject: Re: [osg-users] my current position
  To: olfat_ibra...@yahoo.com
  Date: Wednesday, December 17, 2008, 9:58 AM
  You can do it using different things:
 
   * You get eye, center, up . With theses vector, you can
  compute the front,
  up, side vectors of the camera, an so compute the rotation.
  (eye is camera position, center is the point the camera
  look at)
 
   * You can get the matrix from the manipulator, and
  getRotation from it. You
  will have the quaternion representing the rotation. (or
  rotation inverse, I
  don't remember)
 
   * you can get the matrix from manipulator, and use
  getFrontVector(...),
  getSidevector() and getUpVector() from it. After that, just
  compute the
  rotation.
 
  Vincent.
 
 
  2008/12/17 olfat ibrahim olfat_ibra...@yahoo.com
 
   you were right thank you very much
   now i need to get the H P R
  
   by H P R i mean the rotation arround x ,y ,  z axis .
  
  
   i tried the three functions in the following mannare :
  
   osg::Vec3f eye;
  osg::Vec3f center;
  osg::Vec3f up;
  
  osg::Vec3f eye1;
  osg::Vec3f center1;
  osg::Vec3f up1;
  
  osg::Vec3f position;
  osg::Matrixd
  m(keyswitchManipulatorL-getCoordinateFrame(position));
  
  while( !viewer.done() || !viewer1.done() )
  {
  cameraL-getViewMatrixAsLookAt(eye1,
  center1, up1);
  
  viewer.getCamera()-getViewMatrixAsLookAt(eye, center,
  up);
  osg::Matrixd
  
  m(keyswitchManipulatorL-getCoordinateFrame(position));
   //  cout  position.x  
  position.y   position.z  endl;
  cout  eye  
  position.x() position.y()

position.z()  endl;
  
  cout  eye  
  eye.x() eye.y() 

   eye.z()  endl;
  cout  center 
   center.x()
  center.y()   
center.z()  endl;
  cout  up  
  up.x() up.y() 
 up.z() 
   endl;
  
  
  cout  eye  
  eye1.x() eye1.y() 

   eye1.z()  endl;
  cout  center 
   center1.x()
  center1.y()  
 center1.z()  endl;
  cout  up  
  up1.x() up1.y() 
 up1.z()
endl;
  // fire off the cull and draw traversals of the
  scene.
  viewer.frame();
  }
  
   can any ong give me ideas ??
  
  
   --- On Wed, 12/17/08, Vincent Bourdier
  vincent.bourd...@gmail.com wrote:
  
From: Vincent Bourdier
  vincent.bourd...@gmail.com
Subject: Re: [osg-users] my current position
To: olfat_ibra...@yahoo.com, OpenSceneGraph
  Users 
   osg-users@lists.openscenegraph.org
Date: Wednesday, December 17, 2008, 9:37 AM
Hi,
   
2008/12/17 olfat ibrahim
  olfat_ibra...@yahoo.com
   



 --- On Wed, 12/17/08, olfat ibrahim
olfat_ibra...@yahoo.com wrote:

  From: olfat ibrahim
olfat_ibra...@yahoo.com
  Subject: my current position
  To: OSG
osg-users@lists.openscenegraph.org
  Date: Wednesday, December 17, 2008,
  9:01 AM
  i am using keyswitchManipulator :
 
  i need to print my current location
  while iam
driving in
  the scene :
 
  i tried the functions :
 
  keyswitchManipulatorL-getMatrix()
 
  viewer.getCamera()-getViewMatrixAsLookAt(eye,
center,
  up)
   
   
eye is camera position.
   
   

  cameraL-getViewMatrixAsLookAt(eye,
  center,
up)
 
  all of those does not get me my moving
  statuse .
  i need my x,y,z and h,p,r current
  position ;
 
   
   
Are you sure you get the position each frame ?
  because
theses functions will
give you
vector copy, so if you don't get them each
  frame, they
will not change.
   
What do you meen by h,r,p ? second camera
  position ?
   
Vincent.
   
   
  is there a function 

Re: [osg-users] please test... SSAO (v1.0)

2008-12-17 Thread Kimmo Kotajärvi
Works nicely, if a bit slow (~15fps) and the window can't be resized correctly.

 

The code was missing three ref_ptr .get()s, so I guess you didn't compile the 
version you attached...

 

http://paahdin.com/shared/images/ssao.png

 



Lähettäjä: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] Puolesta Adrian Egli 
OpenSceneGraph (3D)
Lähetetty: 17. joulukuuta 2008 18:24
Vastaanottaja: OpenSceneGraph Users
Aihe: [osg-users] please test... SSAO (v1.0)

 

Hi all , 

please test this first version of SSAO Effect (Node) 

There is still a problem (512 x 512) texture, 
gaussian filter purly implemented on GPU 

finally i have 10-15 FPS 



/adrian 

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


[osg-users] glXBindTexImage

2008-12-17 Thread Grahame Bowland
Hi all

Has anyone attempted to use glXBindTexImage (and friends) to bind an X11
pixmap to a texture within OpenSceneGraph? You could then display the
contents of an X window on a surface.

I don't think it would be difficult to do, just wondering if it's
already been done - best to avoid duplication of effort!

Thanks
Grahame


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


Re: [osg-users] please test... SSAO (v1.0)

2008-12-17 Thread Adrian Egli OpenSceneGraph (3D)
where are the bugs, my version compiled under VS 2005 (c++) latest SVN
version

/adrian

2008/12/18 Kimmo Kotajärvi kimmo.kotaja...@vianova.fi

  Works nicely, if a bit slow (~15fps) and the window can't be resized
 correctly.



 The code was missing three ref_ptr .get()s, so I guess you didn't compile
 the version you attached…



 http://paahdin.com/shared/images/ssao.png


  --

 *Lähettäjä:* osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] *Puolesta *Adrian Egli
 OpenSceneGraph (3D)
 *Lähetetty:* 17. joulukuuta 2008 18:24
 *Vastaanottaja:* OpenSceneGraph Users
 *Aihe:* [osg-users] please test... SSAO (v1.0)



 Hi all ,

 please test this first version of SSAO Effect (Node)

 There is still a problem (512 x 512) texture,
 gaussian filter purly implemented on GPU

 finally i have 10-15 FPS



 /adrian

 ___
 osg-users mailing list
 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