MapLink Pro .
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLMilitarySymbologyGenerator Class Reference

Detailed Description

The TSLMilitarySymbologyGenerator class creates MIL-STD-2525D military symbols as TSLEntitySet objects that can be rendered on a MapLink drawing surface.

SVG symbol component files must be loaded from a directory before symbols can be created.

Example usage:

TSLMilitarySymbologyGenerator gen; if (gen.loadSymbols("path/to/svgs")) { TSLSymbol* es = gen.getSymbol(TSLSidc2525d{"10031000001101000000"}, TSLSidc2525d::SymbolSet::Space); // ... draw via TSLRenderingInterface::drawEntity(es) ... es->destroy(); }

Public Member Functions

 TSLMilitarySymbologyGenerator ()
 ~TSLMilitarySymbologyGenerator ()
bool loadSymbols (std::filesystem::path svgDirectoryPath)
TSLSymbol * getSymbol (TSLSidc2525d const &sidc, TSLSidc2525d::SymbolSet cyberspace_dimension, TSLMilitarySymbologyOptions options={})
TSLSymbol * getSymbol (TSLSidcApp6d const &sidc, TSLMilitarySymbologyOptions options={})

Constructor & Destructor Documentation

◆ TSLMilitarySymbologyGenerator()

TSLMilitarySymbologyGenerator::TSLMilitarySymbologyGenerator ( )

◆ ~TSLMilitarySymbologyGenerator()

TSLMilitarySymbologyGenerator::~TSLMilitarySymbologyGenerator ( )

Member Function Documentation

◆ getSymbol() [1/2]

TSLSymbol * TSLMilitarySymbologyGenerator::getSymbol ( TSLSidc2525d const & sidc,
TSLSidc2525d::SymbolSet cyberspace_dimension,
TSLMilitarySymbologyOptions options = {} )

Create a TSLSymbol from a parsed SIDC.

Symbol data is cached in the TSLDrawngSurfaceBase symbol cache. Repeated calls with the same arguments will re-use data from the symbol cache.

Parameters
sidc[in]MIL-STD-2525D Symbol Identification Code.
cyberspace_dimension[in]When rendering a cyberspace symbol, use this frame. Prefer TSLSidc2525d::SymbolSet::Unknown for non-cyberspace codes.
options[in]Raster rendering options.
Returns
A TSLSymbol representing the composed symbol, or NULL if the SIDC is invalid or required symbol components were not found. The caller owns the returned entity set and must call destroy() on it.

◆ getSymbol() [2/2]

TSLSymbol * TSLMilitarySymbologyGenerator::getSymbol ( TSLSidcApp6d const & sidc,
TSLMilitarySymbologyOptions options = {} )

Create a TSLSymbol from a parsed SIDC.

Symbol data is cached in the TSLDrawngSurfaceBase symbol cache. Repeated calls with the same arguments will re-use data from the symbol cache.

Parameters
sidc[in]APP-6D Symbol Identification Code.
options[in]Raster rendering options.
Returns
A TSLSymbol representing the composed symbol, or NULL if the SIDC is invalid or required symbol components were not found. The caller owns the returned entity set and must call destroy() on it.

◆ loadSymbols()

bool TSLMilitarySymbologyGenerator::loadSymbols ( std::filesystem::path svgDirectoryPath)

Loads SVG symbol components from the specified directory.

Parameters
svgDirectoryPath[in]Path to the root directory containing SVG symbol files. The following subdirectories will be scanned: Frames, Amplifier, Appendices, Echelon, HQTFFD, OCA

Returns true if at least some symbols were loaded.