Test011.cpp
Last update: 17.04.2023Markup.
This example demonstrates the two different types of markups, 2D and 3D.
2D markups are positioned in the scene by viewport coordinates. Viewport coordinates range from 0 to 1 from left to right and top to bottom. In addition to the viewport location, you can specify how the text string is anchored to the viewport location. The 2D markup in this example locates the markup at 0.5,0.1 and the anchor at N. This means that the text is centered in the XY direction and the top of the text is at 0.1 from the top of the window.
3D markups are positioned in object space coordinates, and require and XYZ location. The anchor works as in the 2D case. The 3D markup can be positioned relative to the object location in pixels. A line is drawn from the offset location to the object location. If a path is provided with the markup, the markup can be transformed with the object. The path is simply the nodeIDs of all nodes from the topmost node, to the node that the markup is attached to, concatenated and separated by ';' (as in Node1;Node2;NodeWithMarkup).