OpenSceneGraph/include
Robert Osfield 99fd6ed93a From Neil Groves, "Frequently I would like code that has a signature like: void foo(osg::ref_ptr<osg::Node> node) to work for osg::ref_ptr<osg::Group>, osg::ref_ptr<osg::Geode> etc. The behaviour of osg::ref_ptr does not mimic the behaviour of a raw pointer in this regard.
To facilitate this possibility I have added a template copy constructor and a template assignment operator. These work for safe conversions like those in my previous example, but fail as desired for non-safe conversions since the template instantiation fails during the raw pointer copy/assignment.

The lack of this facility has appreciably handicapped development of generic algorithms applied to the scene graph, and I believe that this alteration will be welcomed by most of the community. If there are issues with antiquated compilers not supporting template member functions then perhaps a small piece of conditional compilation is in order.

I have made the change using the latest release version (2.6) as the base. The full file is attached.

I have not tested building the osg wrappers and the script binding code. I have tested the legal and illegal conversions of both copying and assignment to ensure that behave as expected on MSVC7.1, MSVC8, MSVC9, GCC 4.3."
2008-10-03 09:55:20 +00:00
..
OpenThreads From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc 2008-06-26 10:27:16 +00:00
osg From Neil Groves, "Frequently I would like code that has a signature like: void foo(osg::ref_ptr<osg::Node> node) to work for osg::ref_ptr<osg::Group>, osg::ref_ptr<osg::Geode> etc. The behaviour of osg::ref_ptr does not mimic the behaviour of a raw pointer in this regard. 2008-10-03 09:55:20 +00:00
osgDB Changed loadLibrary so that it retusn a LoadStatus variable to enable calling 2008-09-26 13:51:18 +00:00
osgFX Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
osgGA Ported intersection code to use new osgUtil::LineSegmentIntersector/IntersectionVisitor. 2008-07-05 16:39:28 +00:00
osgIntrospection Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
osgManipulator Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
osgParticle Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
osgShadow From Wojciech Lewandowski, a range of new ShadowMap implementations include View Dependent Shadow Maps - LispSM 2008-09-19 19:51:27 +00:00
osgSim Added missing dirtyBound() calls 2008-10-03 08:33:17 +00:00
osgTerrain Change TileID::layer to TileID::level 2008-09-20 15:43:38 +00:00
osgText Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
osgUtil From Erik van Dekker, 2008-08-18 11:00:40 +00:00
osgViewer From Stephan Huber, removed now redundent setEventQueue method 2008-10-03 09:19:53 +00:00
osgVolume Various improvements to the dicom loader to be able to handle a broader range of dicom files 2008-10-02 15:45:08 +00:00
osgWidget Tweaks to facilitate osgWrapper build 2008-09-17 14:21:47 +00:00