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={}) |
| TSLMilitarySymbologyGenerator::TSLMilitarySymbologyGenerator | ( | ) |
| TSLMilitarySymbologyGenerator::~TSLMilitarySymbologyGenerator | ( | ) |
| 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.
| 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. |
| 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.
| sidc[in] | APP-6D Symbol Identification Code. |
| options[in] | Raster rendering options. |
| bool TSLMilitarySymbologyGenerator::loadSymbols | ( | std::filesystem::path | svgDirectoryPath | ) |
Loads SVG symbol components from the specified directory.
| 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.