]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContour3V3DControler.cpp
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContour3V3DControler.cpp
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #include "manualContour3V3DControler.h"
27
28
29 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
32
33 manualContour3V3DControler::manualContour3V3DControler()
34   :
35 _manualcontour3Vcontroler(NULL)
36 {
37 }
38 // ----------------------------------------------------------------------------
39 manualContour3V3DControler::~manualContour3V3DControler()
40 {
41 }
42
43 // ----------------------------------------------------------------------------
44 manualContour3V3DControler * manualContour3V3DControler :: Clone()  // virtual
45 {
46         manualContour3V3DControler * clone = new manualContour3V3DControler();
47         CopyAttributesTo(clone);
48         return clone;
49 }
50
51 // ---------------------------------------------------------------------------
52 void manualContour3V3DControler::CopyAttributesTo( manualContour3V3DControler * cloneObject)
53 {
54         // Fathers object
55         manualContour3DControler::CopyAttributesTo(cloneObject);
56
57         cloneObject->SetManualContour3VControler( this->GetManualContour3VControler() );
58 }
59 // ----------------------------------------------------------------------------
60 void manualContour3V3DControler::InsertPoint(int x, int y, int z ) // virtual
61 {
62         manualContour3DControler::InsertPoint(  x,  y,  z );
63         _manualcontour3Vcontroler->InsertPoint_Others(0);
64 }
65 // ----------------------------------------------------------------------------
66 void manualContour3V3DControler::AddPoint( int x, int y, int z )
67 {
68         manualContour3DControler::AddPoint(  x,  y,  z );
69         if (_manualcontour3Vcontroler!=NULL)
70         {
71                 _manualcontour3Vcontroler->AddPoint_Others();
72         }
73 }
74 // ----------------------------------------------------------------------------
75 void manualContour3V3DControler::DeleteActualMousePoint(int x, int y)
76 {
77         int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() );
78         manualContour3DControler::DeleteActualMousePoint( x , y );
79         _manualcontour3Vcontroler->DeleteActualMousePoint_Others(id);
80 }
81 // ----------------------------------------------------------------------------
82 void manualContour3V3DControler::MouseMove( int x, int y )
83 {
84         int ss =this->_vtkInteractorStyleBaseView->vtkInteractorStyle::GetState();
85         if ((this->GetState()!=7) && (ss!=1)){
86                 manualContour3DControler::MouseMove( x , y );
87                 int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() );
88                 if (_manualcontour3Vcontroler!=NULL)
89                 {
90                         _manualcontour3Vcontroler->MouseMove_Others(id);
91                 }
92         }
93 }
94 // ----------------------------------------------------------------------------
95 void manualContour3V3DControler::SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler)
96 {
97         _manualcontour3Vcontroler = manualcontour3Vcontroler;
98 }
99 // ----------------------------------------------------------------------------
100 manualContour3VControler *manualContour3V3DControler::GetManualContour3VControler()
101 {
102         return _manualcontour3Vcontroler;
103 }
104 // ----------------------------------------------------------------------------
105 bool manualContour3V3DControler::OnChar() // virtual
106 {
107         if (manualContour3DControler::OnChar()==false )
108         {
109                 _manualcontour3Vcontroler->OnChar_Others();
110         }
111         return true;
112 }
113
114 // ----------------------------------------------------------------------------
115 void manualContour3V3DControler::ResetContour() // virtual
116 {
117         manualContourControler::ResetContour();
118         _manualcontour3Vcontroler->ResetContour_Others();
119 }
120