Re: [osg-users] ANN: osgPython (SWIG) 2.2.0

2008-02-14 Thread Luigi Calori
Thank you very much... it worked!!

 either

%inline %{
osg::Geode *NodeToGeode2(osg::Node *b) {
   return dynamic_castosg::Geode*(b);
}
%}

or

%extend osg::Node {
virtual osg::Geode* asGeode() {return dynamic_castosg::Geode*(self);}
};

The Cmake projects worked fine (just some mods to standard FindOSG), I 
spent some time to find out how to install correctly into site_packages
If I' m correct, the dll must be renamed .pyd and the generated py must 
be copied inside the site_packages
I noticed the compile time of the _osg project is quite slow (at least 
on my machine) do you think it would be possible to split the big osg 
wrapper into smaller pieces to
both speed up build time and separate original (yours) and added (mine)

Do you plan to insert your CMake files into the osgswig svn?
Having things in svn will really help a lot the development
I' m planning to experiment further and then try to  add site_packages 
installation to cmake if do not find a better way to work

thanks again
 Luigi
René Molenaar wrote:

 I read this in the swig manual:

 If you need to cast a pointer or change its value, consider writing 
 some helper functions instead.
 see: http://www.swig.org/Doc1.3/Python.html

%inline %{

/* C++-style cast */
Foo *BarToFoo(Bar *b) {
   return dynamic_castFoo*(b);
}

%}

  

 You can also create the member function node.asGeode() in a similar 
 way with swig. This is a safe and handy method. There might be other 
 options... this way you would need to use swig, and can't use the 
 binary version.

 René



 2008/2/13, Luigi Calori [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

 René Molenaar wrote:

  Swig wrappers for OpenSceneGraph Python and Perl
 
  These files are part of: The VRmeer Library - Delft University of
  Technology
 
  The files are based on osgswig (http://code.google.com/p/osgswig/)
  with some additions and CMake files.
 
 Thanks for the post, I' ll try them as soon as possible, I' m
 currently
 try to learn python and osgswig using the binary version under
 windows XP
 I stumbled upon a problem:

 I would like to parse the one scene, so willing to use  something
 like:


 node = osgDB.readNodeFile('cow.osg')

 while node.className() == 'Group':
 print node.className()
 node = node.asGroup().getChild(0)
 print node.className()

 The problem arise when getChild() returns a Geode.
 There is no  --- node.asGeode()  method so I have no idea of
 how to
 get the handle of a Geode in the scene.

 Sorry for my dumbness, any help really appreciated,

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




___
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] ANN: osgPython (SWIG) 2.2.0

2008-02-13 Thread Luigi Calori
René Molenaar wrote:

 Swig wrappers for OpenSceneGraph Python and Perl

 These files are part of: The VRmeer Library - Delft University of 
 Technology

 The files are based on osgswig (http://code.google.com/p/osgswig/)
 with some additions and CMake files.

Thanks for the post, I' ll try them as soon as possible, I' m currently 
try to learn python and osgswig using the binary version under windows XP
I stumbled upon a problem:

I would like to parse the one scene, so willing to use  something like:


node = osgDB.readNodeFile('cow.osg')

while node.className() == 'Group':
print node.className()
node = node.asGroup().getChild(0)
print node.className()

The problem arise when getChild() returns a Geode.
There is no  --- node.asGeode()  method so I have no idea of how to 
get the handle of a Geode in the scene.

Sorry for my dumbness, any help really appreciated,

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


Re: [osg-users] ANN: osgPython (SWIG) 2.2.0

2008-02-13 Thread René Molenaar
I read this in the swig manual:

If you need to cast a pointer or change its value, consider writing some
helper functions instead.
see: http://www.swig.org/Doc1.3/Python.html

%inline %{

/* C++-style cast */
Foo *BarToFoo(Bar *b) {
   return dynamic_castFoo*(b);
}

%}


You can also create the member function node.asGeode() in a similar way with
swig. This is a safe and handy method. There might be other options... this
way you would need to use swig, and can't use the binary version.

René



2008/2/13, Luigi Calori [EMAIL PROTECTED]:

 René Molenaar wrote:

  Swig wrappers for OpenSceneGraph Python and Perl
 
  These files are part of: The VRmeer Library - Delft University of
  Technology
 
  The files are based on osgswig (http://code.google.com/p/osgswig/)
  with some additions and CMake files.
 
 Thanks for the post, I' ll try them as soon as possible, I' m currently
 try to learn python and osgswig using the binary version under windows XP
 I stumbled upon a problem:

 I would like to parse the one scene, so willing to use  something like:


 node = osgDB.readNodeFile('cow.osg')

 while node.className() == 'Group':
 print node.className()
 node = node.asGroup().getChild(0)
 print node.className()

 The problem arise when getChild() returns a Geode.
 There is no  --- node.asGeode()  method so I have no idea of how to
 get the handle of a Geode in the scene.

 Sorry for my dumbness, any help really appreciated,

 Luigi
 ___
 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] ANN: osgPython (SWIG) 2.2.0

2008-02-12 Thread Hartmut Seichter

Hi René,

I added you to the project. Feel free to add the CMake files etc. pp. As 
somebody down in the thread suggested I might change the layout to the 
traditional trunk/branches/tags layout

Cheers,
Hartmut


René Molenaar wrote:
 I just separated an osgswig cmake project from our larger Library.
 
 Tomorrow I can try to build some of your version of the wrappers in this 
 structure.
 (our version has changed a version of yours here and there).
 
 You can add me to the Project members of the google code page?
 I saw another member on there, I worked with him to create our current 
 version.
 He makes great use of osgPython in combination with IPython gtk and the 
 rest
 of our Library.
 
 Cheers,
 
 René
 
 
 2008/2/12, Hartmut Seichter [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED]:
 
 
 Hi there,
 
 I updated the SWIG based python bindings.
 
 http://code.google.com/p/osgswig/
 
 Please test and break it.
 
 Some, hopefully, clarifying words about licensing:
 
 The generating scripts are under the MIT license. The modules directly
 derived from OpenSceneGraph are following the OSGPL v0.0 or the
 appropriate licenses.
 
 The HITLabNZ (http://www.hitlabnz.org) is promoting the GPL version of
 osgART 1.1, ARToolKit for OpenSceneGraph, with this release. If you are
 using this module you also agree to follow the licensing terms of the
 GPLv2.
 
 Shameless plug :)
 
 If you need a commercial license for osgART or features beyond marker
 based tracking please contact ARToolworks Inc.
 (http://www.artoolworks.com/)
 
 Cheers,
 Hartmut
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 mailto:osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 
 ___
 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] ANN: osgPython (SWIG) 2.2.0

2008-02-12 Thread René Molenaar
I checked and it worked with the word trunk removed,
so try to checkout http://osgswig.googlecode.com/svn/

svn checkout http://osgswig.googlecode.com/svn/ osg-swig-read-only

René


2008/2/12, Jeremy Moles [EMAIL PROTECTED]:

 Just as a head up, it doesn't look like the project was created using
 the standard trunk/tags/branches layout, so the link that the Google
 Source tab provides is wrong...

 On Tue, 2008-02-12 at 19:07 +0100, René Molenaar wrote:
  Swig wrappers for OpenSceneGraph Python and Perl
 
  These files are part of: The VRmeer Library - Delft University of
  Technology
 
  The files are based on osgswig (http://code.google.com/p/osgswig/)
  with some additions and CMake files.
 
  (I currenlty use swigwin 1.3.29 and the current svn trunk of osg but
  other platform and versions are also being used. There is only one
  example, all our other examples make heavy use of
  The VRmeer Library and the vrmswig library.)
 
  You can also just copy the needed cmake files and place them in the
  right
  directories of the online version. To use cmake to build your project.
 
  Good Luck.
 
  Rene Molenaar
 
 
  2008/2/12, Luigi Calori [EMAIL PROTECTED]:
  I would also be interested in Cmake osgswig building
  I, as a novice in both python and Lua, would greatly
  appreciate any
  script example usage.
 
  I' m trying to use the binary version of osgSwig, it seems
  working well
  but some further python example would really help
 
  Is this the right place to ask question regarding osgswig?
 
  thanks in advance and compliments for the work
 
 
  Luigi
 
  René Molenaar wrote:
 
   I just separated an osgswig cmake project from our larger
  Library.
  
   Tomorrow I can try to build some of your version of the
  wrappers in
   this structure.
   (our version has changed a version of yours here and there).
  
   You can add me to the Project members of the google code
  page?
   I saw another member on there, I worked with him to create
  our current
   version.
   He makes great use of osgPython in combination with IPython
  gtk and
   the rest
   of our Library.
  
   Cheers,
  
   René
  
  
   2008/2/12, Hartmut Seichter [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]:
  
  
   Hi there,
  
   I updated the SWIG based python bindings.
  
   http://code.google.com/p/osgswig/
  
   Please test and break it.
  
   Some, hopefully, clarifying words about licensing:
  
   The generating scripts are under the MIT license. The
  modules directly
   derived from OpenSceneGraph are following the OSGPL v0.0
  or the
   appropriate licenses.
  
   The HITLabNZ (http://www.hitlabnz.org) is promoting the
  GPL version of
   osgART 1.1, ARToolKit for OpenSceneGraph, with this
  release. If
   you are
   using this module you also agree to follow the licensing
  terms of the
   GPLv2.
  
   Shameless plug :)
  
   If you need a commercial license for osgART or features
  beyond marker
   based tracking please contact ARToolworks Inc.
   (http://www.artoolworks.com/)
  
   Cheers,
   Hartmut
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
   mailto:osg-users@lists.openscenegraph.org
  
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
 
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

___
osg-users mailing 

Re: [osg-users] ANN: osgPython (SWIG) 2.2.0

2008-02-12 Thread Jeremy Moles
Just as a head up, it doesn't look like the project was created using
the standard trunk/tags/branches layout, so the link that the Google
Source tab provides is wrong...

On Tue, 2008-02-12 at 19:07 +0100, René Molenaar wrote:
 Swig wrappers for OpenSceneGraph Python and Perl
 
 These files are part of: The VRmeer Library - Delft University of
 Technology
 
 The files are based on osgswig (http://code.google.com/p/osgswig/)
 with some additions and CMake files. 
 
 (I currenlty use swigwin 1.3.29 and the current svn trunk of osg but
 other platform and versions are also being used. There is only one 
 example, all our other examples make heavy use of 
 The VRmeer Library and the vrmswig library.)
 
 You can also just copy the needed cmake files and place them in the
 right
 directories of the online version. To use cmake to build your project.
 
 Good Luck.
 
 Rene Molenaar
 
 
 2008/2/12, Luigi Calori [EMAIL PROTECTED]:
 I would also be interested in Cmake osgswig building
 I, as a novice in both python and Lua, would greatly
 appreciate any
 script example usage.
 
 I' m trying to use the binary version of osgSwig, it seems
 working well
 but some further python example would really help
 
 Is this the right place to ask question regarding osgswig?
 
 thanks in advance and compliments for the work
 
 
 Luigi
 
 René Molenaar wrote:
 
  I just separated an osgswig cmake project from our larger
 Library.
 
  Tomorrow I can try to build some of your version of the
 wrappers in
  this structure.
  (our version has changed a version of yours here and there).
 
  You can add me to the Project members of the google code
 page?
  I saw another member on there, I worked with him to create
 our current
  version.
  He makes great use of osgPython in combination with IPython
 gtk and
  the rest
  of our Library.
 
  Cheers,
 
  René
 
 
  2008/2/12, Hartmut Seichter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 
 
  Hi there,
 
  I updated the SWIG based python bindings.
 
  http://code.google.com/p/osgswig/
 
  Please test and break it.
 
  Some, hopefully, clarifying words about licensing:
 
  The generating scripts are under the MIT license. The
 modules directly
  derived from OpenSceneGraph are following the OSGPL v0.0
 or the
  appropriate licenses.
 
  The HITLabNZ (http://www.hitlabnz.org) is promoting the
 GPL version of
  osgART 1.1, ARToolKit for OpenSceneGraph, with this
 release. If
  you are
  using this module you also agree to follow the licensing
 terms of the
  GPLv2.
 
  Shameless plug :)
 
  If you need a commercial license for osgART or features
 beyond marker
  based tracking please contact ARToolworks Inc.
  (http://www.artoolworks.com/)
 
  Cheers,
  Hartmut
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  mailto:osg-users@lists.openscenegraph.org
 
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 
 ___
 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] ANN: osgPython (SWIG) 2.2.0

2008-02-12 Thread Luigi Calori
I would also be interested in Cmake osgswig building
I, as a novice in both python and Lua, would greatly appreciate any 
script example usage.

I' m trying to use the binary version of osgSwig, it seems working well 
but some further python example would really help

Is this the right place to ask question regarding osgswig?

thanks in advance and compliments for the work


Luigi

René Molenaar wrote:

 I just separated an osgswig cmake project from our larger Library.

 Tomorrow I can try to build some of your version of the wrappers in 
 this structure.
 (our version has changed a version of yours here and there).

 You can add me to the Project members of the google code page?
 I saw another member on there, I worked with him to create our current 
 version.
 He makes great use of osgPython in combination with IPython gtk and 
 the rest
 of our Library.

 Cheers,

 René


 2008/2/12, Hartmut Seichter [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED]:


 Hi there,

 I updated the SWIG based python bindings.

 http://code.google.com/p/osgswig/

 Please test and break it.

 Some, hopefully, clarifying words about licensing:

 The generating scripts are under the MIT license. The modules directly
 derived from OpenSceneGraph are following the OSGPL v0.0 or the
 appropriate licenses.

 The HITLabNZ (http://www.hitlabnz.org) is promoting the GPL version of
 osgART 1.1, ARToolKit for OpenSceneGraph, with this release. If
 you are
 using this module you also agree to follow the licensing terms of the
 GPLv2.

 Shameless plug :)

 If you need a commercial license for osgART or features beyond marker
 based tracking please contact ARToolworks Inc.
 (http://www.artoolworks.com/)

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




___
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] ANN: osgPython (SWIG) 2.2.0

2008-02-11 Thread René Molenaar
I just separated an osgswig cmake project from our larger Library.

Tomorrow I can try to build some of your version of the wrappers in this
structure.
(our version has changed a version of yours here and there).

You can add me to the Project members of the google code page?
I saw another member on there, I worked with him to create our current
version.
He makes great use of osgPython in combination with IPython gtk and the rest

of our Library.

Cheers,

René


2008/2/12, Hartmut Seichter [EMAIL PROTECTED]:


 Hi there,

 I updated the SWIG based python bindings.

 http://code.google.com/p/osgswig/

 Please test and break it.

 Some, hopefully, clarifying words about licensing:

 The generating scripts are under the MIT license. The modules directly
 derived from OpenSceneGraph are following the OSGPL v0.0 or the
 appropriate licenses.

 The HITLabNZ (http://www.hitlabnz.org) is promoting the GPL version of
 osgART 1.1, ARToolKit for OpenSceneGraph, with this release. If you are
 using this module you also agree to follow the licensing terms of the
 GPLv2.

 Shameless plug :)

 If you need a commercial license for osgART or features beyond marker
 based tracking please contact ARToolworks Inc. (
 http://www.artoolworks.com/)

 Cheers,
 Hartmut
 ___
 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] ANN: osgPython (SWIG) 2.2.0

2008-02-11 Thread Hartmut Seichter

Hi there,

I updated the SWIG based python bindings.

http://code.google.com/p/osgswig/

Please test and break it.

Some, hopefully, clarifying words about licensing:

The generating scripts are under the MIT license. The modules directly 
derived from OpenSceneGraph are following the OSGPL v0.0 or the 
appropriate licenses.

The HITLabNZ (http://www.hitlabnz.org) is promoting the GPL version of 
osgART 1.1, ARToolKit for OpenSceneGraph, with this release. If you are 
using this module you also agree to follow the licensing terms of the 
GPLv2.

Shameless plug :)

If you need a commercial license for osgART or features beyond marker 
based tracking please contact ARToolworks Inc. (http://www.artoolworks.com/)

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