Optimizer Info

   OpenGL Optimizer

 

   opNavigator
  About opNavigator Top

opNavigator is my own code for displaying an Optimizer scene graph. It is based on the opViewer code from SGI but has many differences:
  • provides an abstraction of the navigator, opNavigator which includes everything to navigate in the scene, change rendering style, etc. The opNavigatorPlus sub-class contains code to dump to image files, output postscript, display bounding boxes, record the path of the camera, play it back and save it to file. There is no support for multichannel.
  • provides VRML-like viewpoint nodes to control the camera from within the scene graph.
  • provides wrapper classes for handle windowing stuff, ie creating the window and the csContext, swap buffers if needed, handle rendering timing, get keyboard and mouse events and forward them to the navigator class. You'll get wrappers for:
    • csWindowViewer, the csWindow that comes with Optimizer.
    • opMotifViewer, a Motif widget (with no special interface, unlike opXmViewer).
    • opMFCViewer, used in an MFC application like a CView.
  • comes with two samples apps, opViewer which does the same thing as the original one, and opMFCViewer which displays a scene next to the scene graph (double click on a node in the scene graph to center on that node).


  News Top

Receive email when this page changes

Powered by NetMind
 
Click Here
04/09/99 Added option "-autovp" to opViewer.cxx to add 4 default viewpoints to scene (front/side/top and animated around the object).
26/08/99 Added support for highlighting and picking (key bindings is a bit different for SGI's original code) in opNavigator; Fixed keyboard handling code in opMFCViewer.
25/08/99 Get a correct Makefile for SGI. Copy/paste error replaced all tabs by spaces... (been corrected in current archive).
23/08/99 new release with fixes in the Makefile, support for middle mouse button in MFCViewer, saving/loading of csViewpoint nodes. Also fixed the bool.h problem!


  Download and Install Top

You can get the code here (current version is 040999, 150K zip file). Unzip it in a directory. There's a Makefile for SGI platforms and workspace for Visual C++ 5.


  Licensing Top

I am releasing this code under the General Public License (unless someone shows that the original SGI license is incompatible!).


  TODO Top

  • Documentation.
  • Finish MFC stuff (problems with refreshing)...
  • Do GTK and wxWindows viewers.

  • Try to get SGI to take interest in this wish list:
    • Port Optimizer to Linux!
    • Fix bugs/design-issues especially in the threading mecanism
    • Add more features (depth sorting for correct rendering of transparent objects would be my favorite right now).
    • More?

  Feedback Top

Send feadback to Mike Krus at mwkrus@yahoo.com.
You might also want to take a look at my pages on Computer Graphics and at my Ph.D. Thesis work.


   Using opNavigator

Mouse Controls
In WALK/FLY mode
Left ButtonMove forward/backward, turn left/right
Middle ButtonLook up/down/left/right
Right ButtonPan
In EXAMINE mode
Left ButtonSpin object
Control-Left Buttonon background : rotate around the center of the scene
on object : rotate around the center of the object
Middle ButtonLook up/down/left/right
Right ButtonPan

Runtime Key Commands
0Travel faster.
9Travel slower.
KPrint status
RReset and force viewpoint to see whole scene
SPrint triangle stats.
TToggle nice transparency
WToggle scribe mode.
YToggle back patch culling - back facing.
bToggle backface culling.
cToggle collision detection in walk mode.
fSave scene to CSB file outfile.csb.
gToggle Flat/Smooth shading.
lToggle head light.
nChange navigation mode (WALK/EXAMINE).
pPrint scene graph
rReset
sToggle status display.
wToggle wireframe mode.
yToggle back patch culling - front facing.
?Print help message.
.Stop scene motion.
[Close FOV by 5 degrees.
]Open FOV by 5 degrees.
F11Select previous viewpoint.
F12Select next viewpoint.
Escape Exit.
HomeRestore upward position.
for opNavigatorPickDrawImpl only
hToggle highlight mode.
mToggle pick and manipulate mode.
<Move highlight up in scene graph.
>Move highlight down in scene graph.
FSave highlighted scene graph to file part.csb.
PPrint highlighted scene graph.
for opNavigatorPlus only
AToggle axis display mode (corner/origin/center).
BToggle bounding box display.
aToggle axis display.
dSave current image in TIFF.
DSave current image in postscript.
F1Start recording animation.
F2Stop recording/playing animation.
F3Start playing animation.
F4Save recorded animation.
F5Rewind animation.
F6Toggle looping mode.

Command Line Options for opViewer
-h print this message.
-v be verbose.
-stats print scene graph statistics after loading files.
-batch dump loaded scene graph to file and quit
-f full screen mode.
-display string set display name to `string'
-advanced enable BBox, Axis, VCR...
-wp x y open initial window in x y
-ws w h open initial window size w and h
-bg r g b set background to (r,g,b) (0.0 <= x <= 1.0)
-campos x y z set initial camera position to (x, y, z)
-camdir x y z a set initial camera orientation to (x, y, z, a)
-walk set navigation mode to WALK (default is EXAMINE)
-nocollide deactivate collision detection in WALK mode
-colorconv4to3 convert colors from 4f to 3f
-colorconv3to4 convert colors from 3f to 4f
-o [N] use occlusion culling with N thread (N defaults to 2)
-nopick disable picking
-noheadlight turn off head light
-fbbs set feedback buffer size (default 1Mo)
Following options apply to next file only:
-tr x y z translation original model by (x, y, z)
-rot x y z a rotation original model by a around (x, y , z)
Following options apply to all further files:
-dl convert primitives in next files to display lists
-nodl don't convert primitives in next files to display lists
-sn convert norms to short
-nocombine don't combine appearances
-nobackface don't activate backface culling
-ctol n set chordal dev tolerance to n (default 0.0001)


visits