| |
|
|
|
ExaminerViewerPlus November 2001
|
What is it?
An Open Inventor subclass of SoXtExaminerViewer used to add an
additional button on the righthand side of the viewer for taking a snapshot of the
scene. Currently the viewer supports writing to jpeg, png, rgb, ps, ppm, and
iv (Open Inventor scene graph).
How to use it
Using the snapshot feature on the viewer is very
easy. When the viewer is being used (like the one at right) you will notice
a button at the bottom of the righthand column list which looks like a
camera .
When the button is clicked a new window
will pop up and prompt for a
filename (like the one at left). In addition, the output type and size of
the image can be specified. Currently the viewer doesn't check if a file
already exists. It only checks to verify a file can be open for writing.
Therefore, if you select a file which already exists, it will be over
written.
Adding it to an Application
- Download the source code
- Compile the viewer object. Before compiling make sure you have all the
image libraries installed and of course Open Inventor. The following
additional header files are
needed to compile:
- When linking the viewer object code be sure to include the following
extra libraries, -lXm -lXt -lX11 -ljpeg -lpng -lz. They are all
needed to link the object to an executable.
Example:
> CC -o ExaminerViewerPlus.o -c ExaminerViewerPlus.cpp
> CC -o myapp ExaminerViewerPlus.o -lInventorXt -lInventor -lXm -lXt -ljpeg -lpng -lz
|
|
|
|