VR-Vantage
Loading...
Searching...
No Matches
exampleMilStdSymbology

Overview

This example demonstrates how to initialize, use, and extend the vrvMilStd 2525D / APP-6D symbology library from a VR-Vantage plugin.

Eight 2D symbol widgets are placed on the Ground_DB II terrain, representing a gallery of entity types across the Air, Land Unit, Land Equipment, Sea Surface, and Sea Subsurface symbol sets. A toolbar provides six interactive buttons that exercise the key rendering parameters in real time.

Expected Result

Symbol gallery on Plan View

Example details

Unlike the standard vrvMilStd plugin, this example manually performs the full vrvMilStd initialization sequence in init() so that each step is visible and overridable.

The init() function loads the three JSON registries and creates a custom DtExampleMilStdManager – a DtMilStdManager subclass that overrides the renderer and SIDC-generator factory methods:

Per-DtDe JSON registry of MIL-STD frame and icon geometry.
#include <vrvCore/DtDe.h>
#include <boost/bind/bind.hpp>
static makVrv::vrvSignalsLib::connection thePostInitializeConnection;
static DtExampleMilStd::DtMilStdSymbolToolbar* theToolbar = nullptr;
static void slotPostInit( makVrv::DtDe& de, DtExampleMilStd::DtExampleMilStdManager* mgr )
{
thePostInitializeConnection.disconnect();
// DtExampleMilStdManager::slot_postInitialize() has already run (it was
// connected first, in the manager constructor) and has called initialize()
// and connectToDecorationSettings(). All that remains here is to create
// and start the driver now that the manager is fully initialised.
// Ownership transfers to driverManager on addDriver().
de.driverManager().addDriver( driver );
de.driverManager().startDriver( driver );
if ( theToolbar )
{
theToolbar->setDriver( driver );
}
}
void init( makVrv::DtDe& de )
{
// ----------------------------------------------------------------
// Step 1: Geometry database -- parses all milstd_*.json files.
// Stores pre-scaled polyline geometry in 200x200 milsymbol space.
// ----------------------------------------------------------------
auto* jsonReg = new makVrv::DtMilStdJsonRegistry();
jsonReg->load( de.dePathConfiguration().resolvePath( "$(DATA_DIR)/MilStd" ) );
Contains makVrv::DtAgentFactory class.
Contains makVrv::DtDe class.
#define DT_DE_INIT_ONCE(de)
This macro is called by modules in their init() function. This macro ensures that the module is only ...
Definition DtDe.h:30
Contains makVrv::DtDeMainWindow class.
Contains makVrv:DtMasterScene class.
Contains DtMilStdImguiDebugMenu declaration.
Contains makVrv::DtMilStdManagerInterface class.
Customer SVG override registry for MIL-STD-2525D symbols.
Contains makVrv::DtQtDeMainWindow class.
Contains makVrv::DtQtToolbarAssembler class.
JSON-driven registry mapping DIS entity-type fields to SIDC components.
Contains makVrv::DtVrvApplication implementation.
Contains makVrv::DtVrvFilesystem class.
Custom MIL-STD manager that injects a tracing SIDC generator and a hostile-indicator SVG renderer via...
Definition DtExampleMilStdManager.h:34
Driver that creates and manages a gallery of 2525D/APP-6D symbols.
Definition DtMilStdSymbolDriver.h:46
Toolbar that controls the MIL-STD symbology demonstration.
Definition DtMilStdSymbolToolbar.h:34
void setDriver(DtMilStdSymbolDriver *driver)
Set the driver that the toolbar controls. Called from installDriver() after the driver has been start...
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
DtAgentManager & agentManager()
Get the scene manager.
virtual const DtDePathConfiguration & dePathConfiguration() const
Return the DtDePathConfiguration.
virtual DtDriverManager & driverManager()
The DtMasterScene accessor. The function will throw before the initialize function is called.
virtual std::string resolvePath(const std::string &directory) const
void addDriver(DtDriver *driver)
Add a host driver to the master scene. The host is now owned by the Master Scene.
void startDriver(DtDriver *driver)
Start a driver driver modifying the scene.
Complete MIL-STD geometry registry loaded from JSON files.
Definition DtMilStdJsonRegistry.h:88
static void registerInstance(DtDe &de, DtMilStdJsonRegistry *registry)
Register registry on de (takes ownership).
DT_DLL_EXAMPLEACCESSORY void init(makVrv::DtDe &de)
Contains DLL export macros.

After the manager is registered, the plugin connects a one-shot signal_postInitialize slot. When the display engine finishes initialization the manager's own slot_postInitialize() has already run (it was connected first in the manager constructor), so the plugin slot only needs to create and start the driver:

thePostInitializeConnection = de.signal_postInitialize.connect(boost::bind(&slotPostInit, boost::ref(de), mgr));
boost::signalslib::signal< void()> signal_postInitialize
Definition DtDe.h:535

DtMilStdSymbolDriver::onTick() defers widget creation until the manager reports isInitialized(), which guarantees that the texture atlases are ready. On the first tick after initialization the driver switches to Plan View, then creates one DtSceneObjectAgent / DtProjectedWidgetModelAgent / DtWidgetLabelAgent triple per symbol:

if (!iface.isInitialized())

The virtual texture key that drives each widget is produced by the manager interface:

DtExampleMilStdRenderer overrides render() to inject a red diamond into the SVG of every Hostile symbol, demonstrating the createRenderer() factory override point in DtMilStdManager:

if ( symbol.standardIdentity() != makVrv::DtStandardIdentity::Hostile )
@ Hostile
Definition DtMilStdTypes.h:52

Toolbar buttons

Button What it demonstrates
Ghost Alpha Toggles DtMilStdKeyParams::myAlphaOverride between 128 (50%% ghost) and 255 (fully opaque).
Planned Toggles status 0 / 1; status=1 renders with a dashed-frame overlay.
Exercise Toggles context 0 / 1; exercise adds an X/J/K letter decorator to the right of the frame.
APP-6D Toggles DtMilStdKeyParams::myMilStdOverride between 2525D and APP-6D per symbol.
Add Override Calls DtMilStdSvgOverrideRegistry::addEntityTypeOverride() with a gold-star SVG for the Fighter aircraft, then rebuilds all keys.
Remove Override Removes the override and rebuilds keys to revert to the standard icon.

Building the Example

VR-Vantage includes pre-built versions of the example plug-in. To build it yourself, follow the instructions at Building VR-Vantage Examples, Applications, and Plug-ins.

Running the Example

This example is a plug-in. You can run it by running ./bin64/exampleMilStdSymbology_stealth.bat (on Windows from cmd.exe) or ./bin64/exampleMilStdSymbology_stealth.sh (on Linux). For more information about running examples, please see Running Applications and Examples.

Example Source Files


DtExampleMilStdManager.h

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#pragma once
namespace DtExampleMilStd
{
class DT_DLL_EXAMPLEMILSTD DtExampleMilStdManager : public makVrv::DtMilStdManager
{
public:
explicit DtExampleMilStdManager( makVrv::DtDe& de );
protected:
virtual std::unique_ptr<makVrv::DtMilStdSVGRenderer>
createRenderer( const makVrv::DtMilStdJsonRegistry& registry ) override;
virtual std::unique_ptr<makVrv::DtMilStdSIDCGenerator>
createSidcGenerator( const makVrv::DtTypeToSidcJsonRegistry& registry ) override;
};
} // namespace DtExampleMilStd
Contains makVrv::DtMilStdManager class.
Concrete MIL-STD manager - renders SIDC symbols to DtTextureInterface.
Definition DtMilStdManager.h:52
Per-DtDe registry that maps DIS entity-type fields to SIDC component strings.
Definition DtTypeToSidcJsonRegistry.h:40
Export macro and initialization declarations for exampleMilStdSymbology.
#define DT_DLL_EXAMPLEMILSTD
Definition exampleMilStdSymbology.h:19
Definition DtExampleMilStdManager.h:16

DtExampleMilStdManager.cxx

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#include <memory>
namespace DtExampleMilStd
{
// ============================================================
// DtTracingSIDCGenerator -- private to this translation unit.
// Overrides generateSIDC() to log every DIS->SIDC translation.
// ============================================================
class DtTracingSIDCGenerator : public makVrv::DtMilStdSIDCGenerator
{
public:
virtual std::string generateSIDC(
int kind, int domain, int country,
int category, int subcategory,
int specific, int extra,
makVrv::DtStandardIdentity standardIdentity,
makVrv::DtSymbologyStandard standard ) const override
{
kind, domain, country,
category, subcategory, specific, extra,
standardIdentity, ctx, stat, hqtf, echelon, standard );
DtInfo << "[exampleMilStdSymbology] DIS "
<< kind << ":" << domain << ":" << country << ":"
<< category << ":" << subcategory << ":" << specific << ":" << extra
<< " stdId=" << static_cast<int>( standardIdentity )
<< " -> SIDC " << sidc << std::endl;
return sidc;
}
};
// ============================================================
// DtExampleMilStdManager
// ============================================================
: DtMilStdManager( de )
{
}
std::unique_ptr<makVrv::DtMilStdSVGRenderer>
DtExampleMilStdManager::createRenderer( const makVrv::DtMilStdJsonRegistry& registry )
{
// Return our custom renderer instead of the default DtMilStdSVGRenderer.
// DtMilStdManager::initialize() calls createRenderer() once and stores
// the result; every subsequent buildBitmap() call uses this renderer.
return std::make_unique<DtExampleMilStdRenderer>( registry );
}
std::unique_ptr<makVrv::DtMilStdSIDCGenerator>
DtExampleMilStdManager::createSidcGenerator( const makVrv::DtTypeToSidcJsonRegistry& registry )
{
// Return the tracing generator instead of the default DtMilStdSIDCGenerator.
// Every call to DtMilStdManagerInterface::generateSIDC() dispatches through here.
return std::make_unique<DtTracingSIDCGenerator>( registry );
}
} // namespace DtExampleMilStd
DtMilStdManager subclass demonstrating the two factory overrides.
DtMilStdSVGRenderer subclass that marks hostile symbols.
SIDC generation from DIS entity-type fields.
DtExampleMilStdManager(makVrv::DtDe &de)
Construct the main-thread instance on de.
Generates 20-character MIL-STD-2525D / APP-6D SIDC strings from DIS (Distributed Interactive Simulati...
Definition DtMilStdSIDCGenerator.h:43
DtMilStdSIDCGenerator(const DtTypeToSidcJsonRegistry &registry)
Construct with the SIDC/entity-type registry that provides all lookups.
virtual std::string generateSIDC(int kind, int domain, int country, int category, int subcategory=0, int specific=0, int extra=0, DtStandardIdentity standardIdentity=DtStandardIdentity::Friend, DtContext ctx=DtContext::Reality, DtStatus stat=DtStatus::Present, DtHqTfDummy hqtf=DtHqTfDummy::NotApplicable, DtEchelonMobilityTowed echelon=DtEchelonMobilityTowed::NotApplicable, DtSymbologyStandard standard=DtSymbologyStandard::MilStd2525D) const
Generate a 20-character SIDC from DIS entity-type components.
DtStatus
Definition DtMilStdTypes.h:57
DtHqTfDummy
Definition DtMilStdTypes.h:129
DtStandardIdentity
Definition DtMilStdTypes.h:45
DtContext
Definition DtMilStdTypes.h:120
DtSymbologyStandard
Military symbology standard.
Definition DtSymbologyEnums.h:19
DtEchelonMobilityTowed
MIL-STD-2525D Table A-8 amplifier descriptor codes for SIDC positions 9-10.
Definition DtMilStdTypes.h:147

DtExampleMilStdRenderer.h

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#pragma once
namespace DtExampleMilStd
{
class DT_DLL_EXAMPLEMILSTD DtExampleMilStdRenderer : public makVrv::DtMilStdSVGRenderer
{
public:
explicit DtExampleMilStdRenderer( const makVrv::DtMilStdJsonRegistry& registry );
virtual bool render( const makVrv::DtMilStdSymbol& symbol, std::string& svgOut ) override;
};
} // namespace DtExampleMilStd
SVG renderer for MIL-STD-2525D / APP-6D symbols using DtMilStdJsonRegistry geometry.
SVG renderer for MIL-STD-2525D / APP-6D military symbols.
Definition DtMilStdSVGRenderer.h:54
Military symbol parsed from a SIDC string.
Definition DtMilStdSymbol.h:52

DtExampleMilStdRenderer.cxx

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#include <cstdio>
#include <string>
namespace DtExampleMilStd
{
: makVrv::DtMilStdSVGRenderer( registry )
{
}
bool DtExampleMilStdRenderer::render( const makVrv::DtMilStdSymbol& symbol, std::string& svgOut )
{
// Call the base renderer first to produce the standard 2525D / APP-6D SVG.
if ( !makVrv::DtMilStdSVGRenderer::render( symbol, svgOut ) )
{
return false;
}
// Only hostile symbols receive the extra indicator.
{
return true;
}
// Inject a small red filled diamond centered on the symbol frame.
// The SVG canvas is (size) pixels wide. topHatSize() is the number of
// extra pixels above the standard frame area (for echelon/HQ decorations).
// Frame center in SVG pixel space:
// cx = size / 2
// cy = topHatSize + size / 2
// Diamond half-extent = size / 10 (10% of the symbol size).
const int sz = symbol.size();
const int top = symbol.topHatSize();
const int cx = sz / 2;
const int cy = top + sz / 2;
const int r = sz / 10;
// Build a polygon string using the four cardinal points of the diamond.
// Format: top, right, bottom, left (x,y pairs).
static constexpr int thePolygonBufSize = 256;
char buf[thePolygonBufSize];
std::snprintf( buf, sizeof( buf ),
"<polygon points=\"%d,%d %d,%d %d,%d %d,%d\""
" fill=\"#cc0000\" fill-opacity=\"0.75\" stroke=\"none\"/>\n",
cx, cy - r, // top
cx + r, cy, // right
cx, cy + r, // bottom
cx - r, cy // left
);
// Insert the polygon before the closing </svg> tag.
const std::string::size_type pos = svgOut.rfind( "</svg>" );
if ( pos != std::string::npos )
{
svgOut.insert( pos, std::string( buf ) );
}
return true;
}
} // namespace DtExampleMilStd
DtExampleMilStdRenderer(const makVrv::DtMilStdJsonRegistry &registry)
Construct with the registry that provides frame/icon geometry.
virtual bool render(const DtMilStdSymbol &symbol, std::string &outputSvgString)
Render a symbol as an SVG string.
int size() const
Set/Get the symbol canvas size.
Definition DtMilStdSymbol.h:103
int topHatSize() const
Return the top-hat pixel height; 0 when hasTopHat() is false.
DtStandardIdentity standardIdentity() const
Return the standard identity (affiliation) from SIDC position 4.
Definition DtMilStdSymbol.h:65
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16

DtMilStdSymbolDriver.h

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#pragma once
#include <matrix/vlVector.h>
#include <string>
#include <vector>
namespace makVrv
{
class DtAgentManager;
class DtWidgetLabelAgent;
class DtSceneObjectAgent;
class DtProjectedWidgetModelAgent;
} // namespace makVrv
namespace DtExampleMilStd
{
class DtExampleMilStdManager;
class DT_DLL_EXAMPLEMILSTD DtMilStdSymbolDriver : public makVrv::DtDriver
{
public:
DtMilStdSymbolDriver(makVrv::DtAgentManager& am, DtExampleMilStdManager* mgr);
virtual ~DtMilStdSymbolDriver();
virtual const std::string& className() const override;
virtual bool onStart() override;
virtual bool onStop() override;
virtual bool onTick() override;
void toggleGhostAlpha();
void togglePlannedStatus();
void toggleExerciseContext();
void toggleApp6D();
void addOverride();
void removeOverride();
struct SymbolDef
{
const char* myName = nullptr;
int myKind = 0;
int myDomain = 0;
int myCountry = 0;
int myCategory = 0;
int mySubcategory = 0;
int mySpecific = 0;
int myExtra = 0;
int myForceId = 0;
std::string myTypeString;
DtVector myWorldPos;
};
private:
struct LiveSymbol
{
const SymbolDef* myDef = nullptr;
makVrv::DtElementID myElementId;
makVrv::DtSceneObjectAgent* mySceneObj = nullptr;
makVrv::DtWidgetLabelAgent* myLabel = nullptr;
std::string mySidc;
};
void rebuildKey(LiveSymbol& s);
DtExampleMilStdManager* myMgr = nullptr;
std::vector<LiveSymbol> mySymbols;
bool myGhostActive = false;
bool myPlannedActive = false;
bool myExerciseActive = false;
bool myApp6DActive = false;
};
} // namespace DtExampleMilStd
Contains makVrv:DtDriver class.
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition DtAgentManager.h:39
The DtDriver is an abstract class. Developers derive from this to create logic that "directs" things ...
Definition DtDriver.h:32
Agent class for the scene object class: DtProjectedWidgetModel.
Definition DtProjectedWidgetModelAgent.hpp:26
Agent class for the scene object class: DtSceneObject.
Definition DtSceneObjectAgent.hpp:32
Class to manage disconnection of boost connections on deletion.
Definition DtSignalConnectionManager.h:21
Agent class for the scene object class: DtWidgetLabel.
Definition DtWidgetLabelAgent.hpp:29
DtUniqueID DtElementID
Definition DtUniqueID.h:23
Parameters that describe a MIL-STD symbol key.
Definition DtMilStdManagerInterface.h:36

DtMilStdSymbolDriver.cxx

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#include <vrvCore/DtDe.h>
namespace DtExampleMilStd
{
// -----------------------------------------------------------------------
// Symbol gallery definition -- 8 entities across 5 symbol sets.
// World positions are in Ground_DB II local database coordinates.
// forceId: 1=Friend, 2=Hostile, 3=Neutral (per DIS convention).
// -----------------------------------------------------------------------
static const DtMilStdSymbolDriver::SymbolDef theSymbolDefs[] = {
// name kind dom cty cat sub sp ex force worldPos
{"Fighter (Friend)", 1, 2, 225, 1, 0, 0, 0, 1, "1:2:225:1:-1:-1:-1", DtVector(-225.0, -75.0, 200.0)},
{"Attack Helo (Friend)", 1, 2, 225, 20, 0, 0, 0, 1, "1:2:225:20:-1:-1:-1", DtVector(-75.0, -75.0, 200.0)},
{"Tank M1A2 (Friend)", 1, 1, 225, 1, 0, 0, 0, 1, "1:1:225:1:-1:-1:-1", DtVector(75.0, -75.0, 20.0)},
{"IFV Bradley (Friend)", 1, 1, 225, 2, 1, 0, 0, 1, "1:1:225:2:1:-1:-1", DtVector(225.0, -75.0, 20.0)},
{"Destroyer DDG (Friend)", 1, 3, 225, 4, 0, 0, 0, 1, "1:3:225:4:-1:-1:-1", DtVector(-225.0, 75.0, 0.0)},
{"Submarine (Hostile)", 1, 4, 225, 3, 0, 0, 0, 2, "1:4:225:3:-1:-1:-1", DtVector(-75.0, 75.0, 0.0)},
{"Artillery SP (Neutral)", 1, 1, 225, 4, 0, 0, 0, 3, "1:1:225:4:-1:-1:-1", DtVector(75.0, 75.0, 20.0)},
{"Cargo Ship (Neutral)", 1, 3, 225, 80, 0, 0, 0, 3, "1:3:225:80:-1:-1:-1", DtVector(225.0, 75.0, 0.0)}};
static const int theSymbolCount = static_cast<int>(sizeof(theSymbolDefs) / sizeof(theSymbolDefs[0]));
// Gold star SVG used for the Fighter override.
static const char* theStarSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\""
" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\">"
"<rect width=\"100\" height=\"100\" fill=\"none\" stroke=\"none\"/>"
"<polygon"
" points=\"50,10 61,35 90,35 67,57 76,82 50,65 24,82 33,57 10,35 39,35\""
" fill=\"#ffd700\" stroke=\"#333333\" stroke-width=\"2\"/>"
"</svg>";
// Blue circle SVG used for the atlas pathway demo.
static const char* theCircleSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\""
" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\">"
"<circle cx=\"50\" cy=\"50\" r=\"40\""
" fill=\"#4488ff\" stroke=\"#222222\" stroke-width=\"3\"/>"
"</svg>";
// Entity-type pattern for the Fighter: kind=1, domain=2, country=225, category=1,
// subcategory=-1 (wildcard), specific=-1 (wildcard), extra=-1 (wildcard).
static const char* theOverridePattern = "1:2:225:1:-1:-1:-1";
// -----------------------------------------------------------------------
: DtDriver(am, "DtMilStdSymbolDriver")
, myMgr(mgr)
{
myConnections.manageConnection( sig.signal_milSymbolStandardChanged.connect(
[this]( auto standard )
{
for ( auto& s : mySymbols )
{
rebuildKey( s );
}
} ) );
myConnections.manageConnection( sig.signal_colorSymbolByForceChanged.connect(
[this]( auto colorByForce )
{
for ( auto& s : mySymbols )
{
rebuildKey( s );
}
} ) );
myConnections.manageConnection( sig.signal_symbolOutlineColorOverrideChanged.connect(
[this]( auto forceId, auto color, auto enabled )
{
for ( auto& s : mySymbols )
{
rebuildKey( s );
}
} ) );
}
DtMilStdSymbolDriver::~DtMilStdSymbolDriver()
{
DtMilStdSymbolDriver::onStop();
}
const std::string& DtMilStdSymbolDriver::className() const
{
static std::string theName = "DtMilStdSymbolDriver";
return theName;
}
bool DtMilStdSymbolDriver::onStart()
{
// Load Ground_DB II so there is a terrain beneath the symbols.
makVrv::DtScene& scene = myAgentManager.de().scene();
std::string groundDb = myAgentManager.de().dePathConfiguration().sharedDataPath();
groundDb += "/TerrainData/TerrainConfiguration/Ground_DB II.mtf";
scene.loadTerrain(groundDb);
if (obs)
{
obs->setObserverMode( omm.lookupObserverModeKey( "Plan View" ) );
}
return true;
}
bool DtMilStdSymbolDriver::onStop()
{
for (auto& s : mySymbols)
{
reportElementDestroyed(s.myElementId);
s.myPwma->removeWidget(s.myLabel);
delete s.myLabel;
s.myLabel = nullptr;
s.mySceneObj->removeModel(s.myPwma);
delete s.myPwma;
s.myPwma = nullptr;
delete s.mySceneObj;
s.mySceneObj = nullptr;
}
mySymbols.clear();
return true;
}
static unsigned long long theFrameNum = 0;
bool DtMilStdSymbolDriver::onTick()
{
if (!iface.isInitialized())
{
return true;
}
if (mySymbols.empty())
{
theFrameNum = myAgentManager.de().currentFrameNumber();
// ----------------------------------------------------------------
// Create 8 symbol widgets, one for each entry in theSymbolDefs.
// ----------------------------------------------------------------
mySymbols.reserve(theSymbolCount + 1);
for (int i = 0; i < theSymbolCount; ++i)
{
const SymbolDef& def = theSymbolDefs[i];
// --- Generate the 20-character SIDC ----------------------------
// DtTracingSIDCGenerator (injected via createSidcGenerator) logs
// the DIS tuple -> SIDC mapping to stdout on every call.
const std::string sidc = iface.generateSIDC(def.myKind, def.myDomain, def.myCountry, def.myCategory,
def.mySubcategory, def.mySpecific, def.myExtra, def.myForceId);
DtInfo << "[exampleMilStdSymbology] " << def.myName << " -> SIDC " << sidc << std::endl;
// --- Build the virtual key ------------------------------------
// The key encodes the SIDC plus rendering parameters.
params.mySidc = sidc;
params.myColorMode = 0; // 0=Light (default pastel fills)
params.myAlphaOverride = 255; // 255=fully opaque
const std::string key = iface.generateMilStdKey(params);
DtInfo << "[exampleMilStdSymbology] " << def.myName << " key=" << key << std::endl;
// --- Dump SVG for the first symbol (debug tool) ---------------
if (i == 0)
{
std::string svg;
iface.svgSource(key, svg);
DtInfo << "[exampleMilStdSymbology] SVG for " << def.myName << " (first " << static_cast<int>(svg.size())
<< " chars):\n"
<< svg << std::endl;
}
// --- Create the scene agents ----------------------------------
const int symbolSz = iface.symbolSize();
const int renderH = iface.renderHeight(sidc);
LiveSymbol ls;
ls.myDef = &def;
ls.mySidc = sidc;
ls.myParams = params;
ls.myElementId = myAgentManager.createNewUniqueId();
ls.mySceneObj = makVrv::DtSceneObjectAgent::create(myAgentManager);
ls.myPwma = makVrv::DtProjectedWidgetModelAgent::create(myAgentManager);
ls.myLabel = dynamic_cast<makVrv::DtWidgetLabelAgent*>(iface.createMilStdWidgetAgent());
if (!ls.mySceneObj || !ls.myPwma || !ls.myLabel)
{
DtWarn << "[exampleMilStdSymbology] Failed to create agents for " << def.myName << std::endl;
delete ls.myLabel;
delete ls.myPwma;
delete ls.mySceneObj;
continue;
}
// Scene object: attach to the 2D icon model set.
ls.mySceneObj->setModelSet(makVrv::DtModelSetId::Icons2D);
ls.mySceneObj->setElementID(ls.myElementId);
ls.mySceneObj->addModel(ls.myPwma, makVrv::DtStateVisualizer::EntityVisualizerType);
ls.mySceneObj->setPosition(0, def.myWorldPos);
// Widget label: set the MIL-STD key as the background image.
ls.myLabel->setColor(1, 1, 1, 1);
ls.myLabel->setTextBoundsPolicy(static_cast<int>(makVrv::DtWidgetLabel::TextBoundsPolicy::ConstrainToNone));
ls.myLabel->setSize(symbolSz, renderH);
ls.myLabel->setEventsEnabled(true);
ls.myLabel->setBackgroundImage(key);
ls.myPwma->addWidget(ls.myLabel);
// Report the element to VR-Vantage so it appears in the entity list.
reportElementAttribute(ls.myElementId, new makVrv::DtElementAttributeDisplayName(def.myName));
reportElementAttribute(ls.myElementId, new makVrv::DtElementAttributeConnectionObjectSidc(sidc));
reportElementAttribute(ls.myElementId, new makVrv::DtElementAttributeConnectionObjectType(def.myTypeString));
reportElementCreated(ls.myElementId, 0, makVrv::DtElementEntry::Entity);
mySymbols.push_back(std::move(ls));
}
// --- SVG Demo: Blue circle (same pathway, different SVG) ------
{
LiveSymbol ls;
ls.myDef = nullptr;
ls.myElementId = myAgentManager.createNewUniqueId();
ls.mySceneObj = makVrv::DtSceneObjectAgent::create(myAgentManager);
ls.myPwma = makVrv::DtProjectedWidgetModelAgent::create(myAgentManager);
ls.myLabel = makVrv::DtWidgetLabelAgent::create(myAgentManager);
if (ls.mySceneObj && ls.myPwma && ls.myLabel)
{
ls.mySceneObj->setModelSet(makVrv::DtModelSetId::Icons2D);
ls.mySceneObj->setElementID(ls.myElementId);
ls.mySceneObj->addModel(ls.myPwma, makVrv::DtStateVisualizer::EntityVisualizerType);
ls.mySceneObj->setPosition(0, DtVector(75.0, 225.0, 200.0));
ls.myLabel->setColor(1, 1, 1, 1);
ls.myLabel->setTextBoundsPolicy(static_cast<int>(makVrv::DtWidgetLabel::TextBoundsPolicy::ConstrainToBounds));
ls.myLabel->setSize(100, 100);
ls.myLabel->setEventsEnabled(false);
ls.myLabel->setRasterSize(120, 120);
ls.myLabel->setSvgSource(theCircleSvg);
ls.myPwma->addWidget(ls.myLabel);
reportElementAttribute(ls.myElementId, new makVrv::DtElementAttributeDisplayName("SVG (circle)"));
reportElementCreated(ls.myElementId, 0, makVrv::DtElementEntry::Entity);
mySymbols.push_back(std::move(ls));
DtInfo << "[exampleMilStdSymbology] Created SVG widget (blue circle via setSvgSource)." << std::endl;
}
else
{
delete ls.myLabel;
delete ls.myPwma;
delete ls.mySceneObj;
}
}
}
if (myAgentManager.de().currentFrameNumber() == theFrameNum + 1)
{
for (auto& s : mySymbols)
{
if (s.myDef)
{
rebuildKey(s);
}
}
}
return true;
}
// -----------------------------------------------------------------------
// rebuildKey -- regenerate SIDC + key from current state flags and push
// the new key to the widget label.
// -----------------------------------------------------------------------
void DtMilStdSymbolDriver::rebuildKey(LiveSymbol& s)
{
if (!s.myDef)
{
return;
}
const int context = myExerciseActive ? 1 : 0;
const int status = myPlannedActive ? 1 : 0;
// Regenerate the SIDC with updated context/status/standard.
// The tracing generator in DtExampleMilStdManager will log the call.
s.mySidc = iface.generateSIDC(
s.myDef->myKind,
s.myDef->myDomain,
s.myDef->myCountry,
s.myDef->myCategory,
s.myDef->mySubcategory,
s.myDef->mySpecific,
s.myDef->myExtra,
s.myDef->myForceId,
context,
status,
0,
0,
standard);
params.mySidc = s.mySidc;
params.myColorMode = 0;
params.myAlphaOverride = myGhostActive ? static_cast<uint8_t>(0x80) : static_cast<uint8_t>(0xFF);
params.myMilStdOverride = standard;
s.myDef->myKind, s.myDef->myDomain, s.myDef->myCountry,
s.myDef->myCategory, s.myDef->mySubcategory, s.myDef->mySpecific,
s.myDef->myExtra, s.myDef->myForceId);
// also can be used
// params.myOverrideIndex = iface.isSidcOverridden(s.mySidc);
s.myParams = params;
const std::string key = iface.generateMilStdKey(params);
s.myLabel->setColor(1.0, 1.0, 1.0, 1.0);
s.myLabel->setBackgroundImage(key);
// Update the widget height in case status/context changed the decoration.
s.myLabel->setSize(iface.symbolSize(), iface.renderHeight(s.mySidc));
}
// -----------------------------------------------------------------------
// Toggle methods (called from DtMilStdSymbolToolbar)
// -----------------------------------------------------------------------
void DtMilStdSymbolDriver::toggleGhostAlpha()
{
myGhostActive = !myGhostActive;
DtInfo << "[exampleMilStdSymbology] Ghost alpha: "
<< (myGhostActive ? "ON (128/255 = 50% opacity)" : "OFF (255/255 = fully opaque)") << std::endl;
for (auto& s : mySymbols)
{
rebuildKey(s);
}
}
void DtMilStdSymbolDriver::togglePlannedStatus()
{
myPlannedActive = !myPlannedActive;
DtInfo << "[exampleMilStdSymbology] Status: " << (myPlannedActive ? "Planned (dashed frame)" : "Present") << std::endl;
for (auto& s : mySymbols)
{
rebuildKey(s);
}
}
void DtMilStdSymbolDriver::toggleExerciseContext()
{
myExerciseActive = !myExerciseActive;
DtInfo << "[exampleMilStdSymbology] Context: " << (myExerciseActive ? "Exercise (letter decorator)" : "Reality") << std::endl;
for (auto& s : mySymbols)
{
rebuildKey(s);
}
}
void DtMilStdSymbolDriver::toggleApp6D()
{
myApp6DActive = !myApp6DActive;
DtInfo << "[exampleMilStdSymbology] Standard: " << (myApp6DActive ? "APP-6D (NATO)" : "2525D (US)") << std::endl;
for (auto& s : mySymbols)
{
rebuildKey(s);
}
}
void DtMilStdSymbolDriver::addOverride()
{
// Inject a custom gold-star SVG for all Fighter aircraft (1:2:225:1:*:*:*).
// This overrides the standard 2525D fixed-wing aircraft icon.
//
// addEntityTypeOverride() stores the SVG in the override registry.
// Rebuilding all keys causes the Fighter symbol's atlas slot to be
// re-rendered using the new SVG without needing to change the widget's
// key string.
reg.addEntityTypeOverride(theOverridePattern, theStarSvg, /*highlight=*/false);
for (auto& s : mySymbols)
{
rebuildKey(s);
}
DtInfo << "[exampleMilStdSymbology] Override ADDED: Fighter now shows gold star." << std::endl;
}
void DtMilStdSymbolDriver::removeOverride()
{
reg.removeEntityTypeOverride(theOverridePattern);
// Rebuild keys for all symbols so the Override/<N> segment is dropped from
// any key that was generated while the override was active.
for (auto& s : mySymbols)
{
rebuildKey(s);
}
DtInfo << "[exampleMilStdSymbology] Override REMOVED: Fighter reverts to MIL-STD icon." << std::endl;
}
} // namespace DtExampleMilStd
Contains makVrv:DtAgentManager class.
Contains makVrv::DtDataBank class.
Contains makVrv::DtElementAttributes class.
Contains makVrv::DtElementData class.
Contains makVrv::DtElementEntry class.
Contains makVrv::DtInputDriver class.
Driver that places a gallery of 2525D/APP-6D symbols on the terrain.
Contains makVrv::DtObserver class.
Contains the DtObserverModeManager class declaration.
Contains makVrv::DtOverlayManager class.
Contains makVrv::DtScene class.
Contains makVrv::DtSharedSettingsManager class.
Contains makVrv:DtStateVisualizer class.
Contains the DtSymbolDecorationSettingsSignaler class declaration.
Contains various enum classes relating to symbology.
DtMilStdSymbolDriver(makVrv::DtAgentManager &am, DtExampleMilStdManager *mgr)
Construct with the agent manager and the custom manager pointer.
DtDe & de()
Get the scene manager's Ig object.
Definition DtAgentManager.h:107
DtInputDriver & inputDriver()
Return the DtInputDriver associated with the master scene.
@ Entity
Definition DtElementEntry.h:29
DtObserver * currentObserver() const
Abstract interface for rendering MIL-STD symbology icons as textures.
Definition DtMilStdManagerInterface.h:93
virtual int renderHeight(const std::string &sidc) const =0
Return the actual rendered pixel height for the given SIDC (size + topHatSize + bottomHatSize).
virtual int isEntityTypeOverridden(int kind, int domain, int country, int category, int subcategory, int specific, int extra, int force=-1) const =0
Test whether the given entity-type fields match any SVG override entry.
virtual std::string generateSIDC(int kind, int domain, int country, int category, int subcategory, int specific, int extra, int forceId, int context=0, int status=0, int hqtf=0, int echelon=0, DtSymbologyStandard standard=DtSymbologyStandard::Undefined)=0
Generate a MIL-STD virtual key from DIS entity-type fields.
virtual std::string generateMilStdKey(const DtMilStdKeyParams &params) const =0
Generate a MIL-STD virtual key from symbol parameters.
static DtMilStdManagerInterface & instance(DtDe &de)
Get (or lazily create) the per-DtDe singleton (main thread).
virtual bool isInitialized() const =0
Return true when the manager has completed initialisation and is ready to build symbols.
virtual void svgSource(const std::string &key, std::string &svg) const =0
Return the SVG source string for the symbol encoded in key. Debugging aid - not used by the manager i...
virtual int symbolSize() const =0
Return the configured symbol slot size in pixels (set via setSymbolSize()). This is the width of a st...
virtual DtWidgetLabelAgent * createMilStdWidgetAgent()=0
Create a DtMilStdWidgetAgent on the correct scene interface.
Registry of customer SVG overrides for MIL-STD-2525D symbols.
Definition DtMilStdSvgOverrideRegistry.h:63
static DtMilStdSvgOverrideRegistry & instance(DtDe &de)
Retrieve the registry registered on de.
virtual void removeEntityTypeOverride(const std::string &pattern, int force=-1)
Remove the entry matching the given entity-type pattern and force.
virtual void addEntityTypeOverride(const std::string &pattern, const std::string &svgContent, bool highlight, int force=-1)
Add or update an entity-type-pattern override.
A facade for a DtObserverObject.
Definition DtObserver.h:39
bool setObserverMode(int observerMode)
DtDe & de()
Get the observer's DtDe.
Definition DtObserver.h:52
DtObserverModeManager is responsible for loading and saving observer modes, and providing a mechanism...
Definition DtObserverModeManager.h:55
int lookupObserverModeKey(const std::string &stringKey) const
static DtObserverModeManager & instance(DtDe &de)
Get an instance used to emit, or to connect.
@ ModelSet_2D_Icons_Overlay
Definition DtOverlayManager.h:42
static DtProjectedWidgetModelAgent * create(makVrv::DtAgentManagerInterface &sceneInterface, bool bDistribute=true)
Static helper creator.
An object that represents everything that is visible in the scene.
Definition DtScene.h:45
bool loadTerrain(const DtUnicode &filePath)
Load the terrain from a file.
static DtSceneObjectAgent * create(makVrv::DtAgentManagerInterface &sceneInterface, bool bDistribute=true)
Static helper creator.
static DtSharedSettingsManager & instance(DtDe &)
Get an instance of the shared settings manager from the DtDe;.
@ EntityVisualizerType
Definition DtStateVisualizer.h:42
A signaler for the shared symbol decoration settings. This is used to send changes in currently used ...
Definition DtSymbolDecorationSettingsSignaler.h:36
event_signal< void(bool)> signal_colorSymbolByForceChanged
Definition DtSymbolDecorationSettingsSignaler.h:75
event_signal< void(bool, const DtColorValue &, const DtColorValue &)> signal_symbolOutlineColorOverrideChanged
Signal sent when outline color override state/colors have changed.
Definition DtSymbolDecorationSettingsSignaler.h:78
static DtSymbolDecorationSettingsSignaler & instance(const DtSharedSettingsManager &mgr)
event_signal< void(DtSymbologyStandard)> signal_milSymbolStandardChanged
Definition DtSymbolDecorationSettingsSignaler.h:82
virtual void setPosition(float x, float y, float z, float w)=0
Sets the position of the widget, the coordinate system is defined by the overlay. Other objects may c...
static DtWidgetLabelAgent * create(makVrv::DtAgentManagerInterface &sceneInterface, bool bDistribute=true)
Static helper creator.
@ ConstrainToNone
Definition DtWidgetLabel.h:64
@ ConstrainToBounds
Definition DtWidgetLabel.h:62
DtUniqueElementAttribute< std::string, DtElementAttributes::DisplayName > DtElementAttributeDisplayName
Definition DtElementAttributes.h:88
@ Icons2D
Definition DtModelSetEnums.h:27
DtUniqueElementAttribute< std::string, DtElementAttributes::ConnectionObjectType > DtElementAttributeConnectionObjectType
Definition DtElementAttributes.h:79
@ MilStdApp6D
APP-6D (NATO).
Definition DtSymbologyEnums.h:22
@ MilStd2525D
MIL-STD-2525D (US/default).
Definition DtSymbologyEnums.h:21
DtUniqueElementAttribute< std::string, DtElementAttributes::ConnectionObjectSidc > DtElementAttributeConnectionObjectSidc
Definition DtElementAttributes.h:82
int myOverrideIndex
Zero-based SVG override entry index; -1 = none.
Definition DtMilStdManagerInterface.h:39
uint8_t myAlphaOverride
Definition DtMilStdManagerInterface.h:51
DtSymbologyStandard myMilStdOverride
Definition DtMilStdManagerInterface.h:40
std::string mySidc
20-char SIDC; dashes are accepted on input.
Definition DtMilStdManagerInterface.h:37
int myColorMode
0=Light 1=Medium 2=Dark.
Definition DtMilStdManagerInterface.h:38

DtMilStdSymbolToolbar.h

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#pragma once
class QToolBar;
class QWidget;
namespace makVrv { class DtDe; }
namespace DtExampleMilStd { class DtMilStdSymbolDriver; }
namespace DtExampleMilStd
{
class DT_DLL_EXAMPLEMILSTD DtMilStdSymbolToolbar : public makVrv::DtToolbar
{
public:
explicit DtMilStdSymbolToolbar( makVrv::DtDe& de );
virtual ~DtMilStdSymbolToolbar();
void setDriver(DtMilStdSymbolDriver* driver);
virtual QToolBar* createToolbar( makVrv::DtDe& de, QWidget* parent ) override;
private:
makVrv::DtDe& myDe;
DtMilStdSymbolDriver* myDriver = nullptr;
};
} // namespace DtExampleMilStd
Contains makVrv::DtToolbar class declaration.
The base class for VR-Vantage toolbars.
Definition DtToolbar.h:27

DtMilStdSymbolToolbar.cxx

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#include <vrvCore/DtDe.h>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QAction>
namespace DtExampleMilStd
{
: DtToolbar( de, "DtMilStdSymbolToolbar" )
, myDe( de )
{
}
DtMilStdSymbolToolbar::~DtMilStdSymbolToolbar()
{
}
void DtMilStdSymbolToolbar::setDriver( DtMilStdSymbolDriver* driver )
{
myDriver = driver;
}
QToolBar* DtMilStdSymbolToolbar::createToolbar( makVrv::DtDe& /*de*/, QWidget* parent )
{
QToolBar* bar = new QToolBar( parent );
bar->setWindowTitle( QObject::tr( "MIL-STD Symbology" ) );
bar->setObjectName( "DtMilStdSymbolToolbar" );
// Ghost Alpha: toggles myAlphaOverride between 128 (ghost) and 255 (opaque).
QAction* ghostAction = bar->addAction( QObject::tr( "Ghost Alpha" ) );
ghostAction->setCheckable( true );
ghostAction->setToolTip( QObject::tr(
"Toggle alpha override: 128/255 = 50% opacity (ghost state)" ) );
QObject::connect( ghostAction, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->toggleGhostAlpha(); } } );
bar->addSeparator();
// Planned Status: status=1 renders a dashed frame overlay.
QAction* plannedAction = bar->addAction( QObject::tr( "Planned" ) );
plannedAction->setCheckable( true );
plannedAction->setToolTip( QObject::tr(
"Toggle status: Planned (dashed frame) vs Present" ) );
QObject::connect( plannedAction, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->togglePlannedStatus(); } } );
// Exercise Context: context=1 adds a letter decorator right of the frame.
QAction* exerciseAction = bar->addAction( QObject::tr( "Exercise" ) );
exerciseAction->setCheckable( true );
exerciseAction->setToolTip( QObject::tr(
"Toggle context: Exercise (X/J/K letter decorator) vs Reality" ) );
QObject::connect( exerciseAction, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->toggleExerciseContext(); } } );
bar->addSeparator();
// APP-6D: per-symbol standard override via myMilStdOverride.
QAction* app6Action = bar->addAction( QObject::tr( "APP-6D" ) );
app6Action->setCheckable( true );
app6Action->setToolTip( QObject::tr(
"Toggle standard: APP-6D (NATO) vs 2525D (US)" ) );
QObject::connect( app6Action, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->toggleApp6D(); } } );
bar->addSeparator();
// SVG Override: injects a gold star SVG for the Fighter via addEntityTypeOverride().
QAction* addOvrAction = bar->addAction( QObject::tr( "Add Override" ) );
addOvrAction->setToolTip( QObject::tr(
"Replace Fighter aircraft with a custom gold-star SVG override" ) );
QObject::connect( addOvrAction, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->addOverride(); } } );
QAction* rmOvrAction = bar->addAction( QObject::tr( "Remove Override" ) );
rmOvrAction->setToolTip( QObject::tr(
"Remove the custom SVG override; Fighter reverts to MIL-STD icon" ) );
QObject::connect( rmOvrAction, &QAction::triggered,
[this]( bool ) { if ( myDriver ) { myDriver->removeOverride(); } } );
return bar;
}
} // namespace DtExampleMilStd
Qt toolbar with buttons for the exampleMilStdSymbology demo.
DtMilStdSymbolToolbar(makVrv::DtDe &de)
Construct the toolbar and register it with de.

exampleMilStdSymbology.h

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#pragma once
#ifdef _WIN32
# ifdef exampleMilStdSymbology_EXPORTS
# define DT_DLL_EXAMPLEMILSTD __declspec( dllexport )
# else
# define DT_DLL_EXAMPLEMILSTD __declspec( dllimport )
# endif
#else
# define DT_DLL_EXAMPLEMILSTD
#endif
#define DT_DE_PLUGIN_EXPORT_MACRO DT_DLL_EXAMPLEMILSTD
namespace makVrv { class DtDe; }
DT_DE_PLUGIN_EXPORT_MACRO bool initDeModule(makVrv::DtDe *de)

exampleMilStdSymbology.cxx

/******************************************************************************
** Copyright (c) 2026 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
#include <vrvCore/DtDe.h>
#include <boost/bind/bind.hpp>
static makVrv::vrvSignalsLib::connection thePostInitializeConnection;
static DtExampleMilStd::DtMilStdSymbolToolbar* theToolbar = nullptr;
static void slotPostInit( makVrv::DtDe& de, DtExampleMilStd::DtExampleMilStdManager* mgr )
{
thePostInitializeConnection.disconnect();
// DtExampleMilStdManager::slot_postInitialize() has already run (it was
// connected first, in the manager constructor) and has called initialize()
// and connectToDecorationSettings(). All that remains here is to create
// and start the driver now that the manager is fully initialised.
// Ownership transfers to driverManager on addDriver().
de.driverManager().addDriver( driver );
de.driverManager().startDriver( driver );
if ( theToolbar )
{
theToolbar->setDriver( driver );
}
}
void init( makVrv::DtDe& de )
{
// ----------------------------------------------------------------
// Step 1: Geometry database -- parses all milstd_*.json files.
// Stores pre-scaled polyline geometry in 200x200 milsymbol space.
// ----------------------------------------------------------------
auto* jsonReg = new makVrv::DtMilStdJsonRegistry();
jsonReg->load( de.dePathConfiguration().resolvePath( "$(DATA_DIR)/MilStd" ) );
// ----------------------------------------------------------------
// Step 2: DIS-to-SIDC mapping table -- loaded from type_to_sidc_mappings.json.
// Maps 7-field DIS entity type tuples to SIDC function codes.
// ----------------------------------------------------------------
auto* sidcReg = new makVrv::DtTypeToSidcJsonRegistry();
sidcReg->load( de.dePathConfiguration().resolvePath(
"$(DATA_DIR)/MilStd/type_to_sidc_mappings.json" ) );
// ----------------------------------------------------------------
// Step 3: SVG override registry.
// Loads sidc_svg_overrides.json if present; silent no-op otherwise.
// ----------------------------------------------------------------
auto* overrideReg = new makVrv::DtMilStdSvgOverrideRegistry();
overrideReg->load( de.dePathConfiguration().resolvePath( "$(DATA_DIR)/MilStd/overrides" ) );
// ----------------------------------------------------------------
// Step 4: Custom manager (subclass of DtMilStdManager).
// Injects DtExampleMilStdRenderer and DtTracingSIDCGenerator
// via the createRenderer() / createSidcGenerator() factory overrides.
// ----------------------------------------------------------------
// Pre-init configuration: these calls are safe before signal_postInitialize
// fires. setSymbolSize() stores the value; setOperationalConditionMode() stores
// the mode. Neither touches the atlases (guarded by myInitialized). Both
// values are applied automatically when slot_postInitialize() runs.
mgr->setSymbolSize(120);
// Deferred init: manager setup, driver creation, and toolbar wiring all run
// after the DE finishes its own initialisation sequence.
thePostInitializeConnection = de.signal_postInitialize.connect(boost::bind(&slotPostInit, boost::ref(de), mgr));
// Register the MIL-STD widget factory so createMilStdWidgetAgent() works.
"DtMilStdWidget", new makVrv::DtMilStdWidgetClassesCreator );
// Register the imgui debug menu (shows SVG source, key info in the debug overlay).
// ----------------------------------------------------------------
// Qt setup: hide terrain picker, register toolbar, schedule driver.
// ----------------------------------------------------------------
makVrv::DtQtDeMainWindow* mainWindow = dynamic_cast<makVrv::DtQtDeMainWindow*>( &mw );
if ( mainWindow )
{
mainWindow->hideStartupDialog();
}
// Add the toolbar to the master-mode layout so VR-Vantage displays it.
if ( igApp )
{
makVrv::DtToolbarPath::toolbar( "DtMilStdSymbolToolbar" ) );
}
}
{
init( *de );
return true;
}
static DtAgentFactory & instance(DtDe &de)
Get an instance to the DtAgentFactory.
virtual void registerAgentCreator(const std::string &className, DtAgentCreator *creator)
Register a new scene object creator.
The abstract main window class.
Definition DtDeMainWindow.h:25
DtDeMainWindow & igMainWindow()
Use this accessor to lazily create the singleton instance of the DtDeMainWindow;.
static DtDeMainWindowProvider & instance(DtDe &de)
Get the main window provider instance for a DtDe.
static void registerInstance(DtDe &de, DtMilStdImguiDebugMenu *)
virtual void setOperationalConditionMode(DtOperationalConditionMode mode)
Set the operational condition display mode.
void setSymbolSize(int size)
Configure the symbol raster size and derived decorated-slot height. Must be called before the first t...
static void registerInstance(DtDe &de, DtMilStdManagerInterface *mgr)
Register the concrete implementation with a DtDe.
static void registerInstance(DtDe &de, DtMilStdSvgOverrideRegistry *registry)
Register registry on de (transfers ownership to DtDe).
Creator class for the scene object class: DtMilStdWidget.
Definition DtMilStdWidgetClasses.hpp:84
The Qt main window. There will be only one of these per DtDe instance. Note, this window will be dest...
Definition DtQtDeMainWindow.h:46
virtual void hideStartupDialog()
Hide startup dialog.
static DtQtToolbarAssembler & instance(DtDe &de)
Get an instance of the assembler.
void registerToolbar(DtToolbar *)
Register a toolbar builder.
void addToolbarPath(const DtToolbarPath &)
Adds the toolbar path (as well as its entire family).
static ToolbarPathBuilder toolbar(const std::string &name)
static void registerInstance(DtDe &de, DtTypeToSidcJsonRegistry *registry)
Register registry on de (takes ownership).
static DtVirtualBaseClassCreator & instance(DtDe &de)
The Root IG Application object. To run the IG simply create one, initialize it and call run.
Definition DtVrvApplication.h:58
static DtVrvApplication * findFromDe(DtDe &)
DtToolbarConfiguration & masterModeToolbarConfiguration()
Get the toolbar configuration which may be altered by plugins.
DT_DLL_VRVCOREQT void init(DtDe &de)
@ Amplifier
Definition DtMilStdTypes.h:88