vrdAnnotationNode¶
-
class
vrdAnnotationNode
¶
(Inherits vrdNode
)
Summary¶
- Functions:
- getBackgroundColor() → QColor
- getFarScaleLimit() → float
- getFontColor() → QColor
- getLineColor() → QColor
- getNearScaleLimit() → float
- getPosition() → QVector3D
- getSceneNode() → vrdNode
- getSize() → float
- getText() → string
- getUseSceneNodeVisibility() → bool
- setBackgroundColor(color)
- setFarScaleLimit(value)
- setFontColor(color)
- setLineColor(color)
- setNearScaleLimit(value)
- setPosition(worldPosition)
- setSceneNode(node)
- setSize(size)
- setText(text)
- setUseSceneNodeVisibility(enabled)
- zoomTo()
Functions¶
-
vrdAnnotationNode.
getBackgroundColor
()¶ Returns the label background color.
Returns: The color. Return type: QColor
-
vrdAnnotationNode.
getFarScaleLimit
()¶ Returns: Returns the dynamic far scaling limit in mm. Return type: float
-
vrdAnnotationNode.
getFontColor
()¶ Returns the font color for the displayed text.
Returns: The color. Return type: QColor
-
vrdAnnotationNode.
getLineColor
()¶ Returns the line color for border and leader.
Returns: The color. Return type: QColor
-
vrdAnnotationNode.
getNearScaleLimit
()¶ Returns: Returns the dynamic near scaling limit in mm. Return type: float
-
vrdAnnotationNode.
getPosition
()¶ Returns the position as a 3D world coordinate.
Returns: The position. Return type: QVector3D
-
vrdAnnotationNode.
getSize
()¶ Returns: The size. Return type: float
-
vrdAnnotationNode.
getText
()¶ Returns the displayed description text.
Returns: The text. Return type: string
-
vrdAnnotationNode.
getUseSceneNodeVisibility
()¶ Returns if a scene graph node is used for determining the visibility.
Returns: True if a node is used, False otherwise. Return type: bool
-
vrdAnnotationNode.
setBackgroundColor
(color)¶ Sets the label background color (linear RGB) and opacity (alpha).
Parameters: color (QColor) – The color values. They can either be set as integer values (color.setRgba(..)) in range [0 .. 255] or as floating point values (color.setRgbaF(..)) in range [0.0 .. 1.0].
-
vrdAnnotationNode.
setFarScaleLimit
(value)¶ Sets the far scaling limit. The value is used for scaling the size dynamically depending on the camera position.
Maximum size of label is reached for camera distance <= nearLimit. Minimum size of label is reached for camera distance >= farLimit. Between these limits the label is scaled linearly.
Parameters: value (float) – Scale limit in mm.
-
vrdAnnotationNode.
setFontColor
(color)¶ Sets the font color for the displayed text (linear RGB).
Parameters: color (QColor) – The color values. They can either be set as integer values (color.setRgb(..)) in range [0 .. 255] or as floating point values (color.setRgbF(..)) in range [0.0 .. 1.0].
-
vrdAnnotationNode.
setLineColor
(color)¶ Sets the line color for border and leader (linear RGB).
Parameters: color (QColor) – The color values. They can either be set as integer values (color.setRgb(..)) in range [0 .. 255] or as floating point values (color.setRgbF(..)) in range [0.0 .. 1.0].
-
vrdAnnotationNode.
setNearScaleLimit
(value)¶ Sets the near scaling limit. The value is used for scaling the size dynamically depending on the camera position.
Maximum size of label is reached for camera distance <= nearLimit. Minimum size of label is reached for camera distance >= farLimit. Between these limits the label is scaled linearly.
Parameters: value (float) – Scale limit in mm.
-
vrdAnnotationNode.
setPosition
(worldPosition)¶ The point (3D world coordinates) to which the leader arrow head is pointing.
Parameters: worldPosition (QVector3D) – The position.
-
vrdAnnotationNode.
setSceneNode
(node)¶ Sets the linked scene graph node (see vrdAnnotationNode.setUseSceneNodeVisibility(enabled)).
Parameters: node (vrdNode) – The node.
-
vrdAnnotationNode.
setSize
(size)¶ Sets the size.
Parameters: size (float) – The size. A value of 1.0 will result in a decent predefined size. Use smaller or larger values to size appropriately.
-
vrdAnnotationNode.
setText
(text)¶ The displayed description text.
Parameters: text (string) – The description.
-
vrdAnnotationNode.
setUseSceneNodeVisibility
(enabled)¶ Toggles the use of the linked scene graph node to determine the visiblity. A set linked scene node is necessary (see vrdAnnotationNode.setSceneNode(node)).
Parameters: enabled (bool) – True to use the linked node to determine the visibility, False otherwise.
-
vrdAnnotationNode.
zoomTo
()¶ Lets the camera of the current render window zoom to this annotation.
The annotation position is centered in the render window and the node is used to calculate the distance of the camera to the annotation.