VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
makVrv::DtMilStdManagerInterface Class Referenceabstract

Abstract interface for rendering MIL-STD symbology icons as textures.

Lives in vrvCore so any layer (vrvCore visualizers, vrvOsg widgets) can call it without a dependency on vrvMilStd. The concrete implementation (DtMilStdManager) is registered at startup by the vrvMilStd library.

Virtual key format used with DtWidgetLabel::setBackgroundImage():

%SIDC/<sidc>/<colorMode>/[H/][Override/<N>/][MilStd/<N>/]
[FillColor/<ABGRHEX>/][FrameColor/<ABGRHEX>/][IconColor/<ABGRHEX>/][Alpha/<HH>/]

Use generateSIDC() or generateMilStdKey() to produce the key. The leading % is the sentinel - real file paths never begin with it.

Inheritance diagram for makVrv::DtMilStdManagerInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtMilStdManagerInterface ()
 
virtual DtMilStdManagerInterface * clone (DtBaseConnection &sim)
 
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
 
virtual std::string generateMilStdKey (const DtMilStdKeyParams &params) const =0
 
virtual bool parseMilStdSidcKey (const std::string &key, DtMilStdKeyParams &params) const =0
 
virtual DtWidgetLabelAgent * createMilStdWidgetAgent ()=0
 
virtual DtTextureInterface * textureAtlasSlot (const std::string &key, float &u0Out, float &u1Out, float &v0Out, float &v1Out)=0
 
virtual void svgSource (const std::string &key, std::string &svg) const =0
 
virtual bool getSymbolRgba (const std::string &key, int &widthOut, int &heightOut, std::vector< uint8_t > &rgbaOut)=0
 
virtual int symbolSize () const =0
 
virtual int decoratedSymbolHeight () const =0
 
virtual int renderHeight (const std::string &sidc) const =0
 
virtual bool isDecorated (const std::string &sidc) const =0
 
virtual const std::string & lastKey () const =0
 
virtual void setHighlightFrameColor (uint32_t abgr)
 
virtual uint32_t highlightFrameColor () const
 
virtual int isEntityTypeOverridden (int kind, int domain, int country, int category, int subcategory, int specific, int extra, int force=-1) const =0
 
virtual int isSidcOverridden (const std::string &normalizedSidc, int force=-1) const =0
 
virtual void connectToDecorationSettings ()=0
 
virtual bool isInitialized () const =0
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtMilStdManagerInterface & instance (DtDe &de)
 
static DtMilStdManagerInterface & instance (DtBaseConnection &sim)
 
static void registerInstance (DtDe &de, DtMilStdManagerInterface *mgr)
 
static void copyInstance (DtBaseConnection &sim, DtDe &de)
 
static const std::string & instanceName ()
 
static bool isMilStdKey (const std::string &filename)
 

Constructor & Destructor Documentation

virtual makVrv::DtMilStdManagerInterface::~DtMilStdManagerInterface ( )
virtual

Member Function Documentation

static DtMilStdManagerInterface& makVrv::DtMilStdManagerInterface::instance ( DtDe &  de)
static

Get (or lazily create) the per-DtDe singleton (main thread).

Exceptions
DtCorruptedStatewhen no instance has been registered.
static DtMilStdManagerInterface& makVrv::DtMilStdManagerInterface::instance ( DtBaseConnection &  sim)
static

Get (or lazily create) the per-connection copy (connection/render thread).

Exceptions
DtCorruptedStatewhen no instance has been registered.
static void makVrv::DtMilStdManagerInterface::registerInstance ( DtDe &  de,
DtMilStdManagerInterface *  mgr 
)
static

Register the concrete implementation with a DtDe.

virtual DtMilStdManagerInterface* makVrv::DtMilStdManagerInterface::clone ( DtBaseConnection &  sim)
virtual

Clone this manager for use on a connection thread. Called by copyInstance - override in derived classes if extra state needs copying.

Reimplemented in makVrv::DtMilStdManager.

static void makVrv::DtMilStdManagerInterface::copyInstance ( DtBaseConnection &  sim,
DtDe &  de 
)
static

Create a per-connection copy from the main-thread instance. Call once per connection after vrvMilStd::init().

static const std::string& makVrv::DtMilStdManagerInterface::instanceName ( )
static

Name under which the instance is stored on DtDe.

static bool makVrv::DtMilStdManagerInterface::isMilStdKey ( const std::string &  filename)
static

Return true when filename is a MIL-STD virtual key (starts with '').

virtual std::string makVrv::DtMilStdManagerInterface::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 
)
pure virtual

Generate a MIL-STD virtual key from DIS entity-type fields.

Parameters
kindDIS Entity Kind (1=Platform, 2=Munition, 3=LifeForm ...).
domainDIS Domain (1=Land, 2=Air, 3=Surface, 4=Subsurface, 5=Space).
countryDIS Country code.
categoryDIS Category.
subcategoryDIS Subcategory.
specificDIS Specific.
extraDIS Extra.
forceId0=Friend 1=Hostile 2=Neutral 3=Unknown.
context0=Reality 1=Exercise 2=Simulation.
status0=Present 1=Planned (see Status enum).
hqtfHQ/TF/Dummy bitfield 0=NotApplicable (see HqTfDummy enum).
echelonEchelon/mobility code 0=NotApplicable (see Echelon enum).
standardMIL-STD symbology standard to use. Defaults to current standard member variables. Used for overrides only.
Returns
An SIDC

Implemented in makVrv::DtMilStdManager.

virtual std::string makVrv::DtMilStdManagerInterface::generateMilStdKey ( const DtMilStdKeyParams &  params) const
pure virtual

Generate a MIL-STD virtual key from symbol parameters.

Parameters
paramsSymbol parameters. mySidc may contain dashes; they are stripped internally.
Returns
A % -prefixed key for setBackgroundImage(), or empty on failure.

Implemented in makVrv::DtMilStdManager.

virtual bool makVrv::DtMilStdManagerInterface::parseMilStdSidcKey ( const std::string &  key,
DtMilStdKeyParams &  params 
) const
pure virtual

Parse a MIL-STD virtual key back into symbol parameters.

Fills all fields of params. Fields for absent optional segments retain their default values (myHighlight=false, myOverrideIndex=-1, myMilStdOverride=-1, myFillColorOverride=0, myFrameColorOverride=0).

Parameters
keyVirtual key produced by generateMilStdKey().
paramsReceives the parsed symbol parameters.
Returns
true on success; false when key is not a valid MIL-STD key.
Note
Unknown or unrecognised segments are silently skipped, making the format forward-compatible with future key extensions.

Implemented in makVrv::DtMilStdManager.

virtual DtWidgetLabelAgent* makVrv::DtMilStdManagerInterface::createMilStdWidgetAgent ( )
pure virtual

Create a DtMilStdWidgetAgent on the correct scene interface.

Implemented in makVrv::DtMilStdManager.

virtual DtTextureInterface* makVrv::DtMilStdManagerInterface::textureAtlasSlot ( const std::string &  key,
float &  u0Out,
float &  u1Out,
float &  v0Out,
float &  v1Out 
)
pure virtual

Get or create an atlas slot for the symbol encoded in key.

Renders and packs the symbol on first call; subsequent calls for the same key return from cache instantly. The returned texture is a non-owning pointer into the atlas page and must not be deleted by the caller. UV coordinates address the symbol's sub-rect within the page and map to DtQuadProxyInterface::setTextureParameters() left/right/bottom/top.

Returns
Non-owning texture pointer, or nullptr on failure.

Implemented in makVrv::DtMilStdManager.

virtual void makVrv::DtMilStdManagerInterface::svgSource ( const std::string &  key,
std::string &  svg 
) const
pure virtual

Return the SVG source string for the symbol encoded in key. Debugging aid - not used by the manager itself. Returns empty string on failure. Used by imgui.

Implemented in makVrv::DtMilStdManager.

virtual bool makVrv::DtMilStdManagerInterface::getSymbolRgba ( const std::string &  key,
int &  widthOut,
int &  heightOut,
std::vector< uint8_t > &  rgbaOut 
)
pure virtual

Extract the RGBA pixel data for the symbol encoded in key.

Triggers atlas build for key on first call. On success fills rgbaOut with widthOut * heightOut * 4 bytes of RGBA data (row-major, R at byte 0).

Returns
false when the key is invalid, the symbol cannot be built, or MAK-Icons mode is active (milSymbolStandard == 2).

Implemented in makVrv::DtMilStdManager.

virtual int makVrv::DtMilStdManagerInterface::symbolSize ( ) const
pure virtual

Return the configured symbol slot size in pixels (set via setSymbolSize()). This is the width of a standard (non-decorated) atlas slot.

Implemented in makVrv::DtMilStdManager.

virtual int makVrv::DtMilStdManagerInterface::decoratedSymbolHeight ( ) const
pure virtual

Return the total height in pixels of a decorated symbol slot.

Implemented in makVrv::DtMilStdManager.

virtual int makVrv::DtMilStdManagerInterface::renderHeight ( const std::string &  sidc) const
pure virtual

Return the actual rendered pixel height for the given SIDC (size + topHatSize + bottomHatSize).

Parameters
sidc20-character SIDC string (dashes accepted).

Implemented in makVrv::DtMilStdManager.

virtual bool makVrv::DtMilStdManagerInterface::isDecorated ( const std::string &  sidc) const
pure virtual

Return true when the given SIDC string is decorated.

Parameters
sidc20-character SIDC string (dashes accepted).

Implemented in makVrv::DtMilStdManager.

virtual const std::string& makVrv::DtMilStdManagerInterface::lastKey ( ) const
pure virtual

Return the most recent virtual key passed to texture(). Returns an empty string when no key has been requested yet.

Implemented in makVrv::DtMilStdManager.

virtual void makVrv::DtMilStdManagerInterface::setHighlightFrameColor ( uint32_t  abgr)
inlinevirtual

Set the frame color used when rendering highlight (mouse over/selection) symbol variants.

Parameters
abgrColor in ABGR format (same convention as DtMilStdColors constants). Default is white (0xFFFFFFFF), matching the font-path highlight behaviour.
Note
Must be called before copyInstance(). Changes made after cloning are not propagated to the render-thread copy.

Reimplemented in makVrv::DtMilStdManager.

virtual uint32_t makVrv::DtMilStdManagerInterface::highlightFrameColor ( ) const
inlinevirtual

Return the current highlight frame color in ABGR format.

Reimplemented in makVrv::DtMilStdManager.

virtual int makVrv::DtMilStdManagerInterface::isEntityTypeOverridden ( int  kind,
int  domain,
int  country,
int  category,
int  subcategory,
int  specific,
int  extra,
int  force = -1 
) const
pure virtual

Test whether the given entity-type fields match any SVG override entry.

Pure const scan of the immutable override registry - safe to call from any thread.

Parameters
kindDIS entity kind.
domainDIS entity domain.
countryDIS entity country code.
categoryDIS entity category.
subcategoryDIS entity subcategory.
specificDIS entity specific.
extraDIS entity extra.
forceVRV/VRF force ID (the raw integer assigned via DtMilStdIconVisualizer::setForceId()), not the MIL-STD-2525 standard identity. Use -1 to match any force.
Returns
Zero-based entry index on match; -1 on miss.

Implemented in makVrv::DtMilStdManager.

virtual int makVrv::DtMilStdManagerInterface::isSidcOverridden ( const std::string &  normalizedSidc,
int  force = -1 
) const
pure virtual

Test whether the given normalized SIDC string matches any SVG override entry.

Pure const scan of the immutable override registry - safe to call from any thread.

Parameters
normalizedSidc20-character SIDC string with dashes stripped.
forceVRV/VRF force ID (the raw integer assigned via DtMilStdIconVisualizer::setForceId()), not the MIL-STD-2525 standard identity. Use -1 to match any force.
Returns
Zero-based entry index on match; -1 on miss.

Implemented in makVrv::DtMilStdManager.

virtual void makVrv::DtMilStdManagerInterface::connectToDecorationSettings ( )
pure virtual

Connect to DtSymbolDecorationSettingsSignaler and apply the initial milSymbolStandard setting. Must be called after the manager is registered and after vrvCore settings infrastructure is initialised.

Implemented in makVrv::DtMilStdManager.

virtual bool makVrv::DtMilStdManagerInterface::isInitialized ( ) const
pure virtual

Return true when the manager has completed initialisation and is ready to build symbols.

Implemented in makVrv::DtMilStdManager.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)