[an error occurred while processing this directive]
Tips and Tricks
Open Inventor
For browsing an Inventor file in emacs the tcl-mode is useful. For
creating and editing Inventor files visit the pages of the first VRML workshop.
To get an understanding of the scene graph and also to debug an
Inventor file the progam gview will do it's best.
Save your scene graph into a file
Test your scene graph by saving it to file before you invoke the
viewer.
#include <Inventor/actions/SoWriteAction.h>
// your code for creating the scene graph
// Write file for tests
SoWriteAction mySceneOuput;
if (!mySceneOuput.getOutput()->openFile("test.iv")) {
printf("Can not open file!\n");
exit(2);
}
mySceneOuput.getOutput()->setBinary(FALSE);
mySceneOuput.apply(root); // root of your scene graph
mySceneOuput.getOutput()->closeFile();
// call the viewer
The file test.iv contains the scene graph. Load it into
gview.
Stereo Viewing with Open Inventor
Stereo viewing with Open Inventor and stereo glasses (e.g.,
ChristalEyes2) is possible by switching monitor mode and selecting
stereo viewing in the preference menu of the viewer.
C++
Emacs C++ mode
Emacs has a C++ mode which highlights syntax, allows easy formating
and has some other useful features. For automatic recognition of
the c++ file extension put somewhere in your ~/.emacs file:
(setq auto-mode-alist
(cons `("\\.c\\+\\+$" . c++-mode)
auto-mode-alist))
Class libraries like Open Inventor or larger applications can become
rather complex. If you than apply traditional methods of "linear
editing", you might get lost in the forest of classes and to switch
between the files will take you a lot of time. We recommend an
object-oriented development environment. Commercial products
(e.g. Sniff+) and free usable software (e.g. OO-Browser) are available.
Java
The syntax of Java is similar to C++, so that you can use the emacs
C++ mode. Set somewhere in your ~/.emacs file:
(setq auto-mode-alist
(cons `("\\.java\\'" . c++-mode)
auto-mode-alist))
More tips
Local setup
A lot of tools are stored in /public/u-aizu/sgi/bin. So we
suggest to put it into your path or to use Ease.
This and other documents contain links to Inventor or VRML files. The
server is assigning a mime type, so that you only need to have setup
your ~/.mailcap file or to use /public/u-aizu/sgi/lib/netscape/mailcap to
start webspace or ivview automatically.
Open Inventor is not only available on SGIs. For Sun workstation you
need a slightly different setup.
Last modified: 10/30/23; Contact:
; Copyright ©
2023, Jens Herder, All Rights Reserved.