vrdDeviceMessageData

class vrdDeviceMessageData

(Inherits vrdData)

Defines message content for vrImmersiveInteractionService.showControllerMessage(data, rightHand). You can display either a text message or an image message for a VR controller.

Use it like this:

md = vrdDeviceMessageData()
md.setText("Message text")
vrImmersiveInteractionService.showControllerMessage(md, True)

Functions

vrdDeviceMessageData.getBackgroundColor()
Returns:The background color in RGB
Return type:QVector3D
vrdDeviceMessageData.getFontSize()
Returns:The font size
Return type:integer
vrdDeviceMessageData.getForegroundColor()
Returns:The foreground color in RGB
Return type:QVector3D
vrdDeviceMessageData.getFrameSize()
Returns:The frame size
Return type:float
vrdDeviceMessageData.getImageDpi()
Returns:The dots per inch
Return type:integer
vrdDeviceMessageData.getImagePath()
Returns:The image file path
Return type:string
vrdDeviceMessageData.getPosition()
Returns:The position of the message
Return type:QVector3D
vrdDeviceMessageData.getRotation()
Returns:The orientation of the message in euler angles in degrees
Return type:QVector3D
vrdDeviceMessageData.getText()
Returns:The message text
Return type:string
vrdDeviceMessageData.getUseImage()
Returns:True, if an image is used
Return type:bool
vrdDeviceMessageData.setBackgroundColor(color)

Set the background color for the message.

Parameters:color (QVector3D) – Color in RGB [0..255]
vrdDeviceMessageData.setFontSize(value)

Set the font size for the message text.

Parameters:value (integer) – Size of the font
vrdDeviceMessageData.setForegroundColor(color)

Set the foreground color (e.g. text) for the message.

Parameters:color (QVector3D) – Color in RGB [0..255]
vrdDeviceMessageData.setFrameSize(value)

Set the frame size (outline width) of the message rectangle.

Parameters:value (float) – Frame size
vrdDeviceMessageData.setImageDpi(dpi)

Set the dpi for the image.

Parameters:dpi (integer) – Dots per inch
vrdDeviceMessageData.setImagePath(path)

Set a path to an image file. See vrdDeviceMessageData.setUseImage(value).

Parameters:path (string) – File path to an image
vrdDeviceMessageData.setPosition(position)

Set the position of the message.

Parameters:position (QVector3D) – 3D position in local device space
vrdDeviceMessageData.setRotation(eulerRotation)

Set the orientation of the message.

Parameters:eulerRotation (QVector3D) – Rotation in euler angles in degrees
vrdDeviceMessageData.setText(text)

Set the message text.

Parameters:text (string) – Text of the message
vrdDeviceMessageData.setUseImage(value)

Set if an image instead of text is used.

Parameters:value (bool) – If True, an image is used
vrdDeviceMessageData.vrdDeviceMessageData()
vrdDeviceMessageData.vrdDeviceMessageData(data)
Parameters:data (vrdDeviceMessageData) –