version 3.3

VRS::TransformEditor Class Reference

The TransformEditor transforms an object (given as a scene) according to mouse-movements. More...

#include <vrs/sg/transformeditor.h>

Inheritance diagram for VRS::TransformEditor:

VRS::InteractionTechnique VRS::SharedObj VRS::Visitable

List of all members.

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< SceneThinggetGhostCopyScene () const
 Returns a scene containing the ghost copy to be transformed including the currently edited Tf object.
SO< TfgetTransform () 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< SceneThingcreateGhostCopyScene (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


Detailed Description

The TransformEditor transforms an object (given as a scene) according to mouse-movements.

Usage:

Note:


Constructor & Destructor Documentation

VRS::TransformEditor::TransformEditor (  ) 


Member Function Documentation

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.

SO<Tf> VRS::TransformEditor::getTransform (  )  const

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.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Wed May 23 06:00:29 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact