vrdVirtualTouchpadButton¶
-
class
vrdVirtualTouchpadButton
¶
(Inherits vrdData
)
Represents a virtual button loacted on a touchpad of an VR controller. This virtual button can be used to split up the touchpad on a VR controller that can be used as regular buttons by the input mapping system.
Summary¶
- Functions:
- getEndAngle() → float
- getMaxRadius() → float
- getMinRadius() → float
- getName() → string
- getStartAngle() → float
- getVirtualButtonId() → integer
- setEndAngle(end)
- setMaxRadius(max)
- setMinRadius(min)
- setName(name)
- setStartAngle(start)
- vrdVirtualTouchpadButton()
- vrdVirtualTouchpadButton(button)
- vrdVirtualTouchpadButton(name, minRadius, maxRadius, startAngle, endAngle)
Functions¶
-
vrdVirtualTouchpadButton.
getEndAngle
()¶ Gets the end angle of the virtual button.
Returns: The end angle of the virtual button. Return type: float
-
vrdVirtualTouchpadButton.
getMaxRadius
()¶ Gets the maximum radius of the virtual button.
Returns: The maximum radius of the virtual button. Return type: float
-
vrdVirtualTouchpadButton.
getMinRadius
()¶ Gets the minimum radius of the virtual button.
Returns: The minimum radius of the virtual button. Return type: float
-
vrdVirtualTouchpadButton.
getName
()¶ Gets the name of the virtual button.
Returns: The name of the virtual button. Return type: string
-
vrdVirtualTouchpadButton.
getStartAngle
()¶ Gets the start angle of the virtual button.
Returns: The start angle of the virtual button. Return type: float
-
vrdVirtualTouchpadButton.
getVirtualButtonId
()¶ Gets the virtual button id, which is set internally.
Returns: The id of the button. Return type: integer
-
vrdVirtualTouchpadButton.
setEndAngle
(end)¶ Sets the end angle of the virtual button.
Parameters: end (float) – The end angle of the virtual button. Range: 0.0 - 360.0.
-
vrdVirtualTouchpadButton.
setMaxRadius
(max)¶ Sets the maximum radius if the virtual button.
Parameters: max (float) – The maximzm radius of the virtual button. Range: 0.0 - 1.0. Must be larger than minRadius.
-
vrdVirtualTouchpadButton.
setMinRadius
(min)¶ Sets the minimum radius of the virtual button.
Parameters: min (float) – The minimum radius of the virtual button. Range: 0.0 - 1.0. Must be smaller than maxRadius.
-
vrdVirtualTouchpadButton.
setName
(name)¶ Sets the name of the virtual button.
Parameters: name (string) – The name that will be set.
-
vrdVirtualTouchpadButton.
setStartAngle
(start)¶ Sets the start angle of the virtual button.
Parameters: start (float) – The start angle of the virtual button. Range: 0.0 - 360.0.
-
vrdVirtualTouchpadButton.
vrdVirtualTouchpadButton
()¶ Default constructor.
-
vrdVirtualTouchpadButton.
vrdVirtualTouchpadButton
(button)¶ Copy constructor.
Parameters: button (vrdVirtualTouchpadButton) –
-
vrdVirtualTouchpadButton.
vrdVirtualTouchpadButton
(name, minRadius, maxRadius, startAngle, endAngle)¶ Constructor that creates an object with all necessary parameters to describe the virtual button.
Parameters: - name (string) – The name of the button, that is used to identify it.
- minRadius (float) – The radius on the circular touchpad, where the area of the button starts. Range: 0.0 - 1.0. Must be smaller than maxRadius.
- maxRadius (float) – The radius on the circular touchpad, where the area of the button ends. Range: 0.0 - 1.0. Must be larger than minRadius.
- startAngle (float) – The angle on the circular touchpad, where the area of the button starts. Range: 0.0 - 360.0.
- endAngle (float) – The angle on the circular touchpad, where the area of the button ends. Range: 0.0 - 360.0.