I’ve been looking for an easy way to change the default rotation axis in a RotateCylinderDragger of OpenSceneGraph, and didn’t find one that suited my needs. You can always introduce intermediary transforms, but it would be sub-optimal, and can give some problem when the RotateCylinderDragger is part of a more general CompositeDragger. Diving through the OSG API I have found an easy solution that basically replaces the default constructor and customizes the Projector instead of using the default one. The new contructor takes a Quaternion (osg::Quat) as argument, which indicates the new rotation axis orientation with respect to the default one (0,0,1) when creating an osg::Cylinder. I post a snippet below in case it is useful to someone else:
#include <osgManipulator/Dragger>
#include <osgManipulator/RotateCylinderDragger>
#include <osgManipulator/Projector>
#include <osg/Shape>
/** A custom RotateCylinder that allows the user select the rotation axis */
class CustomRotateCylinderDragger: public osgManipulator::RotateCylinderDragger {
public:
CustomRotateCylinderDragger(osg::Quat &rotation) {
//Set the default rotation axis
osg::Cylinder *c=new osg::Cylinder();
c->setRotation(rotation);
_projector = new osgManipulator::CylinderPlaneProjector(c);
setColor(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f));
setPickColor(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f));
}
~CustomRotateCylinderDragger() {}
};

Cloud robotics is getting more and more attention recently. See for example the Google initiative 
Twitter
Youtube
LinkedIn
GooglePlus