Developer documentation | Axl-2.5.1

axlControlPointsWidget.h
Go to the documentation of this file.
1 /* axlControlPointsWidget.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Fri Feb 18 17:25:39 2011 (+0100)
6  * Version: $Id$
7  * Last-Updated: Wed Mar 16 21:46:46 2011 (+0100)
8  * By: Julien Wintz
9  * Update #: 32
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLCONTROLPOINTSWIDGET_H
21 #define AXLCONTROLPOINTSWIDGET_H
22 
23 #include <vtk3DWidget.h>
24 
26 
27 #include "axlVtkViewPluginExport.h"
28 
29 class axlControlPointsWidgetPrivate;
30 
31 class vtkActor;
32 class vtkActorCollection;
33 class vtkCellPicker;
34 class vtkPlanes;
35 class vtkPoints;
36 class vtkPolyData;
37 class vtkPolyDataMapper;
38 class vtkProp;
39 class vtkProperty;
40 class vtkSphereSource;
41 class vtkTransform;
42 
44 {
45 
46 public:
47  static axlControlPointsWidget *New();
48 
49  vtkTypeMacro(axlControlPointsWidget,vtk3DWidget);
50 
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
53  void PlaceWidget(double bounds[6]) override;
54  void PlaceWidget(void) override{
55  this->Superclass::PlaceWidget();
56  }
57  void PlaceWidget(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) override{
58  this->Superclass::PlaceWidget(xmin,xmax,ymin,ymax,zmin,zmax);
59  }
60 
61  void SetEnabled(int) override;
62  void setSpline(dtkAbstractData *spline);
63 
64  void initializePoints(void);
65  void resetProperty(void);
66  void SetControlPointRadius(double cpSize);
67 
68  vtkActor *netActor(void);
69  vtkActorCollection *ptsActors(void);
70 
71 protected:
74 
75  int State;
76 
77  enum WidgetState {
82  Outside
83  };
84 
85 
86  int HighlightHandle(vtkProp *prop);
87 
88  static void ProcessEvents(vtkObject* object, unsigned long event, void* clientdata, void* calldata);
89 
90  virtual void OnMouseMove(void);
91  virtual void OnLeftButtonDown(void);
92  virtual void OnLeftButtonUp(void);
93 
94  void CreateDefaultProperties(void);
95 
96 
97 private:
98  axlControlPointsWidget(const axlControlPointsWidget&); // Not implemented
99  void operator=(const axlControlPointsWidget&); // Not implemented
100 
101 private:
102  axlControlPointsWidgetPrivate *d;
103 };
104 
105 #endif
void PlaceWidget(void) override
#define AXLVTKVIEWPLUGIN_EXPORT
void PlaceWidget(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) override