VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VR-Forces Simulation Object Editor Plug-In API

Table of Contents

Overview

The Simulation Object Editor API is a programming interface for customizing the Simulation Object Editor(SOE).

VR-Forces provides a simulation API that allows developers to add functionality to the simulation engine, such as adding a new kind of sensor, or extending the parameters of a simulation object. The SOE complements the simulation API, enabling developers to customize it so that end-users can configure their custom extensions to the simulation engine using the SOE. This enables new parameters and descriptors to be saved as part of simulation model set. The top class that encompasses the Simulation Object Editor is DtSimulationObjectEditorApplication. It has a DtSimulationObjectEditorWindow that shows the current lists of objects/systems/munitions depending on which tab is selected. This class has

DtUiElement

This is the base class for all the parameter/system parameter entry classes. A derived DtUiElement will have various controls allowing the user to input values for the parameters. Derived classes will register their creator function with the DtUiElement::UiElementFactoryMap.

Common Uses Cases

The most common situations in which VR-Forces customers decide they need to develop a Simulation Object Editor plug-in are:

Writing Plug-In For Component Customization

To expose new component parameters to the end-users in the SOE, one needs to add in a hook to the new component's DtComponentDescriptor, adding it to the appropriate component list(sensor/controller/actuator). This is achieved using DtSimulationObjectEditorApplication parent class DtParameterAlteringApplication:

This regiesters the new type of component descriptor. For components that use an existing descriptor, those components still need to be registered with the SOE but use the existing component descriptor type. Once registered any parameter in the component descriptor that has been set up as a variable binding in the system definition file will show up in the SOE. See the Radar Warning (radarWarnRx) example which creates a new component descriptor and adds a variable binding to the new parameter that can be edited in the SOE.

Writing Plug-In For Parameter Customization

When an object is selected in the SOE, the DtBehaviorUi looks at the ui-filename in the selected object's .ope file to determine what uiElements to create. There are multiple ways to add new parameters to the SOE for user customization:


Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)