The Add ObjectList Folder example demonstrates the following:
- How to build a plugin module for the VR-Forces 3D Gui
- How to add a folder to organize objects to the Simulation Object List
- How to work with lists of entities and environment objects
- How to use boost signals to be notified of certain VR-Forces GUI events
Adding a New Folder to the Simulation Object List
The Add Object List Folder example is a simple example that shows how to add a new folder to the Simulation Object list and then to assign objects to this folder. The example will place Routes into this folder instead of under the Tactical Graphics folder.
It should be noted that you should only put unorganized objects into this folder. If organized objects (such as Tanks or Humans) are placed into this folder you will not be able to change their force by dragging/dropping to a new Force level folder. If you do try and organize Simulation Objects this way do be aware of the limitiations
How to Run the Example
Usage
Since this example is loaded as a plugin, it will need to be enabled in the Launcher. In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin.
-
Start vrfGui.
-
Start vrfSim.
-
Create a new scenario (e.g. EntityLevel SMS on Ground_DB II terrain).
-
Create a route.
-
The 'Simulation Object' panel will display the new Routes folder with the newly created route underneath it. Without the plugin - the route objects are created within the Tactical Graphics folder.
Plugin Entry Points and Code
#include <QtWidgets/QTreeWidget>
#include <boost/bind/bind.hpp>
using namespace makVrf;
using namespace makVrv;
{
QObject::tr("Tactical Graphic"), true);
item->setExpanded(true);
}
{
return true;
}
{
boost::bind(&SetupRouteRootNode, boost::placeholders::_1, &de));
}
{
info.
pluginDescription =
"This example will show how to add a folder to the object list for organizing routes";
}