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

mitkAngleWidgetModel3D Class Reference

mitkAngleWidgetModel3D - a 3D widget for measuring angles More...

#include <mitkAngleWidgetModel3D.h>

Inherits mitkWidgetModel3D.

Inheritance diagram for mitkAngleWidgetModel3D:

Inheritance graph
[legend]
Collaboration diagram for mitkAngleWidgetModel3D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkAngleWidgetModel3D (float startPoint[3], float endPoint0[3], float endPoint1[3])
virtual int Render (mitkScene *scene)
virtual void Pick (const WidgetNames &names)
virtual void Release ()
void SetUnits (float ux, float uy, float uz)
void SetUnits (float units[3])
float GetAngleInDegree ()
float GetAngleInRadian ()
virtual void Update ()

Protected Member Functions

virtual void _onMouseDown (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
virtual void _onMouseUp (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
virtual void _onMouseMove (bool ctrlDown, bool shiftDown, int xPos, int yPos, int deltaX, int deltaY)

Detailed Description

mitkAngleWidgetModel3D - a 3D widget for measuring angles

mitkAngleWidgetModel3D is a 3D widget for measuring angles. It can respond the mouse events and return the current angle in units of degrees or radian. It is supposed to be attached to a 3D data model (e.g. mitkVolumeModel, mitkSurfaceModel) and add to a 3D scene (e.g. mitkScene), and in other conditions the display could be improper.


Constructor & Destructor Documentation

mitkAngleWidgetModel3D::mitkAngleWidgetModel3D float  startPoint[3],
float  endPoint0[3],
float  endPoint1[3]
 

One and only constructor of mitkAngleWidgetModel3D.

Parameters:
startPoint[0] x-coordinate of start point
startPoint[1] y-coordinate of start point
startPoint[2] z-coordinate of start point
endPoint0[0] x-coordinate of one end point
endPoint0[1] y-coordinate of one end point
endPoint0[2] z-coordinate of one end point
endPoint1[0] x-coordinate of the other end point
endPoint1[1] y-coordinate of the other end point
endPoint1[2] z-coordinate of the other end point


Member Function Documentation

virtual void mitkAngleWidgetModel3D::_onMouseDown int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, virtual]
 

Deal with mouse down event.

Parameters:
mouseButton indicates which mouse button is pressed
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse down event occurs
yPos y-coordinate of the mouse position when mouse down event occurs

Implements mitkWidgetModel.

virtual void mitkAngleWidgetModel3D::_onMouseMove bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos,
int  deltaX,
int  deltaY
[protected, virtual]
 

Deal with mouse move event.

Parameters:
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse move event occurs
yPos y-coordinate of the mouse position when mouse move event occurs
deltaX movement along x-axis of the mouse when mouse move event occurs
deltaY movement along y-axis of the mouse when mouse move event occurs

Implements mitkWidgetModel.

virtual void mitkAngleWidgetModel3D::_onMouseUp int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, virtual]
 

Deal with mouse up event.

Parameters:
mouseButton indicates which mouse button was pressed and now released
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse up event occurs
yPos y-coordinate of the mouse position when mouse up event occurs

Implements mitkWidgetModel.

float mitkAngleWidgetModel3D::GetAngleInDegree  ) 
 

Get the value of angle in degree.

Returns:
Return value of this angle in degree.

float mitkAngleWidgetModel3D::GetAngleInRadian  ) 
 

Get the value of angle in radian.

Returns:
Return value of this angle in radian.

virtual void mitkAngleWidgetModel3D::Pick const WidgetNames &  names  )  [virtual]
 

Maintain the selection status when this widget is picked.

Parameters:
names a constant reference to an WidgerNames which contains the names of selected parts of this widget.

Implements mitkWidgetModel.

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

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

Parameters:
os The specified ostream to output information.

Reimplemented from mitkWidgetModel3D.

virtual void mitkAngleWidgetModel3D::Release  )  [virtual]
 

Maintain the selection status when this widget is released.

Implements mitkWidgetModel.

virtual int mitkAngleWidgetModel3D::Render mitkScene scene  )  [virtual]
 

Render this model.

Parameters:
scene the pointer of an mitkScene in which this model will be shown
Returns:
Return 1 if this model is rendered successfully. Otherwise return 0.

Reimplemented from mitkModel.

void mitkAngleWidgetModel3D::SetUnits float  units[3]  )  [inline]
 

Set unit length on axes.

Parameters:
units[0] unit length in x-axis
units[1] unit length in y-axis
units[2] unit length in z-axis

void mitkAngleWidgetModel3D::SetUnits float  ux,
float  uy,
float  uz
[inline]
 

Set unit length on axes.

Parameters:
ux unit length in x-axis
uy unit length in y-axis
uz unit length in z-axis

virtual void mitkAngleWidgetModel3D::Update  )  [virtual]
 

Update the parameters of the widget.

Reimplemented from mitkWidgetModel3D.


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