VR-Forces 4.1 Class Documentation
2.1 - Getting Started with the VR-Forces Simulation API

Table of Contents

The main entry point to the VR-Forces Simulation API is the DtCgf class, defined in cgf.h.

An instance of DtCgf represents a simulation engine that can simulate objects, execute scenarios, and communicate with other HLA or DIS simulations. Its member functions allow you to create, load, or save scenarios, control scenario execution, and create, delete or modify objects. DtCgf relies on various other classes to perform most of its work, such as DtVrfObjectManager, DtPhysicalWorld, and so on. You need to understand these classes to customize or extend the functionality of the simulation engine, and we describe them in later chapters. However, to build default VR-Forces functionality into your applications, the DtCgf class is the only class you need to understand.

The source code for vrfSim (./appsrc/vrfSimUser/main.cxx) and for many of the VR-Forces API examples, does not appear to instantiate or use DtCgf directly. That is because it uses a higher-level class called DtVrfApp to handle creation and use of the DtCgf, based on command-line arguments, remote control messages, and so on. The DtVrfApp class is described in "CustomizingorExtendingtheSimulationEngine.

There are three primary approaches you can take to extend the VR-Forces simulation engine:

2.1.1 Plug-ins

A plug-in lets you extend VR-Forces without rebuilding the entire application. For a general discussion of using plug-ins, please see vrfExtendingVR-ForcesPluginsorStandAloneApplications. You can extend much of the vrfSim application through plug-ins. Through the plug-in interface you have access to:

For more information about plug-ins for the simulation engine, please see 2.3 - Creating a Plug-in.

2.1.2 Building an Extended vrfSim Application

While plug-ins provide a flexible way to deploy extensions to vrfSim, there may be cases in which you need to extend the vrfSim application. For example, you may need to extend the DtCgf class directly. "CustomizingorExtendingthevrfSimApplication, describes how to build an extended version of vrfSim.

2.1.3 Embedding VR-Forces in a Third Party Application

You can incorporate VR-Forces functionality in a third-party application (an application other than vrfSim) by creating an instance of a DtCgf application. The simpleCGF and simplePlan examples demonstrate how to do this. For more information, please see 2.2 - Using the DtCgf Class.

[Home] [Top of Page] [Using the DtCgf Class >>]


Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)