| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/transformeditor.h>

Public Member Functions | |
| TransformEditor () | |
| void | start (SO< SceneThing > target) |
| Creates the internal 'ghost copy' scene and starts reacting to drag events. | |
| void | end () |
| clears the internal scene and stops reacting to drag events. | |
| virtual void | onDragStart (int x, int y, SO< ButtonEvent >, MouseButtonFunctionID id) |
| See interactiontechnique.h. | |
| virtual void | onDragMotion (int x, int y, SO< MotionEvent >, MouseButtonFunctionID id, int startX, int startY) |
| virtual void | onDragEnd (int x, int y, SO< ButtonEvent >, MouseButtonFunctionID id, int startX, int startY) |
| SO< SceneThing > | getGhostCopyScene () const |
| Returns a scene containing the ghost copy to be transformed including the currently edited Tf object. | |
| SO< Tf > | getTransform () const |
| Returns the currently edited transform (never NULL and always the same pointer), which is also contained in the ghost copy scene. | |
| void | setRotationSensitivity (double degreesPerPixel=0.3) |
| When rotating an object, horizontal mouse movement is translated to rotation around the vertical middle axis by 'degreesPerPixel' times the movement in pixels. | |
| double | getRotationSensitivity () const |
| VRS_TYPEINFO (TransformEditor, InteractionTechnique) | |
Static Public Member Functions | |
| static SO< SceneThing > | createGhostCopyScene (SO< SceneThing > scene, SO< MappedVertexAttributeShapeGL > &shape) |
| Creates a semi-transparent 'ghost copy' scene. | |
Static Public Attributes | |
| static const MouseButtonFunctionID | HorizontalShiftButton |
| static const MouseButtonFunctionID | VerticalShiftButton |
| static const MouseButtonFunctionID | RotationButton |
| static const MouseButtonFunctionID | ScalingButton |
Usage:
Note:
| VRS::TransformEditor::TransformEditor | ( | ) |
| void VRS::TransformEditor::start | ( | SO< SceneThing > | target | ) |
Creates the internal 'ghost copy' scene and starts reacting to drag events.
| void VRS::TransformEditor::end | ( | ) |
clears the internal scene and stops reacting to drag events.
| virtual void VRS::TransformEditor::onDragStart | ( | int | x, | |
| int | y, | |||
| SO< ButtonEvent > | , | |||
| MouseButtonFunctionID | id | |||
| ) | [virtual] |
| virtual void VRS::TransformEditor::onDragMotion | ( | int | x, | |
| int | y, | |||
| SO< MotionEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
| virtual void VRS::TransformEditor::onDragEnd | ( | int | x, | |
| int | y, | |||
| SO< ButtonEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
| SO<SceneThing> VRS::TransformEditor::getGhostCopyScene | ( | ) | const |
Returns a scene containing the ghost copy to be transformed including the currently edited Tf object.
It is only visible between start and end call. Note: The returned pointer is always the same and not null during the lifetime of the TransformEditor. The scene is empty outside a cycle of start/end calls.
Returns the currently edited transform (never NULL and always the same pointer), which is also contained in the ghost copy scene.
| void VRS::TransformEditor::setRotationSensitivity | ( | double | degreesPerPixel = 0.3 |
) |
When rotating an object, horizontal mouse movement is translated to rotation around the vertical middle axis by 'degreesPerPixel' times the movement in pixels.
| double VRS::TransformEditor::getRotationSensitivity | ( | ) | const |
| VRS::TransformEditor::VRS_TYPEINFO | ( | TransformEditor | , | |
| InteractionTechnique | ||||
| ) |
| static SO<SceneThing> VRS::TransformEditor::createGhostCopyScene | ( | SO< SceneThing > | scene, | |
| SO< MappedVertexAttributeShapeGL > & | shape | |||
| ) | [static] |
Creates a semi-transparent 'ghost copy' scene.
This method is internally used to build the ghost copy. The passed 'shape' pointer will point to the ghost copy shape inside the returned scene. The result might be NULL for empty scenes.
const MouseButtonFunctionID VRS::TransformEditor::HorizontalShiftButton [static] |
const MouseButtonFunctionID VRS::TransformEditor::VerticalShiftButton [static] |
const MouseButtonFunctionID VRS::TransformEditor::RotationButton [static] |
const MouseButtonFunctionID VRS::TransformEditor::ScalingButton [static] |