From: Hugo v. d. M. <s13...@ba...> - 2003-12-27 21:36:59
|
Hello PyOSG users/developers! (especially Gideon May) It's been a while, but I'm now back, hacking a bit at Boost.Python, PyOSG, and PyDemeter again. I'm busy working on a new PyDemeter release, though at this point the previous release is building quite fine with the new Demeter. ------ Build systems ------ The coolest thing I'm playing with now is a different build system, "scons", really really cool for the Python fans amongst us. Why exactly I'm using scons and not bjam? Because I want to use my system's boost libraries. (Boost is available in Debian.) I decided not to go to the trouble of figuring out how to use bjam to build PyOSG when I don't have the boost sources. (I think I might have managed this before, replicating something like the tools/build directory tree, or some such thing.) The point being, I really like scons, and will be using it for all my projects from now on. As such, PyDemeter will come with a SConscript file for building it with scons, possibly also a Jamfile, but I won't be giving it much attention. (In the past I had a Makefile as well, I have yet to decide what will happen to that.) In my opinion, scons should become the future standard build-tool for *everything* <g> I think scons will probably take a little more work to make it cross-platform, just a little, since scons doesn't know per default what parameters Boost.Python extensions want to be built with, and afaik, doesn't know how to do "release" and "debug" builds per default like bjam does, but it gives you all the flexibility one could dream of. For interrest's sake, I've attached my current (alpha) SConscript files. The PyOSG.SConscript file gets a list of extensions from the PyOSG Jamfile. ;) Then it assumes an extension has a directory, and all .cpp files in that directory belong to the extension. My PyDemeter SConscript file checks for tmp/PyOSG-0.4.0/SConscript, and will "include" that if it is found, thereby allowing me to build PyOSG and PyDemeter together, a really nice development environment. (Sure, possible with bjam too, but I've never been able to figure out how to *install* stuff with bjam. And have I mentioned I love Python, and therefore scons? ;) (I dream of setting up SConscript files on my machine in such a way that I just run scons, telling it where to find demeter, openscenegraph and producer sources, then it builds and installs everything automatically.) ------ PyOSG 0.4.0+ ------ I'm looking forward to the next PyOSG release, I just want to be sure that a couple of missing things make it in. I believe I've mentioned them before, but it was a long time ago. In fact, I do believe the new wrappers are going to be more complete, I just want to remove any doubt. Is there a place I can find a newer version than 0.4.0, to see what is available in it, and if it is missing anything I need, so I can contribute before it is released? (Unfortunately I may be away from an Internet connection for two weeks, after that I still have a week or two in which I will definately be playing with this stuff.) Matrix: - matrix.def(osg::Vec3() * self) - matrix.def("rotate", (osg::Matrix (*)(const osg::Vec3&, const osg::Vec3&)) &osg::Matrix::rotate) Vec3: Copy constructor, or some other method to copy, such as .copy(), I like this: - vec3.def(init<const osg::Vec3&>()) Quat: namespace { const tuple osgQuat_getRotate(osg::Quat* q) { float angle, x, y, z; q->getRotate(angle, x, y, z); return boost::python::make_tuple(angle, x, y, z); } } .def("getRotate", osgQuat_getRotate) // And some other rotation methods, iirc Thanks, Hugo van der Merwe |