The Rotation3dWidget JavaScript class. A rotatable spherical widget. More...
Signals | |
void | valueChanged (QScriptValue &rotation) |
valueChanged signal called when the Rotation 3D attribute value has changed More... | |
Signals inherited from WidgetBase | |
void | dragStarted (QScriptValue dragContext) |
signal called on mouse down when picking this widget with the Transform tool More... | |
void | drag (QScriptValue dragContext) |
signal called when this widget is dragged with the Transform tool More... | |
void | dragEnded () |
signal called on mouse up after having manipulated this widget with the Transform tool More... | |
Additional Inherited Members | |
Public Slots inherited from WidgetBase | |
Attribute * | data (int index=0) |
The Rotation3dWidget JavaScript class. A rotatable spherical widget.
A 3 dimensional rotation script widget. This widget offers a 3D sphere manipulator that can dragged in the Camera view while using the Transform tool. Dragging the sphere generates a 3D rotation. If no attribute is given at the construction of this object, the object will generate a 3D rotation attribute.
The following properties are supported by the widget:
Property | Type | Default Value | Description |
---|---|---|---|
data | String | - | The name of the automatically generated 3D rotation attribute (if none is provided) |
data | Attribute | - | An attribute of 3D rotation type that can be shared with another widget or node. |
radius | float | 1 | The radius of the 3D sphere in field. |
line_width | float | 0.03 | The line width |
color | ColorRGBA | 255, 0, 0, 120 | The colour of the sphere manipulator. |
selection_color | ColorRGBA | 255, 0, 0, 180 | The colour of the sphere manipulator when selected. |
The following components constitute the widget:
Component | Type |
---|---|
attribute | ROTATION_3D |
drag_manipulator | ROTATION_3D |
painter | SPHERE |
picker | MONO |
local_transformation | ROTATION_3D |
Connect to this scriptWidget valueChanged signal to be notified when a modification has been applied to the widget.
In the callback function, convert the widget value into an action (like modifying a peg attribute value).
|
signal |
valueChanged signal called when the Rotation 3D attribute value has changed
rotation | The new 3D rotation value. To retrieve the rotation per individual axis, get the following properties: rotation.x rotation.y rotation.z |