Hartmut Seichter wrote:
>If you tried the newest trunk and SWIG you certainly stumbled across the
>osg::Vec3f stuff ... do you have a solution for that?
I don't know what stuff ypu mean, I have just tested the latest svn-trunk (osg
2.3.4) with swigwin-1.3.29 without problems.
So maybe using an older swig version is a workaround for now.
I noticed one swig error before, that was solved like this:
//This is a little macro trick to prevent a swig error
#define X_AXIS(a,b,c) X_AXIS=Vec3f(1.0,0.0,0.0);
#define Y_AXIS(a,b,c) Y_AXIS=Vec3f(0.0,1.0,0.0);
#define Z_AXIS(a,b,c) Z_AXIS=Vec3f(0.0,0.0,1.0);
and this might be handy
//create shortcuts for vecs in python
#ifdef SWIGPYTHON
%pythoncode %{
Vec2 = Vec2f
Vec3 = Vec3f
Vec4 = Vec4f
%}
#endif
We changed some other stuff too, but the result in python is this:
In [1]: import osg
In [2]: a = osg.Vec3(1,2,3)
In [3]: a
Out[3]:>
In [4]: print a
[1, 2, 3]
In [5]: myvec = osg.Vec3f()
In [6]: myvec[0] = 10
In [7]: print myvec
[10, 0, 0]
When I find some time, I will try to see what the differences between our
trunks are. And I will look at our cmake files.
Have a nice day,
René Molenaar
_________________________________________________________________
Probeer Live Search: de zoekmachine van de makers van MSN!
http://www.live.com/?searchOnly=true
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org