Module vrAnnotationPtr :: Class vrAnnotationPtr
[frames] | no frames]

Class vrAnnotationPtr

 object --+    
          |    
??.instance --+
              |
             vrAnnotationPtr

The vrAnnotationPtr class represents an annotation object.

Instance Methods
 
__init__()
 
__reduce__()
Color4f
getBackgroundColor()
Gets label background color and opacity.
int
getDynamicScalingMode()
Gets dynamic scaling mode of the annotation label.
Color3f
getFontColor()
Gets color of the annotation text.
Color3f
getLineColor()
Gets border and leader color of the annotation visualization.
string
getName()
Gets the name.
vrNodePtr
getNode()
Gets Scenegraph node to which this annotation is assigned.
Pnt3f
getPosition()
Gets the point to which the leader arrow head is pointing.
float
getSize()
Gets the size of the annotation label.
string
getText()
Gets the description text.
bool
getUseNodeVisibility()
Returns whether the annotation label visibility should depend on the visibility of its associated Scenegraph node.
bool
isVisible()
Gets the visibility of the annotation label.
 
setBackgroundColor(color)
Sets label background color and opacity.
 
setDynamicScalingMode(mode)
Sets how the annotation label is scaled dynamically depending on its distance to the camera.
 
setFontColor(color)
Sets color of the annotation text.
 
setLineColor(color)
Sets border and leader color of the annotation visualization.
 
setName(name)
Sets the name.
 
setNode(node)
Sets Scenegraph node to which this annotation is assigned.
 
setPosition(position)
Sets the point to which the leader arrow head is pointing.
 
setSize(size)
Set the size of the annotation label.
 
setText(text)
Sets the description text.
 
setUseNodeVisibility(enabled)
Set whether the annotation label visibility should depend on the visibility of its associated Scenegraph node.
 
setVisible(visible)
Sets the annotation label to be visible or hidden in the render window.
 
zoomTo()
Camera zooms to this annotation in the current render window.

Inherited from unreachable.instance: __new__

Class Variables
  __instance_size__ = 64
Method Details

__init__()
(Constructor)

 
Overrides: object.__init__
(inherited documentation)

__reduce__()

 
Overrides: object.__reduce__
(inherited documentation)

getBackgroundColor()

 

Gets label background color and opacity.

Returns: Color4f
RGBA color (linear RGB and alpha).

getDynamicScalingMode()

 

Gets dynamic scaling mode of the annotation label.

Returns: int
mode VR_ANNOTATION_DYNAMIC_SCALING_OFF (0), VR_ANNOTATION_DYNAMIC_SCALING_NEAR (1), VR_ANNOTATION_DYNAMIC_SCALING_FAR (2).

getFontColor()

 

Gets color of the annotation text.

Returns: Color3f
color as linear RGB.

getLineColor()

 

Gets border and leader color of the annotation visualization.

Returns: Color3f
color as linear RGB.

getName()

 

Gets the name.

Returns: string
name

getNode()

 

Gets Scenegraph node to which this annotation is assigned.

Returns: vrNodePtr
node

getPosition()

 

Gets the point to which the leader arrow head is pointing.

Returns: Pnt3f
3D position in world coordinates.

getSize()

 

Gets the size of the annotation label.

Returns: float
label size.

getText()

 

Gets the description text.

Returns: string
description text.

getUseNodeVisibility()

 

Returns whether the annotation label visibility should depend on the visibility of its associated Scenegraph node.

If this flag is enabled, the annotation label is only visible in the render window if the associated Scenegraph node is visible.

Returns: bool
True if flag enabled, false if not enabled.

isVisible()

 

Gets the visibility of the annotation label.

If the 'use node visibility' flag is enabled, the annotation label is only visible if the associated Scenegraph node is also visible.

Returns: bool
True if visible, false if hidden.

setBackgroundColor(color)

 

Sets label background color and opacity.

Parameters:
  • color (Color4f) - RGBA (linear RGB and alpha)

setDynamicScalingMode(mode)

 

Sets how the annotation label is scaled dynamically depending on its distance to the camera.

Parameters:
  • mode (int) - VR_ANNOTATION_DYNAMIC_SCALING_OFF (0), VR_ANNOTATION_DYNAMIC_SCALING_NEAR (1), VR_ANNOTATION_DYNAMIC_SCALING_FAR (2)

setFontColor(color)

 

Sets color of the annotation text.

Parameters:
  • color (Color3f) - linear RGB

setLineColor(color)

 

Sets border and leader color of the annotation visualization.

Parameters:
  • color (Color3f) - linear RGB

setName(name)

 

Sets the name. When used as identifier the name should be unique.

Parameters:
  • name (string) - name

setNode(node)

 

Sets Scenegraph node to which this annotation is assigned.

Parameters:
  • node (vrNodePtr) - scenegraph node

setPosition(position)

 

Sets the point to which the leader arrow head is pointing.

Parameters:
  • position (Pnt3f) - 3D position in world coordinates

setSize(size)

 

Set the size of the annotation label. Recommended value range is 0 to 1.

Parameters:
  • size (float) - label size

setText(text)

 

Sets the description text. Use \n for multiline text.

Parameters:
  • text (string) - Description text.

setUseNodeVisibility(enabled)

 

Set whether the annotation label visibility should depend on the visibility of its associated Scenegraph node.

If this flag is enabled, the annotation label is only visible in the render window if the associated Scenegraph node is visible.

If the annotation has no associated Scenegraph node, this flag is ignored.

Parameters:
  • enabled (bool) - True to enable this flag, false otherwise.

setVisible(visible)

 

Sets the annotation label to be visible or hidden in the render window.

If the 'use node visibility' flag is enabled, the annotation label is only visible if the associated Scenegraph node is also visible. setVisible(false) hides the annotation. A hidden annotation will never be visible in the render window, even if its associated node is visible.

Parameters:
  • visible (bool) - Set true to show, false to hide

zoomTo()

 

Camera zooms to this annotation in the current render window.

The annotation position is centered in the render window.