I worked with a osg::Constraint and found strange part of code:
class OSGMANIPULATOR_EXPORT Constraint : public osg::Referenced
{
public:
...
virtual bool constrain(ScaleUniformCommand& command) const { return constrain((MotionCommand&)command); }
virtual bool constrain(const Rotate3DCommand& command) { return constrain((MotionCommand&)command); }
...
If i use osgManipulator::Rotate3DCommand then method Rotate3DCommand::accept(const Constraint& constraint) calls Constraint::constrain(MotionCommand&) instead Constraint:: constrain(const Rotate3DCommand&).
If you replace
virtual bool constrain(const Rotate3DCommand& command) { return constrain((MotionCommand&)command); }
on to
virtual bool constrain(Rotate3DCommand& command) const { return constrain((MotionCommand&)command); }
then all works correctly.
"