Open Inventor

Mr. Hartley shows how to do interactive 3-D programming using Open Inventor, Release 2, which he used to create the images on our cover.
Hooking Up New Hardware

Joystick drivers are available for Linux. The Inventor Toolmaker book on how to extend Inventor has a section in the back on adding new hardware devices. A lengthy discussion ensues, requiring a knowledge of the details of the windowing system. I found I could bypass it by using an Inventor SoTimerSensor node set to invoke the callback function at almost any time interval with the attached node pointer. The setup for it is as follows:

SoTimerSensor *JS_Sensor =
 new SoTimerSensor(JS_SensorCallback, craft_xf);
JS_Sensor->setInterval(0.005); //scheduled 200/sec ...
JS_Sensor->schedule();

The function, called JS_SensorCallback, checks the joystick driver to see how much it has moved. This is also the place to update the flight state model to change the velocity and heading. We can check for things such as amounts of air and power left, and how deep we are, based on the current XYZ coordinates.

Things to Add

A few things I wish to add to this simulator are:

  • Networking over the Internet to join two users together

  • Animated objects such as fish

  • Direct reading of the terrain data from the Internet

  • More empirical parameters to ensure the craft responds the same way in the simulator as in life

  • Tidal and water flow effects

  • Light attenuation as depth increases

Summary

In addition to ease of use and availability of raw power, I like Open Inventor because whatever I develop is totally portable between my Linux machine at home and my SGI workstation at the office. Using Viewkit, Motif and Mesa, I have a tremendous amount of flexibility in choosing where and how I develop software.

Inventor and Viewkit provide the software functionality of an SGI workstation, and with the recent advances in graphics hardware, Linux PCs will be closer tomorrow to where the SGI workstations are today. Tomorrow is already planned—no one has to ask us where we want to go today.

A special thanks goes out to Alexandre Naaman for showing the way, being patient and simplifying things when they got muddled.

A Free Alternative to Inventor

Hardware and Software

Resources

Robert Hartley is an Australian citizen currently residing in Montréal, Canada. His first involvement with UNIX was on the Minix operating system in the mid-eighties. He started off his working life writing public security software for various municipalities around Quebec and Ontario. He is now a graphics systems analyst at Pratt & Whitney Canada. He can be reached via e-mail at robert.hartley@pwc.ca.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix