Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkPickManipulator Class Reference

mitkPickManipulator - a manipulator with picking function enabled More...

#include <mitkPickManipulator.h>

Inherits mitkManipulator.

Inherited by mitkImageViewManipulatorWithWidgets, and mitkWidgetsViewManipulator.

Inheritance diagram for mitkPickManipulator:

Inheritance graph
Collaboration diagram for mitkPickManipulator:

Collaboration graph
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
void ClearPickResult ()
mitkWidgetModelGetPickedObject ()

Detailed Description

mitkPickManipulator - a manipulator with picking function enabled

mitkPickManipulator is a manipulator with picking function enabled. Manipulators who need to pick objects in the scene should derive from this class. In your derived class, use protected function _pick() to do the picking operation. If it returns a "true", something was picked and the information of the picked object was put into a WidgetNames struct member : m_PickedWidgets. The protected member m_PickBox indicates the precision of the picking operation. Smaller means preciser. The protected member m_EnableDepthTest indicates if the picking function deal with the depth information when multiple objects are at the same position on screen. The default value is "true", which means the picking function will test the depth of all the objects and return the most front object. In your derived class, you can set it to "false", which means no depth test will be done, and picked object will be the one rendered at last.
The WidgetNames struct is defined as follows:

    typedef struct _widget_names
        mitkWidgetModel *owner; // a pointer to the widget which was picked
        GLuint name1;           // name1 to name3 indicate the picked parts of the widget
        GLuint name2;
        GLuint name3;
    } WidgetNames;
The name1, name2 and name3 fields are used by mitkWidgetModel. In your derived class of mitkPickManipulator, you can pass the struct to picked mitkWidgetModel by calling m_PickedWidgets.owner->Pick() after picking. And in the samemanner, you can transfer the control to the picked widget through m_PickedWidgets.owner.

Member Function Documentation

void mitkPickManipulator::ClearPickResult  ) 

Clear picked results.

mitkWidgetModel* mitkPickManipulator::GetPickedObject  )  [inline]

Get current picked widget.

Return the pointer to a mitkWidgetModel currently picked.

virtual void mitkPickManipulator::PrintSelf ostream &  os  )  [virtual]

Print the necessary information about this object for the debugging purpose.

os The specified ostream to output information.

Reimplemented from mitkManipulator.

Reimplemented in mitkImageViewManipulatorWithWidgets, and mitkWidgetsViewManipulator.

The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:04:51 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3