Hi Robert,

It seems there is a glitch with the new osgManipulator event handling and the TrackballManipulator. In the osgmanipulator example, if you keep ctrl or 'a' pressed when you rotate the trackball using the left mouse button, the trackball might get crazy (rotating of arbitrary - probably high - angle). The trick to reproduce the bug is to try to release the mouse button on a dragger. I'm able to reproduce it constantly. I was never able to reproduce it when the ctrl or 'a' key were not pressed. I tested it on revisions 10593 and 10606.

Unfortunately, I did not have the time to track it down (it's not a big problem for me at the moment). I just wanted to let you know about it.

Also, are there any clues about when 2.9.6 will be released(/tagged)?

regards,

Vincent Gadoury


Robert Osfield wrote:
Hi Andrew,

In the svn/trunk version of the OSG I have refactored osgManipulator a
bit to make it more flexible and easier to use.  I would strongly
suggest having a look at it as the extra complexity of CommandManager
is no longer needed, also you no longer need to implement your own
event handling, as osgManipulator can now automatically pick up on
events.  There is also a new callback support that allows you to move
objects around in the scene to follow manipulators.

Robert.

On Fri, Sep 25, 2009 at 1:58 PM, Andrew Thompson <[email protected]> wrote:
Hi there,

I am developing a CAD-Style application and am interested in using 
osgManipulator to provide picking, moving, rotating and scaling of objects. I 
just have a couple of questions with regard to the use of manipulators, and 
hope some of you can take the time to answer them for me.

Firstly my application currently has a relatively flat scenegraph, where each 
"Object" in the CAD app is arranged as follows:


Code:

PositionAttitudeTransform
|
Geode
|
Geometry




Then I have N "Objects" arranged as above in the scene that are a child of the 
root scene node (so a flat scene graph).

>From my understanding from reading the osgManipulator example, to manipulate 
an object I can use the following hierarchy:

[Image: 
http://i137.photobucket.com/albums/q217/andyb1979/manpulatorhierachy.png ]

In this diagram Geode is the object I want to manipulate, so I would replace that with 
the PAT from my "3D Object" implementation, Selection wraps the object to 
manipulate, Dragger can go anywhere in the scene and the CommandManager links the Dragger 
to the Selection.

So -- some questions on how I may use this in my app:

* Firstly, to select an object, I pick it. At this point should I create a 
Selection and place in-between my 3D object and SceneRoot? Or can selection be 
anywhere and just place the object as a child of that?

* Secondly can the dragger be anywhere in the scene hierachy or must it be a 
parent of the selection?

* Similarly, does the Selection have to be specifically put between my 3D 
object and the scene root (In a CAD-Style app I will be selecting/deselecting 
objects quite regularly)

* Say my object has a transform applied to it by its
PositionAttitudeTransform. I need to somehow get that transform, apply to the 
dragger, then let the user manipulate it and apply the resultant transform to 
the PAT, removing the dragger/selection from the scene. Any ideas how this 
could work?

* Is there a way to get an event or call-back out for each translate, rotate, 
scale operation as I need to push these into an undo-redo stack

* Finally, could the above be modified to work with multiple objects in the 
same selection and how would I apply the Dragger transform to all of them 
before/after the event?



Thanks for your time, any insights would be gratefully received.

Andrew[/list]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17650#17650





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to