![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
The definition of a Track's visualisation on the display.
To specify the visualisation of a Track the application must setup a TrackSymbol, which contains one or more TSLEntity instances.
When configuring the visualisation the application should:
Based on these parameters the Track will be rendered as a 'billboard' within the 3D scene, positioned based on the location of the Track instance. The billboard will be rendered as a square region on the display, with a transparent background. Within this area the application may render any 2D TSLEntity based geometry including:
This symbol definition may include textual annotations, which may be configured by passing a populated AnnotationAttributes structure to addAnnotation. To configure an annotation the application must:
Once the track is added to the drawing surface the annotation/track attribute values may be updated at any time, along with the other visualisation parameters. After modifying the TrackSymbol the application must call Track::symbol in order to apply the visualisation to the track.
Classes | |
struct | AnnotationAttributes |
Definition of rendering attributes for an annotation. More... | |
Public Member Functions | |
TrackSymbol () | |
Constructor. | |
TrackSymbol (const TrackSymbol &other) | |
Copy Constructor. | |
unsigned int | addEntity (const TSLEntity *entity) |
bool | updateEntity (unsigned int id, const TSLEntity *entity) |
bool | removeEntity (unsigned int id) |
const TSLEntity * | getEntity (unsigned int id) const |
unsigned int | numEntities () const |
unsigned int | entityID (unsigned int index) const |
void | billboardSize (unsigned int s) |
Set the size of the billboard in pixels. | |
unsigned int | billboardSize () const |
Query the size of the billboard in pixels. | |
void | renderArea (const TSLEnvelope &area) |
const TSLEnvelope & | renderArea () const |
Query the render area of the billboard. | |
bool | addAnnotation (const char *attributeName, const AnnotationAttributes &renderingAttributes) |
AnnotationAttributes | getAnnotation (const char *name) const |
bool | removeAnnotation (const char *name) |
unsigned int | numAnnotations () const |
AnnotationAttributes | annotation (unsigned int index) const |
const char * | annotationName (unsigned int index) const |
bool | removeAnnotation (unsigned int index) |
envitia::maplink::earth::TrackSymbol::TrackSymbol | ( | ) |
Constructor.
envitia::maplink::earth::TrackSymbol::TrackSymbol | ( | const TrackSymbol & | other | ) |
Copy Constructor.
bool envitia::maplink::earth::TrackSymbol::addAnnotation | ( | const char * | attributeName, |
const AnnotationAttributes & | renderingAttributes ) |
Add, or update an annotation definition.
If an annotation is already defined for the named attribute it will be updated to the new rendering attributes.
attributeName | The name of the track attribute, which will be displayed. |
renderingAttributes | The rendering attribute information for the annotation. |
unsigned int envitia::maplink::earth::TrackSymbol::addEntity | ( | const TSLEntity * | entity | ) |
Add an entity to the visualisation.
The ID returned from this method may be used to refer to the entity when using other entity access methods.
entity | The entity to add. |
AnnotationAttributes envitia::maplink::earth::TrackSymbol::annotation | ( | unsigned int | index | ) | const |
Query an annotation definition.
index | The index of the annotation. |
const char * envitia::maplink::earth::TrackSymbol::annotationName | ( | unsigned int | index | ) | const |
Query the name of an annotation.
index | The index to query. |
unsigned int envitia::maplink::earth::TrackSymbol::billboardSize | ( | ) | const |
Query the size of the billboard in pixels.
void envitia::maplink::earth::TrackSymbol::billboardSize | ( | unsigned int | s | ) |
Set the size of the billboard in pixels.
unsigned int envitia::maplink::earth::TrackSymbol::entityID | ( | unsigned int | index | ) | const |
Query the id of an entity
index | The index of the entity within the TrackSymbol. |
AnnotationAttributes envitia::maplink::earth::TrackSymbol::getAnnotation | ( | const char * | name | ) | const |
Query details about an annotation definition.
name | The name of the annotation (track attribute). |
const TSLEntity * envitia::maplink::earth::TrackSymbol::getEntity | ( | unsigned int | id | ) | const |
Query an entity from the visualisation.
id | The id of the entity to query. |
unsigned int envitia::maplink::earth::TrackSymbol::numAnnotations | ( | ) | const |
Query the number of annotation definitions.
In most cases applications should refer to annotations by name. The following methods are provided to allow applications to iterate through the annotation set:
unsigned int envitia::maplink::earth::TrackSymbol::numEntities | ( | ) | const |
Query the number of entities in the visualisation.
In most cases applications should refer to attributes by ID, as returned from addEntity. The following methods are provided to allow applications to iterate through the entities:
bool envitia::maplink::earth::TrackSymbol::removeAnnotation | ( | const char * | name | ) |
Remove an annotation definition.
name | The name of the annotation to remove. |
bool envitia::maplink::earth::TrackSymbol::removeAnnotation | ( | unsigned int | index | ) |
Remove an annotation definition.
index | The index of the annotation to remove. |
bool envitia::maplink::earth::TrackSymbol::removeEntity | ( | unsigned int | id | ) |
Remove an entity from the visualisation.
id | The index of the entity to remove, as returned from addEntity. |
const TSLEnvelope & envitia::maplink::earth::TrackSymbol::renderArea | ( | ) | const |
Query the render area of the billboard.
void envitia::maplink::earth::TrackSymbol::renderArea | ( | const TSLEnvelope & | area | ) |
Set the render area of the billboard in TMCs.
The render area specifies the region in TMC space which will be rendered to the billboard. By default this region is from -1000,-1000 to 1000,1000.
In most cases the application should not need to modify this parameter, unless re-using a set of previous symbols or entity definitions.
area | The region in TMC space to render onto the billboard. |
bool envitia::maplink::earth::TrackSymbol::updateEntity | ( | unsigned int | id, |
const TSLEntity * | entity ) |
Update an entity in the visualisation.
id | The id of the entity to update, as returned from addEntity. |
entity | An entity, which will replace the previous version. |