DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation Links Go to ActiveX docs Search Documentation


Positioning of 3D Labels

3D Labels have ViewFrameType and DepthPositionType properties, managed by ILabel_DG.

Possible Frame Type values are enumerated by ViewFrame_DG. With Frame Type set to ViewFrame_DG.Global (default) the item is positioned relatively either the global frame of the model when the item is a top-level one or relative to the local frame of its parent. Coordinates of the item set via ILabel_DG.Location are normal Cartesian coordinates in the above frame.

When Frame Type is set to ViewFrame_DG.Eye the item is positioned relatively either to the box of the Viewing Volume, when the item is a top-level one, or relative to the bounding box of the parent  object. The bounding box here is the minimal 3D box in Eye Frame containing the parent object. Coordinates of the item set via ILabel_DG.Location are normalized coordinates of the above box: For all coordinates range [-1,1] is mapped to dimension of the relevant box. Point (0,0,0) corresponds to the center of the box. Point (-1, -1, -1) is the left bottom back corner of the box. Point (1,1,1) is the right top front corner and (0.5, 0.5, 1) is the center of the front side of the box. Values outside the [-1,1] range are valid too and it is the common case. The label will be located outside the box in this situation.

DepthPositionType describes what additional, if any, positioning in z direction relative to the viewing plane (screen) is required. Depth Position Type values are enumerated by ModelEntity_DG.

WhenDepthPosition Type is ModelEntity_DG.Unknown (default) the depth is determined by coordinates of the item set via ILabel_DG.Location and no additional action is performed.

When DepthPositionType is ModelEntity_DG.Object the item will be translated in z direction to position it on the top of its parent object. In this case the item can be obscured by other objects in the model, but will always appear on the top of its parent.  If the item does not have a parent (top-level item) no z translation is performed.

When Depth Position Type is ModelEntity_DG.Model the item will be translated in z direction to position it on the top of all objects in the model, so it is never obscured.

See also: NOSUPPORTV60 LabelEx Sample, Entities, NOSUPPORTV60 Labels, Items