Hi all. Found a bug in ShapeDrawable.cpp This is verified in 3.0.1 and 2.9.11:
Bug in OpenSceneGraph/src/osg/ShapeDrawable.cpp, void DrawShapeVisitor::apply(const Capsule& capsule) : If numRows becomes odd, the capsule top and bottom parts created with two calls to drawHalfSphere will not align with the cylinder body created with drawCylinderBody. Easiest seen if with large radius and few rows. Example capsule parameters: height 8.4 radius 5 Set detail ratio hints to 0.35 so numRows becomes 7. Misalign. Change hints to 0.4, numRows becomes 8 and capsule part aligns. Fix: If numRows is odd, add one before calling drawHalfSphere. I don't think the user should be aware of this and have to pick a suitable detailRatio. Cheers, Anders -- __________________________________________ Anders Backman, HPC2N 90187 UmeƄ University, Sweden [email protected] http://www.hpc2n.umu.se Cell: +46-70-392 64 67
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

