vrdButtonState¶
-
class
vrdButtonState
¶
(Inherits vrdData
)
Represents the state of a button on a VR controller.
Summary¶
Functions¶
-
vrdButtonState.
getName
()¶ Default destructor.
Gets the name of to button to which the state belongs.
Returns: The button name. Return type: string
-
vrdButtonState.
getPosition
()¶ Gets the position of the button in two dimensions. Only the x value will be set if the button has only one dimension in which it can move.
Returns: The position of the button. Range if button has two axis: -1.0 - 1.0 per component. Range if button has only one axis: 0.0 - 1.0 and second component will be 0. Return type: QVector2D
-
vrdButtonState.
isPressed
()¶ Returns if the button is pressed or not.
Returns: true if the button is pressed, false otherwise. Return type: bool
-
vrdButtonState.
isTouched
()¶ Returns if the button is touched or not.
Returns: True if the button is touched, false otherwise. Return type: bool
-
vrdButtonState.
setName
(name)¶ Sets the name of the button to which the state belongs.
Parameters: name (string) – The name of the button.
-
vrdButtonState.
setPosition
(position)¶ Sets the position of the button in two dimensions.
Parameters: position (QVector2D) – The position of the button. Range if button has two axis: -1.0 - 1.0 per component. Range if button has only one axis: 0.0 -1.0 and second component will be 0.
-
vrdButtonState.
setPressed
(pressed)¶ Sets if the button is pressed.
Parameters: pressed (bool) – true when the button is pressed, false otherwise.
-
vrdButtonState.
setTouched
(touched)¶ Sets if the button is touched or not.
Parameters: touched (bool) – true is the button is touched, false otherwise.
-
vrdButtonState.
vrdButtonState
()¶ Default constructor.
-
vrdButtonState.
vrdButtonState
(state)¶ Copy constructor.
Parameters: state (vrdButtonState) –