If you want to modify or extend VR-Forces, there are two main approaches you can take: create a plug-in, or create a new stand-alone application (that is, rebuild vrfSim or vrfGui.)
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 toolbar and an unrelated new menu command, use separate plug-ins. However, if the new features work together, such as a new menu and a toolbar with icons for the same set of features, use one plug-in.
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.
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.
[<< Introduction to the VR-ForcesToolkit] [Home] [Top of Page]