Namespace for the Viewer functions. More...
Functions | |
| void | initialize () |
| Initializes internal data needed to use the other functions in this module. Be sure to call if first. | |
| void | cleanup () |
| Releases the resources allocated in initialize(). This function should be called once the viewers are no longer needed. | |
| void | display (const sal3d::RangeMap &rm) |
| Open a viewer with the RangeMap or update the one displayed. | |
| void | display (const sal3d::COP &cop) |
| Open a viewer with the COP or update the one displayed. | |
| void | display (const sal3d::COP &cop1, const sal3d::COP &cop2) |
| Open a viewer with the two COPs or update the one displayed. | |
| void | display (const sal3d::ZMap &zmap) |
| Open a viewer with the ZMap or update the one displayed. | |
| void | waitAllClosed () |
| Holds the execution of the program until all the windows are closed. | |
Namespace for the Viewer functions.
The functions in this namespace require linking with viewer.lib (import library for viewer.dll).
The functions within this namespace provide the user the means to display any sal3d object (RangeMap, COP or ZMap) in a simple call. Up to now, it is only possible to display one object of the same type at a time. This restriction is planned to be removed in future versions.
The usage is quite straightforward. The initialize() function has to be called before using any of the other functions in this module, as it initializes some internal data. Afterwards, one only has to call the display function for the object he wishes to view.
It might be useful to call the function waitAllClosed(), which halts the execution at that point until all the windows are closed.
Once the user no longer needs to display more objects, cleanup() should be called to release the data allocated in the initialize() function.
Following is a simple example that shows how to display a COP, wait for the user to close the window, and exit.
sal3d::Viewer::initialize(); sal3d::COP cop("filename.cop"); sal3d::Viewer::display(cop); sal3d::Viewer::waitAllClosed(); sal3d::Viewer::cleanup();
by
1.7.6.1