[osg-users] Adding Constraints to Draggers

Robert Osfield robert.osfield at gmail.com
Thu Oct 25 08:30:27 PDT 2018


Hi Max,

I'm afraid the original author of osgManipulator has moved company, where
he developed it, over a decade ago so to know exactly how to use it we all
just have to look at the code an figure it out.  I haven't personally use
osgManipulator in the way you are wanting to use it so can't provide any
guidance myself.

The only public example I'm familiar with is
OpenSceneGraph/examples/osgmaipulator/osgmanipulator.cpp.

Cheers,
Robert.

On Thu, 25 Oct 2018 at 15:50, Max Power <daniel.lehmann85 at hotmail.com>
wrote:

> Hi,
>
> I'm quite new to OpenSceneGraph. I actually just finished to read the book
> "OpenSceneGraph 3.0 Beginner's Guide" and now I want to go a bit further.
>
> Currently, I try to move objects via the mouse. I already saw, that I can
> use the class osgManipulator::Dragger for this. Here I wrote my own
> CompositeDragger, which is basically a combination of a
> RotateCylinderDragger and a Translate1DDrager. This means I can move the
> object forwards and backwards and I can rotate it via mouse. I already got
> this working.
>
> However, I don't want to translate the object infinitely forwards or
> backwards. I just want to translate it e.g. 10 units back or 5 units
> forward at max. Or I want to translate it only within a certain area of the
> world coordinate system.
>
> How could I do this? I assume the osgManipulator::Contraint is helpful
> here. However, I haven't found any examples and I don't know how to apply
> it.
>
> I hope this wasn't asked before. At least I couldn't find anything
> similar. Are there any examples somewhere online, which you can recommend
> to look at?
>
> Thank you!
>
> Cheers,
> Max
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75125#75125
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20181025/5be477cb/attachment.html>


More information about the osg-users mailing list