![]() |
VR-Forces Developer's Guide
|
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():
Use generateSIDC() or generateMilStdKey() to produce the key. The leading % is the sentinel - real file paths never begin with it.

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 ¶ms) const =0 |
| virtual bool | parseMilStdSidcKey (const std::string &key, DtMilStdKeyParams ¶ms) 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) |
|
virtual |
|
static |
Get (or lazily create) the per-DtDe singleton (main thread).
| DtCorruptedState | when no instance has been registered. |
|
static |
Get (or lazily create) the per-connection copy (connection/render thread).
| DtCorruptedState | when no instance has been registered. |
|
static |
Register the concrete implementation with a DtDe.
|
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 |
Create a per-connection copy from the main-thread instance. Call once per connection after vrvMilStd::init().
|
static |
Name under which the instance is stored on DtDe.
|
static |
Return true when filename is a MIL-STD virtual key (starts with '').
|
pure virtual |
Generate a MIL-STD virtual key from DIS entity-type fields.
| kind | DIS Entity Kind (1=Platform, 2=Munition, 3=LifeForm ...). |
| domain | DIS Domain (1=Land, 2=Air, 3=Surface, 4=Subsurface, 5=Space). |
| country | DIS Country code. |
| category | DIS Category. |
| subcategory | DIS Subcategory. |
| specific | DIS Specific. |
| extra | DIS Extra. |
| forceId | 0=Friend 1=Hostile 2=Neutral 3=Unknown. |
| context | 0=Reality 1=Exercise 2=Simulation. |
| status | 0=Present 1=Planned (see Status enum). |
| hqtf | HQ/TF/Dummy bitfield 0=NotApplicable (see HqTfDummy enum). |
| echelon | Echelon/mobility code 0=NotApplicable (see Echelon enum). |
| standard | MIL-STD symbology standard to use. Defaults to current standard member variables. Used for overrides only. |
Implemented in makVrv::DtMilStdManager.
|
pure virtual |
Generate a MIL-STD virtual key from symbol parameters.
| params | Symbol parameters. mySidc may contain dashes; they are stripped internally. |
% -prefixed key for setBackgroundImage(), or empty on failure. Implemented in makVrv::DtMilStdManager.
|
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).
| key | Virtual key produced by generateMilStdKey(). |
| params | Receives the parsed symbol parameters. |
key is not a valid MIL-STD key. Implemented in makVrv::DtMilStdManager.
|
pure virtual |
Create a DtMilStdWidgetAgent on the correct scene interface.
Implemented in makVrv::DtMilStdManager.
|
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.
Implemented in makVrv::DtMilStdManager.
|
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.
|
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).
Implemented in makVrv::DtMilStdManager.
|
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.
|
pure virtual |
Return the total height in pixels of a decorated symbol slot.
Implemented in makVrv::DtMilStdManager.
|
pure virtual |
Return the actual rendered pixel height for the given SIDC (size + topHatSize + bottomHatSize).
| sidc | 20-character SIDC string (dashes accepted). |
Implemented in makVrv::DtMilStdManager.
|
pure virtual |
Return true when the given SIDC string is decorated.
| sidc | 20-character SIDC string (dashes accepted). |
Implemented in makVrv::DtMilStdManager.
|
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.
|
inlinevirtual |
Set the frame color used when rendering highlight (mouse over/selection) symbol variants.
| abgr | Color in ABGR format (same convention as DtMilStdColors constants). Default is white (0xFFFFFFFF), matching the font-path highlight behaviour. |
Reimplemented in makVrv::DtMilStdManager.
|
inlinevirtual |
Return the current highlight frame color in ABGR format.
Reimplemented in makVrv::DtMilStdManager.
|
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.
| kind | DIS entity kind. |
| domain | DIS entity domain. |
| country | DIS entity country code. |
| category | DIS entity category. |
| subcategory | DIS entity subcategory. |
| specific | DIS entity specific. |
| extra | DIS entity extra. |
| force | VRV/VRF force ID (the raw integer assigned via DtMilStdIconVisualizer::setForceId()), not the MIL-STD-2525 standard identity. Use -1 to match any force. |
Implemented in makVrv::DtMilStdManager.
|
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.
| normalizedSidc | 20-character SIDC string with dashes stripped. |
| force | VRV/VRF force ID (the raw integer assigned via DtMilStdIconVisualizer::setForceId()), not the MIL-STD-2525 standard identity. Use -1 to match any force. |
Implemented in makVrv::DtMilStdManager.
|
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.
|
pure virtual |
Return true when the manager has completed initialisation and is ready to build symbols.
Implemented in makVrv::DtMilStdManager.