> My scenario is: I have 3 f16 airplanes flying in the same environment,
> in their own manner. I want to select a certain f16 and, under the
> selection mode, make the mouse input change camera angle around the
> selected f16, like examining it.
> How should I do it? I noticed the
> /src/Inventor/examples/IVF/CustomViewer gave an example on how to
> overwrite thumb wheel control, (but didn't give code on how to
> implement camera rotating.) Is there a similar way to overwrite mouse
If the viewer is in selection mode you don't need to "override"
the mouse input, just respond to it. In selection mode the
viewer does not process mouse input, it just converts the events
to Open Inventor event objects and sends them to the scene graph
using SoHandleEventAction, where SoEventCallback (and other)
nodes can respond to the events.
In the Open Inventor 4.0 SDK there is an example that is very
close to what you are trying to do. Look at the file
and specifically the method OnMouseMove(). The application is
based on Qt, but the event handling is portable Open Inventor.
To try it out, run the QtLargeModelViewer (pre-built on Windows),
load the file $OIVHOME/data/models/toys/TrackSample/animation.iv.
Uder the Animations menu select "car1" (for example). Now you
should be following the selected car. In the same menu select
"Free View" and go into selection mode. Now you should be able
to use the mouse to rotate freely around the car while still
being animated along its path.
TGS Inc, http://www.tgs.com