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

