Closed AdriCS closed 10 years ago
Thanks Ardi. This is because the latest OSG trunk redefines Drawable as a Node type so computeBound() returns a sphere bound by default, as well as a new computeBoundBox() method for precise use. We need to update the recipes to fit this, but had better keep some backward compatibility for older versions, maybe using the OSG_VERSION_GREATER macro.
It would be much appreciated if you could make a pull request, as I'm busy with some client work now. :-)
Hi!
I'll send you the pull request next week! :D
Cheers!
PS: It's Adri, not Ardi ;)
On 24 October 2014 03:39, Rui Wang notifications@github.com wrote:
Thanks Ardi. This is because the latest OSG trunk redefines Drawable as a Node type so computeBound() returns a sphere bound by default, as well as a new computeBoundBox() method for precise use. We need to update the recipes to fit this, but had better keep some backward compatibility for older versions, maybe using the OSG_VERSION_GREATER macro.
It would be much appreciated if you could make a pull request, as I'm busy with some client work now. :-)
— Reply to this email directly or view it on GitHub https://github.com/xarray/osgRecipes/issues/13#issuecomment-60334167.
Hi!
I'll send you the pull request next week! :D
Cheers!
PS: It's Adri, not Ardi ;)
On 24 October 2014 03:39, Rui Wang notifications@github.com wrote:
Thanks Ardi. This is because the latest OSG trunk redefines Drawable as a Node type so computeBound() returns a sphere bound by default, as well as a new computeBoundBox() method for precise use. We need to update the recipes to fit this, but had better keep some backward compatibility for older versions, maybe using the OSG_VERSION_GREATER macro. It would be much appreciated if you could make a pull request, as I'm busy with some client work now. :-) — Reply to this email directly or view it on GitHub #13 (comment).
Hello, I have the same problem as you. Can you tell me how to solve it? I don't know where to use OSG VERSION Greeter macro, thank you
This is my compile error message
In file included from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanSurfaceVBO:21:0, from /home/dzx/sonar_simulation/gui/osg_ocean/src/osgOcean/FFTOceanSurfaceVBO.cpp:18: /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/MipmapGeometryVBO:147:26: error: invalid covariant return type for ‘virtual osg::BoundingBox osgOcean::MipmapGeometryVBO::computeBound() const’ osg::BoundingBox computeBound( void ) const; ^ In file included from /usr/local/include/osg/Geode:18:0, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/OceanTechnique:20, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanTechnique:20, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanSurfaceVBO:20, from /home/dzx/sonar_simulation/gui/osg_ocean/src/osgOcean/FFTOceanSurfaceVBO.cpp:18: /usr/local/include/osg/Drawable:155:32: error: overriding ‘virtual osg::BoundingSphere osg::Drawable::computeBound() const’ virtual BoundingSphere computeBound() const; ^ src/osgOcean/CMakeFiles/osgOcean.dir/build.make:158: recipe for target 'src/osgOcean/CMakeFiles/osgOcean.dir/FFTOceanSurfaceVBO.cpp.o' failed
In
NurbsSurface
andCloudBlock
, the functioncomputeBound
is redefined. But with the current OSG's master brach, the build process ends in an error:It seems that now
Drawable
has two functions for computing the bounds. The oldcomputeBound
now returns aBoundingSphere
, whereas the one returning aBoundingBox
is now namedcomputeBoundingBox
. Even though master isn't a stable release, I think the changes will remain for future releases.Modifying the source code for NurbsSurface and changing
computeBound
tocomputeBoundingBox
let me continue with the build.I can make a pull request with the changes if you want. :)