Attached is modified source of AdapterWidget.cpp file from osgviewerQT
example. Original was token today from SVN - trunk. (2.3.6).
--mdi option needs to be set to run MDI version.
Few notes:
- tested on Windows box (Win XP)
- using QT4
- I was not able to execute the example with QOSGWidget - had same
error like described in [osg-users] "fate error using QOSGWidget in
develop release
2.3.0" thread from Shuxing Xiao, 2008-01-08.
- problems are described in source
--
And Later post:
The problem of keypress events was solved by QT community, attached is
repaired AdapterWidget.cpp file.
In the AdapterWidget class constructor following line was added:
setFocusPolicy(Qt::ClickFocus);
Scene disappearing by resizing to minimum still needs to be fixed..."
and a new scheme for computing the scaling when using autoscale that introduces smooth
transitions to the scaling of the subgraph so that it looks more natural.
other GUI toolkit examples. It now takes a model file as command-line
argument (complaining if there isn't one), and its startup window size
is now actually applied (it used to be too small). I tested this with a
unicode-build of wxWidgets, as that is the recommended build type on
Linux with GTK. I'm pretty sure this version of the example will work
for the ANSI build as well, but I have no way of testing."
creating subclasses of osg::Array that referenced data
stored an application's internal data structures. I took
a stab at implementing that and ran into a couple of
downcasts in Geometry.cpp. Enclosed is my take at fixing
those along with a simple example of how to do this."
fullscreen mode and back between views. (To activate, double click on
the view to toggle.) It demonstrates/uses the new one-liner fullscreen
method introduced in Leopard. Code will still compile and run in
pre-Leopard (thanks to Obj-C dynamic/late binding), but code path is
treated as a no-op in those cases."
enhanced version of PolytopeIntersector.
New features of PolytopeIntersector :
* Dimension mask: The user may specify the dimensions of the
primitives to be tested. Checking polytope-triangle and
polytope-quad intersections is rather slow so this can
be turned off.
* Reference plane: The resulting intersections are sorted
by the distance to this plane.
New memebers of PolytopeIntersector::Intersection :
* distance: Distance of localIntersectionPoint to the reference plane
* maxDistance: Maximum distance of all intersectionPoints to the
reference plane.
* intersectionPoints: The points intersecting the planes of the polytope
or points completely inside the polytope.
* localIntersectionPoint: arithmetic mean of all intersection points
* primitiveIndex: Index of the primitive that intersected
I added some more output to the example osgkeyboardmouse."
with the original AdapterWidget implementation still available by default. The new implementation can be accessed by running:
osgviewerQT cow.osg --QOSGWidget
all wonky when I resize the SDL window. I'm not sure if this bug has
always existed or not, but according to the SDL documentation this
operation should be safe regardless, and doesn't not introduce the need
for extra memory management (that is: there is no need to "cleanup" the
old screen variable, that is all handled by SDL for us).
"