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

mitkLineWidgetModel3D Class Reference

mitkLineWidgetModel3D - a line widget used in a 3D scene More...

#include <mitkLineWidgetModel3D.h>

Inherits mitkWidgetModel3D.

Inheritance diagram for mitkLineWidgetModel3D:

Inheritance graph
[legend]
Collaboration diagram for mitkLineWidgetModel3D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkLineWidgetModel3D (float point0[3], float point1[3])
virtual int Render (mitkScene *view)
virtual void Pick (const WidgetNames &names)
virtual void Release ()
void SetUnits (float ux, float uy, float uz)
void SetUnits (float units[3])
float GetLineLength ()
void SetUnitName (const string &name)
const string & GetUnitName ()
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

mitkLineWidgetModel3D - a line widget used in a 3D scene

mitkLineWidgetModel3D is a line widget used in a 3D scene which can respond the mouse events to change the line status and return the current length of the line. It is supposed to be attached to a 3D data model (e.g. mitkVolumeModel, mitkSurfaceModel) and add to a 3D view (e.g. mitkScene), and in other conditions the display could be improper.


Constructor & Destructor Documentation

mitkLineWidgetModel3D::mitkLineWidgetModel3D float  point0[3],
float  point1[3]
 

One and only constructor of mitkLineWidgetModel3D.

Parameters:
point0[0] x-coordinate of one end point of this line
point0[1] y-coordinate of one end point of this line
point0[2] z-coordinate of one end point of this line
point1[0] x-coordinate of the other end point of this line
point1[1] y-coordinate of the other end point of this line
point1[2] z-coordinate of the other end point of this line


Member Function Documentation

virtual void mitkLineWidgetModel3D::_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 mitkLineWidgetModel3D::_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 mitkLineWidgetModel3D::_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 mitkLineWidgetModel3D::GetLineLength  ) 
 

Get length of this line.

Returns:
Return the length of the line.

const string& mitkLineWidgetModel3D::GetUnitName  )  [inline]
 

Get name string of unit.

Returns:
Return a constant reference to a string contains the name

virtual void mitkLineWidgetModel3D::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 mitkLineWidgetModel3D::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 mitkLineWidgetModel3D::Release  )  [virtual]
 

Maintain the selection status when this widget is released.

Implements mitkWidgetModel.

virtual int mitkLineWidgetModel3D::Render mitkScene view  )  [virtual]
 

Render this model.

Parameters:
view 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 mitkLineWidgetModel3D::SetUnitName const string &  name  )  [inline]
 

Set name string of unit.

Parameters:
name a constant reference to a string contains the name of the length unit (e.g. mm) this line uses

void mitkLineWidgetModel3D::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 mitkLineWidgetModel3D::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 mitkLineWidgetModel3D::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:03:43 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3