Hi, here is one way without inheriting:
Code:
void M_OSG_viewer::Stop_spinning(void)
{
osg::Quat rot(manipulator-getRotation());
osg::Vec3d ctr(manipulator-getCenter());
double dist(manipulator-getDistance());
manipulator-home(0);
I would say a way of doing this is to execute the init function:
/** Start/restart the manipulator.*/
void StandardManipulator::init( const GUIEventAdapter ea, GUIActionAdapter us
)
{
flushMouseEventStack();
// stop animation
_thrown = false;
us.requestContinuousUpdate(false);
}
HI George,
A quick grep of osgGA reveals:
StandardManipulator::setAllowThrow(bool)
TrackballManipulator inherits from StandardManipulator, via OrbitManipulator.
Robert.
On Wed, Apr 6, 2011 at 7:23 PM, George Bekos bekos...@live.com wrote:
Hello guys,
You all know that a trackball camera
Hello Robert,
Thanks for your answer!
Looks like I didn't explain my problem good enough.
If I am not mistaken, setAllowThrow(bool) will disable the throw functionality
completely, but it will not stop the camera if it is already orbiting around. I
do want the throwing functionality of the
Hello guys,
You all know that a trackball camera manipulator, by default, will start
spinning the camera around if you release the mouse button while moving the
mouse.
I have a simple/silly question:
Is there any way to stop the spinning of the camera using code?
The only solution I can think
5 matches
Mail list logo