vtkInteractorStyleSphere Class Reference

#include <vtkInteractorStyleSphere.h>

Inheritance diagram for vtkInteractorStyleSphere:
Inheritance graph
[legend]
Collaboration diagram for vtkInteractorStyleSphere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkInteractorStyleSphere ()
 ~vtkInteractorStyleSphere ()
virtual bool OnLeftButtonUp ()
virtual bool OnLeftButtonDown ()
virtual bool OnMouseMove ()
virtual bool OnRightButtonUp ()
virtual bool OnRightButtonDown ()
virtual InteractorStyleMaracasClone ()
void CopyAttributesTo (InteractorStyleMaracas *cloneObject)
virtual bool OnChar ()
virtual bool OnMiddleButtonDown ()
virtual bool OnMiddleButtonUp ()
virtual bool OnLeftDClick ()
virtual bool OnRightDClick ()
virtual bool OnMiddleDClick ()
virtual bool OnMouseWheel ()
void SetVtkInteractorStyleBaseView (vtkInteractorStyleBaseView *_vtkInteractorStyleBaseView)
void RemoveVtkInteractorStyleBaseView ()
void SetActive (bool active)
bool GetActive ()

Protected Attributes

vtkInteractorStyleBaseView_vtkInteractorStyleBaseView

Private Attributes

bool _stateRotate
bool _stateRadio
int _fordwareX
int _fordwareY
double _radio

Detailed Description

Definition at line 6 of file vtkInteractorStyleSphere.h.


Constructor & Destructor Documentation

vtkInteractorStyleSphere::vtkInteractorStyleSphere (  ) 

Definition at line 6 of file vtkInteractorStyleSphere.cxx.

References _stateRadio, and _stateRotate.

00007 {
00008         _stateRadio  = false;
00009         _stateRotate = false;
00010 }

vtkInteractorStyleSphere::~vtkInteractorStyleSphere (  ) 

Definition at line 14 of file vtkInteractorStyleSphere.cxx.

00015 {
00016 }


Member Function Documentation

InteractorStyleMaracas * InteractorStyleMaracas::Clone (  )  [virtual, inherited]
void InteractorStyleMaracas::CopyAttributesTo ( InteractorStyleMaracas cloneObject  )  [inherited]

Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, manualRoiControler, and manualRotationToolControler.

Definition at line 27 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::GetActive(), and InteractorStyleMaracas::SetActive().

Referenced by InteractorStyleMaracas::Clone().

00028 {
00029         // Fathers object
00030         //<FATHERCLASS>::CopyAttributesTo(cloneObject);
00031 
00032         cloneObject->SetActive(  this->GetActive() );
00033 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool InteractorStyleMaracas::GetActive (  )  [inherited]

Definition at line 116 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_active.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(), and InteractorStyleMaracas::CopyAttributesTo().

00117 {
00118         return _active;
00119 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnChar (  )  [virtual, inherited]

Reimplemented in manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, and manualContourPerpPlaneControler.

Definition at line 37 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00038 {
00039         return true;
00040 }

Here is the caller graph for this function:

bool vtkInteractorStyleSphere::OnLeftButtonDown (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 59 of file vtkInteractorStyleSphere.cxx.

References _fordwareX, _fordwareY, _stateRotate, and InteractorStyleMaracas::_vtkInteractorStyleBaseView.

00060 {
00061         _stateRotate    = true;
00062         _fordwareX              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
00063         _fordwareY              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00064         return true;
00065 }

bool vtkInteractorStyleSphere::OnLeftButtonUp (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 70 of file vtkInteractorStyleSphere.cxx.

References _fordwareX, _fordwareY, _stateRotate, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), wxSphereView::RefreshView(), wxSphereView::RotationEnd(), wxSphereView::SetXYZtoParent(), and vtkInteractorStyleBaseView::TransformCoordinate().

00071 {
00072         wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
00073         if (_stateRotate==true){
00074                 int fx  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
00075                 int fy  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00076 
00077                 if ((_fordwareX==fx)&&(_fordwareY==fy)){
00078                         double x=fx,y=fy,z=1;
00079                         _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
00080                         wxsphereview->SetXYZtoParent(x,y);
00081                         wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
00082                         wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
00083                 } else {
00084                         wxsphereview->RotationEnd();
00085                 }
00086                 wxsphereview->RefreshView();
00087                 _stateRotate = false;
00088         }
00089 
00090         return true;
00091 }

Here is the call graph for this function:

bool InteractorStyleMaracas::OnLeftDClick (  )  [virtual, inherited]
bool InteractorStyleMaracas::OnMiddleButtonDown (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.

Definition at line 62 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00063 {
00064         return true;
00065 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnMiddleButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.

Definition at line 67 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00068 {
00069         return true;
00070 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnMiddleDClick (  )  [virtual, inherited]

Definition at line 72 of file InteractorStyleMaracas.cxx.

00073 {
00074         return true;
00075 }

bool vtkInteractorStyleSphere::OnMouseMove (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 96 of file vtkInteractorStyleSphere.cxx.

References _fordwareX, _fordwareY, _radio, _stateRadio, _stateRotate, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxSphereView::RefreshView(), wxSphereView::RotationStart(), wxSphereView::SetDeltaVoxel(), and wxSphereView::SetRadio().

00097 {
00098         wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
00099         if (_stateRotate==true)
00100         {
00101                 bool ok_v, ok_ang;
00102                 ok_v=false;
00103                 ok_ang=false;
00104                 if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1)
00105                 {
00106                         ok_v = true;
00107                 }
00108                 if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1)
00109                 {
00110                         ok_ang = true;
00111                 }
00112             int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
00113         int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00114                 wxsphereview->RotationStart( fx - _fordwareX , -(fy - _fordwareY) , ok_v, ok_ang);
00115                 wxsphereview->RefreshView();
00116         } 
00117         if (_stateRadio==true)
00118         {           
00119                 //int fx = this->Interactor->GetEventPosition()[0];
00120         int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00121                 double dif=(fy-_fordwareY) / 10.0;
00122                 wxsphereview->SetRadio( _radio + dif );
00123                 wxsphereview->SetDeltaVoxel(3);
00124                 wxsphereview->RefreshView();
00125         }
00126 
00127         return true;
00128 }

Here is the call graph for this function:

bool InteractorStyleMaracas::OnMouseWheel (  )  [virtual, inherited]

Definition at line 92 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00093 {
00094         return true;
00095 }

Here is the caller graph for this function:

bool vtkInteractorStyleSphere::OnRightButtonDown (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 21 of file vtkInteractorStyleSphere.cxx.

References _fordwareY, _radio, _stateRadio, InteractorStyleMaracas::_vtkInteractorStyleBaseView, wxSphereView::GetRadio(), and vtkInteractorStyleBaseView::GetWxVtk2DBaseView().

00022 {
00023         if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) )
00024         {
00025                 _stateRadio     = true;
00026                 //_fordwareX    = this->Interactor->GetEventPosition()[0];
00027                 _fordwareY      = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00028 
00029                 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
00030 
00031                 _radio = wxsphereview->GetRadio();
00032         }
00033 
00034         return true;
00035 }

Here is the call graph for this function:

bool vtkInteractorStyleSphere::OnRightButtonUp (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 39 of file vtkInteractorStyleSphere.cxx.

References _stateRadio, InteractorStyleMaracas::_vtkInteractorStyleBaseView, wxSphereView::GetIdOfImage(), wxSphereView::GetRadio(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxSphereView::RefreshView(), and wxSphereView::SetDeltaVoxel().

00040 {
00041         if (_stateRadio==true)
00042         {
00043                 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
00044                 wxsphereview->SetDeltaVoxel(1);
00045                 double radio=wxsphereview->GetRadio();
00046                 wxsphereview->GetIdOfImage(radio+0.1);
00047                 wxsphereview->GetIdOfImage(radio+0.2);
00048                 wxsphereview->GetIdOfImage(radio-0.1);
00049                 wxsphereview->GetIdOfImage(radio-0.2);
00050 
00051                 wxsphereview->RefreshView();
00052                 _stateRadio = false;
00053         }
00054 
00055         return true;
00056 }

Here is the call graph for this function:

bool InteractorStyleMaracas::OnRightDClick (  )  [virtual, inherited]

Definition at line 87 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00088 {
00089         return true;
00090 }

Here is the caller graph for this function:

void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView (  )  [inherited]

Definition at line 106 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView.

Referenced by vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas().

00107 {
00108         _vtkInteractorStyleBaseView = NULL;
00109 }

Here is the caller graph for this function:

void InteractorStyleMaracas::SetActive ( bool  active  )  [inherited]
void InteractorStyleMaracas::SetVtkInteractorStyleBaseView ( vtkInteractorStyleBaseView _vtkInteractorStyleBaseView  )  [inherited]

Definition at line 99 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView.

Referenced by vtkInteractorStyleBaseView::AddInteractorStyleMaracas(), and vtkInteractorStyleBaseView::InsertInteractorStyleMaracas().

00100 {
00101         _vtkInteractorStyleBaseView = vtkInteractorStyleBaseView;
00102 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 20 of file vtkInteractorStyleSphere.h.

Referenced by OnLeftButtonDown(), OnLeftButtonUp(), and OnMouseMove().

Definition at line 23 of file vtkInteractorStyleSphere.h.

Referenced by OnMouseMove(), and OnRightButtonDown().

Definition at line 45 of file InteractorStyleMaracas.h.

Referenced by manualContour3VControler::AddPoint_Others(), manualContour3VControler::DeleteActualMousePoint_Others(), manualContour3VControler::InsertPoint_Others(), InteractorStyleMaracas::InteractorStyleMaracas(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseDLeft(), manualContourControler::MouseDLeft(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualContour3VControler::MouseMove_Others(), manualContourBaseControler::OnChar(), manualContour3DControler::OnChar(), manualContour3VControler::OnChar_Others(), OnLeftButtonDown(), vtkInteractorStylePlane2D::OnLeftButtonDown(), vtkInteractorStyleMPRView::OnLeftButtonDown(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftDClick(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), OnMouseMove(), vtkInteractorStylePlane2D::OnMouseMove(), vtkInteractorStyleMPRView::OnMouseMove(), vtkInteractorScrollZ::OnMouseMove(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), manualContourBaseControler::OnRightButtonDown(), OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1