QAxisAccumulator¶
QAxisAccumulator
processes velocity or acceleration data from a QAxis
. More…
Synopsis¶
Functions¶
def
scale
()def
sourceAxis
()def
sourceAxisType
()def
value
()def
velocity
()
Slots¶
def
setScale
(scale)def
setSourceAxis
(sourceAxis)def
setSourceAxisType
(sourceAxisType)
Signals¶
def
scaleChanged
(scale)def
sourceAxisChanged
(sourceAxis)def
sourceAxisTypeChanged
(sourceAxisType)def
valueChanged
(value)def
velocityChanged
(value)
Detailed Description¶
Constructs a new QAxisAccumulator
instance with parent
.
A QAxis
reports the current position of an axis on an input device. When the axis is returned to its neutral position the value of that axis returns to 0. Often, it is required to have the input from an axis control a variable in other ways, for example treating the value from the QAxis
as a velocity (first derivative with respect to time) or as an acceleration (second derivative with respect to time). This can be done with user code or with a QFrameAction
but those approached are not ideal as they add more work to the main thread and are inherently imperative. The QAxisAccumulator
class allows for this common task to be performed on the Qt 3D backend and be specified in a declarative manner.
- class PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator([parent=None])¶
- Parameters
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Constructs a new QAxisAccumulator
instance with parent parent
.
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.SourceAxisType¶
Constant
Description
Qt3DInput.QAxisAccumulator.Velocity
Qt3DInput.QAxisAccumulator.Acceleration
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.scale()¶
- Return type
float
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.scaleChanged(scale)¶
- Parameters
scale – float
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.setScale(scale)¶
- Parameters
scale – float
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.setSourceAxis(sourceAxis)¶
- Parameters
sourceAxis –
PySide6.Qt3DInput.Qt3DInput.QAxis
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.setSourceAxisType(sourceAxisType)¶
- Parameters
sourceAxisType –
SourceAxisType
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.sourceAxis()¶
- Return type
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.sourceAxisChanged(sourceAxis)¶
- Parameters
sourceAxis –
PySide6.Qt3DInput.Qt3DInput.QAxis
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.sourceAxisType()¶
- Return type
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.sourceAxisTypeChanged(sourceAxisType)¶
- Parameters
sourceAxisType –
SourceAxisType
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.value()¶
- Return type
float
Returns the accumulated (integrated) value.
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.valueChanged(value)¶
- Parameters
value – float
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.velocity()¶
- Return type
float
- PySide6.Qt3DInput.Qt3DInput.QAxisAccumulator.velocityChanged(value)¶
- Parameters
value – float
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.