Base class for manipulators in a renderer. A manipulator is an object that can be interacted with (e.g. with the mouse, or keyboard) to modify a SceneItem.
#include <Rendering/SceneInteraction/transformmanipulator.h>
◆ AxisFlags
Enumerator |
---|
XAxis | |
YAxis | |
ZAxis | |
AllAxes | |
◆ TransformManipulator() [1/2]
◆ TransformManipulator() [2/2]
◆ ~TransformManipulator()
◆ activate()
◆ calcDragVectorAlongAxis()
- Parameters
-
dragStart | Line representing the start point of a drag (world coordinates) |
dragEnd | Line representing the end point of a drag (world coordinates) |
plane | Plane which our lines are intersecting (world coordinates) |
axis | Axis along which we are projecting motion (world coordinates) |
- Note
- The axis vector and plane normal are assumed to be unit vectors in order to save on calculations.
- Returns
- a vector representing the distance dragged along the axis, on the plane, in world coords.
◆ calcPlanarMotion()
- Parameters
-
dragStart | Line representing the start point of a drag (world coordinates) |
dragEnd | Line representing the end point of a drag (world coordinates) |
plane | Plane on which to intersect our lines (world coordinates) |
- Returns
- a vector representing the motion dragged on the specified plane, in world coordinates.
- Note
- the plane normal is assumed to be a unit vector in order to save on calculations.
Computes planar motion from the input start and end rays by projecting those points onto a plane defined by pointOnPlane and planeNormal.
◆ combineWithFinalTransform()
- Parameters
-
t | The transform to combine with the current "final" transform. |
Combines a transform with the recorded final transform of this manipulator; i.e. applies this transform to the overall transform, which indicates the final position of the object that this manipulator has been repeatedly applied to.
- See also
- getFinalTransform
◆ getCacheKey()
QString getCacheKey |
( |
| ) |
const |
|
overridepure virtual |
◆ getDragEnd()
const Line & getDragEnd |
( |
| ) |
const |
- Returns
- dragStart A line (in world coordinates) representing the end point of a user's mouse drag. The line cuts through the view frustum.
Get the end of the drag for the manipulator. A single drag is made of a start (where the user pressed), and an end (where the user released).
◆ getDragStart()
const Line & getDragStart |
( |
| ) |
const |
- Returns
- dragStart A line (in world coordinates) representing the start point of a user's mouse drag. The line cuts through the view frustum.
Get the start of the drag for the manipulator. A single drag is made of a start (where the user pressed), and an end (where the user released).
◆ getFinalTransform()
- Returns
- The final transform that has been applied by this manipulator, taking into account each individual application (call to apply()).
Manipulators always notify the scene of their changes instantly during the activate() function. This function returns a transform that represents the final state that the manipulator would apply to the object if all of these accumulated changes were applied together. This is useful for undoing/redoing a whole set of individual manipulations.
◆ getFreeAxesOfMotion()
unsigned getFreeAxesOfMotion |
( |
| ) |
const |
◆ getWorldMatrices()
- Parameters
-
manipItem | The scene item being manipulated. We are retrieving its matrices. |
world | (out) The world matrix of the scene item |
worldNoTranslate | (out) The world matrix without a translation component |
worldInv | (out) The world matrix (without translation) inverted |
- Returns
- true if the matrices were successfully obtained from the scene item, false if an error occurred (e.g. the world matrix was not invertible).
◆ operator=()
◆ setDragEnd()
- Parameters
-
dragEnd | A line (in world coordinates) representing the end point of a user's mouse drag. The line cuts through the view frustum. |
Set the end of the drag for the manipulator. A single drag is made of a start (where the user pressed), and an end (where the user released).
◆ setDragStart()
- Parameters
-
dragStart | A line (in world coordinates) representing the start point of a user's mouse drag. The line cuts through the view frustum. |
Set the start of the drag for the manipulator. A single drag is made of a start (where the user pressed), and an end (where the user released).
◆ setFinalTransformToIdentity()
void setFinalTransformToIdentity |
( |
| ) |
|
Resets the final transform to the identity matrix.
◆ setFreeAxesOfMotion()
void setFreeAxesOfMotion |
( |
unsigned |
axisFlags | ) |
|