VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Modifying and Extending the Simulation

VR-Forces may be modified and extended to change existing behavior or add entirely new capabilities.

This section describes the following alternatives for using the VR-Forces toolkit to create such modifications:

  1. Rebuild the VR-Forces application. Use this option if you want to use the application (front-end and back-end) supplied by MAK, but need to add additional features using the VR-Forces toolkit. Extend VR-Forces by rebuilding the application if you want to:

    • Remove functionality from the system.
    • Make changes that affect classes that you may need to override for multiple reasons.
    • Make extensive changes that require subclassing and installation of new objects using a factory rather than adding to the default system features.
  2. Build an application that uses components of the VR-Forces toolkit. Use this option if you want to use the VR-Forces toolkit as an API as you construct your own application.
  3. Build a plug-in. Use this option to modify VR-Forces without rebuilding the front-end or back-end. Create a plug-in if you want to:

    • Modify or upgrade features without changing the base installed version of VR-Forces. This lets you deliver changes to customers without requiring them to re-install the entire application.
    • Integrate your extensions with the work of other developers.
    • Easily include or exclude the new features depending on the needs of a particular simulation. Ideally, plug-in modules should be constrained to a specific, single piece of functionality. For example, if you want to add a new sensor and an unrelated new movement actuator, use separate plug-ins. However, if the new features work together, such as a new controller and actuator as part of a single movement system, use one plug-in.

The principal difference in code between a plug-in and a stand-alone application is whether you modify main.cxx or a plugin.cxx. The code you write to implement the new functionality will be the same. Switching between the plug-in approach and extending the application is straightforward.

Note
If you load multiple plug-ins that subclass the same object in a factory (for example, DtVrfGuiWindow), the plug-in that is loaded last will be the version that gets used. Therefore, if you plan to create a plug-in that subclasses objects, be sure that the classes you are subclassing and extending will not conflict with another plug-in.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)