code/vexptoolbox/vrutil.py
def addHeadLockedText(msg='Text', color=[1.0, 1.0, 1.0], distance=2.0, scale=0.05):
    """ Add a head-locked text node, e.g. to display task feedback in VR.
    
    Args:
        msg (str): Message text
        color: RBG 3-tuple of color values
        distance (float): Z rendering distance from MainView
        scale (float): Text node scaling factor
    
    Returns: Vizard node3d object containing the text
    """
    # Create 3D text object
    text = viz.addText3D(msg, scale=[scale, scale, scale], color=color)
    text.resolution(1.0)
    text.setThickness(0.1)
    text.alignment(viz.ALIGN_CENTER)
    
    # Lock text to user viewpoint at fixed distance
    text_link = viz.link(viz.MainView, text, enabled=True)
    text_link.preTrans([0.0, 0.0, distance])
    text.link = text_link

    return text
 Add a head-locked text node, e.g. to display task feedback in VR.
    
    Args:
        msg (str): Message text
        color: RBG 3-tuple of color values
        distance (float): Z rendering distance from MainView
        scale (float): Text node scaling factor
    
    Returns: Vizard node3d object containing the text
    
Add a head-locked text node, e.g. to display task feedback in VR.
Add a head - locked text node e . g . to display task feedback in VR .
def addHeadLockedText(msg='Text', color=[1.0, 1.0, 1.0], distance=2.0, scale=0.05):
    text = viz.addText3D(msg, scale=[scale, scale, scale], color=color)
    text.resolution(1.0)
    text.setThickness(0.1)
    text.alignment(viz.ALIGN_CENTER)
    text_link = viz.link(viz.MainView, text, enabled=True)
    text_link.preTrans([0.0, 0.0, distance])
    text.link = text_link
    return text
def addHeadLockedText ( msg = 'Text' , color = [ 1.0 , 1.0 , 1.0 ] , distance = 2.0 , scale = 0.05 ) : text = viz . addText3D ( msg , scale = [ scale , scale , scale ] , color = color ) text . resolution ( 1.0 ) text . setThickness ( 0.1 ) text . alignment ( viz . ALIGN_CENTER ) text_link = viz . link ( viz . MainView , text , enabled = True ) text_link . preTrans ( [ 0.0 , 0.0 , distance ] ) text . link = text_link return text
Add a head-locked text node, e.g.
Add a head - locked text node e . g .
""" Add a head-locked text node, e.g. to display task feedback in VR.
    
    Args:
        msg (str): Message text
        color: RBG 3-tuple of color values
        distance (float): Z rendering distance from MainView
        scale (float): Text node scaling factor
    
    Returns: Vizard node3d object containing the text
    """ # Create 3D text object # Lock text to user viewpoint at fixed distance
msg
None
color
RBG 3-tuple of color values
RBG 3 - tuple of color values
distance
Z rendering distance from MainView
Z rendering distance from MainView
scale
Text node scaling factor
Text node scaling factor