Introduction to OpenFlight APIs

For over 10 years, Presagis has created solutions that promote productivity and innovation in the rapidly evolving world of realtime 3D visual simulation. Presagis is the leading developer of realtime 3D authoring software tools. We also define and support the industry standard realtime 3D scene description database, OpenFlight.

Presagis offers a suite of Application Programming Interfaces (APIs) to answer the demand for a quick and easy means of accessing and extending OpenFlight. These APIs simplify the development of visual simulation applications by making OpenFlight databases more accessible and easier to customize. They also facilitate the development of specialized tools and utilities to augment the Presagis comprehensive set of powerful, general-purpose modeling tools.

A track record of meeting customer needs

The OpenFlight APIs continue the Presagis commitment to advance customer productivity--a commitment that began 10 years ago when we first set out to solve the problem of database modeling for realtime image generators (IGs). Historically, every image generator used its own database format, and modeling tools were proprietary and exclusive to the image generator they supported. Then Presagis pioneered a revolutionary approach to support all image generators, regardless of their individual differences in database hierarchy and attributes. We identified a kernel of elements common to all IGs, such as polygonal representation, color, and texture, and developed a universal set of tools for modeling them. Unique attributes and structures were controlled through an IG-specific Data Base Logic (DBL) module.

This approach proved highly successful in reducing development time and cost. We used it to develop modelers for the Singer Link DIG and ATACDIG, Evans and Sutherland ESIG, and Lockheed-Martin Compuscene IG product lines. Link Miles and FlightSafety also adopted this approach for their proprietary IDEAL and EMR modelers.
Today, however, the scene has shifted. OpenFlight has surpassed all other database formats in popularity, becoming the de facto industry standard. At the same time, technology advances in graphics hardware has produced an explosion in visual simulation platforms that demand customized attributes. As a result, more and more companies want to extend OpenFlight, rather than go to the time and expense of writing a complete, unique DBL for their particular IG. MultiGen OpenFlight APIs provide the solution.

The OpenFlight API family

The Presagis suite of OpenFlight APIs includes the following:

  • Read Data and Write Data APIs to open up access to the OpenFlight database
  • Data Extensions API to customize OpenFlight databases by expanding data attribute files and adding database structures
  • Tools API to aid the development of custom plug-in modeling tools

Improved access to OpenFlight databases

The Read Data and Write Data APIs improve access to the OpenFlight database and simplify the development of applications using OpenFlight. These APIs come standard with the Presagis product and are independent of the MultiGen realtime 3D modeling environment.

Data Read API

The Data Read API is the bridge between the OpenFlight database and image generators that use a different runtime format. The Data Read API provides basic access routines to open, query, retrieve, and document OpenFlight format files. API users can easily convert OpenFlight databases to a different runtime format by using the Data Read API routines in conjunction with their own value-added code.
This API significantly reduces the development effort previously required to build hardware-specific loaders or data converters. It also shields users from future changes in the OpenFlight structure, protecting their substantial development investment.

Data Write API

The Data Write API gives visual simulation developers greater flexibility to adapt OpenFlight databases to the unique requirements of target image generators. Providing a set of library functions, the Data Write API enables users to more easily:

  • Modify the attributes of existing OpenFlight files.
  • Manipulate the hierarchy of existing OpenFlight databases.
  • Create new OpenFlight databases without using the MultiGen modeler.
  • Convert external data formats to OpenFlight. Content created with commercially available modeling tools, such as various CAD packages, 3D Studio, or SoftImage, can be imported and stored in OpenFlight format.

Easy expansion of OpenFlight databases

The Data Extensions API lets visual simulation developers add attributes and functionality not directly supported by OpenFlight. Using the Data Extensions API from within the Presagis software development environment, developers can readily:

  • Expand the data associated with OpenFlight data files
  • Add new database nodes

How the Data Extensions API can be used

The Data Extensions API can be used to meet data requirements that are specific to an image generator but not native to OpenFlight. Just a few examples include:

  • Allowing for multiple numbers of textures per polygon
  • Calculating and storing face normals
  • Expanding DFAD source data to be tagged along with OpenFlight polygons
  • Customizing Level-of-Detail (LOD) implementation
  • Including atmospheric flags in the database hierarchy

Because an OpenFlight file can have multiple extensions, developers can program for multiple image generators at the same time. The extensions for each target image generator are displayed on OpenFlight attribute pages within the MultiGen modeler. During modeling sessions, Presagis behaves as though the extensions are native to OpenFlight: Extensions are automatically written to and read from disk. They are displayed on Presagis attribute pages. They can be searched and modified.
All defining information about data extensions is contained in the Data Dictionary. The Data Dictionary includes extension name, data type, associated OpenFlight node, and conversion callbacks. For record extensions, the Data Dictionary also includes information about record length, content, and attachment rules. Presagis automatically consults the Data Dictionary during modeling sessions. If the extension requires extra processing--for example, a face normal calculation--the code to perform the function must be included. The Data Dictionary can be shared among Presagis users, or it can be withheld to protect proprietary information.

Specialized plug-in tools

Presagis provides a set of powerful modeling tools for building realtime 3D simulations. With the Tools API, currently under development, Presagis users will be able to expand this standard, general-purpose tool set with their own specialized tools that meet unique simulation requirements.
The Tools API gives developers access to Presagis kernel subsystems, such as the Tool Manager, Undo Manager, and Message Handler, allowing them to customize the user interface, to manipulate the database hierarchy, and, in future releases, to take over rendering specifics. With this access, Presagis users will be able to build their own interactive plug-in modules within the Presagis software development environment. In addition, tools developed using the Data Read/Write or Data Extensions APIs can easily be converted into interactive tools by adding the features of a graphical user interface, such as tool dialogs and undo procedures.

How the Tools API can be used

Consider this scenario. A company in the flight simulation arena has developed standalone, proprietary software that automates the generation of digital database components for airport runways and associated runway lighting. Runway information--such as runway type (CAT-I, -II, -II), approach lighting system (ALSF-I, -II), and runway length, width, and heading--are input by the user. From this data, the proprietary software automatically generates a polygonal database for the runway environment. With the Tools API, the proprietary software can be integrated into the Presagis modeler so that the data definition and polygonization appears to be part of the Presagis GUI. Then the native Presagis capability can be used to insert the runway geometry into a terrain database and to perform smoothing functions at the runway/terrain boundary. To the user, the proprietary software and Presagis operate seamlessly, as though they are one package.

The most common Tools API applications are expected to be data and image format importers and exporters, data editors, and data viewers. However, the possibilities for applications are limited only by the requirements and ingenuity of the user.

Everything necessary to enhance productivity

Presagis OpenFlight APIs are available for both UNIX and Windows NT development environments. OpenFlight files created in one environment can freely migrate to the other with no developer intervention. Each API comes with a Programmer's Guide of step-by-step instructions and a Reference Manual. To get programmers up to speed quickly, sample code for many common functions is also provided.

For more information

The OpenFlight APIs demonstrate the Presagis commitment to raising customer productivity to the highest level. For information about how to get access to the OpenFlight API for development purposes, click here.