VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Create Local Object in GUI (guiLocalCreateObject)

Table of Contents

The Create Local Object in GUI example demonstrates the following:

This example demonstrates how to use the DtLocalObjectManager to create objects in the GUI that are not published on the network. It also demonstrates how to use the DtIntervisibility driver to create intervisiblity objects.

In this example, a new menu item is added to the VRF GUI which will show a list of items that will be used to create local objects. When created a check mark will be put next to the menu item. If the menu item is selected again the check mark will be removed. This example will create items in all views (2D and 3D)

In this example the intervisibility line will be drawn between the M1A2 and the Airbus. This item will not be enabled until both the M1A2 and Airbus are created.

Usage

In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin. Then launch VR-Forces.

  1. Start vrfGui.
  2. Choose Object Demo Menu
  3. Select an item to create
  4. The item selected will be shown on the display.
  5. Select the item just created
  6. The item selected will be removed from the display.

Classes

DtGuiLocalCreateObjectMenuThe main menu for this example.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2014 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
//\file guiLocalCreateObject.cxx
//This file defines the generic DT_DLL_VRF_PLUGIN_EXPORT_MACRO. Use that macro when
//you want to export symbols. Also, in your CMakeLists.txt file, make sure to
//define the VRFPLUGIN_EXPORTS define to tell the compiler to define the macro as an
//export
#include <vrvCore/DtDe.h>
#include <QtGui/QMenu>
#include <QtGui/QMessageBox>
#include <boost/bind.hpp>
using namespace makVrf;
{
//Now, add the menu to the master mode configuration. mainMenu indicates that
//the example menu is going to be used as a top-level main menu rather than a
//sub-menu. Add it before the Task menu. To leave off the path will
//put the menu at the end of the menu bar
//Now, register all the menu items with the menu configuration
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectLine"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectArea"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectWaypoint"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectM1A2"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectAirbus320"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectFan"));
makVrv::DtMenuPath::mainMenu("DtGuiLocalCreateObjectMenu").item("DtGuiLocalCreateObjectAttachedLine"));
return true;
}
{
info.pluginName = "Gui Local Create Object";
info.pluginDescription = "This example shows how to use the DtLocalObjectManager and create objects without publishing them on the network.";
info.pluginVersion = "1.00";
info.pluginCreator = "MAK Technologies";
info.pluginCreatorEmail = "sales@mak.com";
info.pluginContactWebPage = "www.mak.com";
info.pluginContactMailingAddress = "150 Cambridge Park Drive 3rd Floor - Cambridge, MA 02140 USA";
info.pluginContactPhone = "(617) 876 8085";
}

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)