DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ControlDG Kernel Control
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation LinksHome Page > Models > Entities > Model Items > Smart Labels Go to ActiveX docs Search Documentation


Smart Labels

Smart Labels are a special (managed) type of facing labels. They are intended to be associated with a point in 3D space. Normally the point is the center of its parent entity.

Smart Labels are arranged automatically on the screen so they do not overlap and positioned close to the point they are associated with.

See its behaiviour on the Labels>Smart labels example in the Sample Explorer

Smart labels are items. They can be a top-level item or, most often, a child item of an entity.

By default a smart label is positioned on top of its parent object or its associated point. When the label does not fit silhouette of its parent object it is positioned on margins of the 3D window. In any case labels are arranged automatically to avoid overlapping.

Array of all smart labels and related properties are maintaned by Smart Label Manager, which can be accessed via ISmartLabelManager_DG interface queried from IView_DG.

An individual smart label can be accessed via ILabel_DG queried from the relevant IEntity_DG or via ISmartLabelManager_DG.GetLabel().

The Smart Label Manager also implements IDynamicScreenItemManager_DG interface to control smart labels as a generic set of items.

Smart Label Manager keeps a special label, which acts as a template for new labels created with AddNewLabel, CreateLabelsAutomatic or CreateObjectLabelAutomatic. Properties of the template can be accessed via ISmartLabelManager_DG.GetLabelCreationTemplate > ILabel_DG

Extended Properties

Smart labels are computationaly intensive during rendering stage. The properties below are related for performance. These options mostly make difference for intersive rendering of large models like during animations. It is recommeded to experiment with the settings to tune in the performance.

Use ISmartLabelManager_DG.GetExtendedProperties() to access the properties.

Property Description Type Parameter ID Default
FavorSpeed When true speed is favored over accuracy Boolean 0 True
CacheHLR When true some extra memory and some initialisation on start is used to accelerate Hidden Label Removal during runtime Boolean 1 True
ReuseSizes When this option is true sizes of text boxes are calculated only when software detects that they are out date, which sometimes can be lagging Boolean 2 True
CacheFlatSectionArray Cache flat entity array for performance. Toggle this option twice to update the array if new entities are addded or removed Boolean 3 True
BoundingObjectScale Copies of bounding obejcts of all entities are scaled (down when <1.0) by this value by hidden label removal algorithm. Clamped to valid range of [0.1, 2.0]. Reduce to show more labels. Can be tuned in by experimenting Double 0 0.8

See also:  Smart Labels Sample,