Developer documentation | Axl-2.5.1

axlActor.h
Go to the documentation of this file.
1 /* axlActor.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Fri Dec 17 10:58:38 2010 (+0100)
6  * Version: $Id$
7  * Last-Updated: Mon Dec 17 14:11:30 2012 (+0100)
8  * By: Julien Wintz
9  * Update #: 4
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLACTOR_H
21 #define AXLACTOR_H
22 
24 
25 #include <vtkAssembly.h>
26 #include <vtkSmartPointer.h>
27 #include <vtkVersion.h>
28 
29 #include "axlVtkViewPluginExport.h"
30 
31 
32 
34 
35 class axlAbstractActor;
36 
37 class vtkActor;
38 class vtkCellArray;
39 class vtkCellPicker;
40 class vtkDoubleArray;
41 class vtkPoints;
42 class vtkPolyData;
43 class vtkPolyDataMapper;
44 class vtkRenderWindowInteractor;
45 class vtkUnstructuredGrid;
46 class vtkVolume;
47 class vtkDataSetMapper;
48 class vtkDataSet;
49 
50 class axlActorPrivate;
51 
52 
53 class AXLVTKVIEWPLUGIN_EXPORT axlActor : public axlAbstractActor, public vtkAssembly
54 {
55 public:
56  enum ActorState {
59  edition
60  };
61 
62 public:
63  virtual dtkAbstractData *data(void) = 0;
64 
65 public:
66  virtual bool isVisible(void);
67  virtual void setInteractor(void *interactor);
68  virtual vtkRenderWindowInteractor *getInteractor(void);
69  virtual int getState(void);
70  virtual void setState(int state);
71  virtual void setDisplay(bool display);
72  virtual void setOpacity(double opacity);
73  virtual void setSize(double size);
74  virtual void setColor(double red, double green, double blue);
75  virtual void setInterpolation(int interpolation);
76 
77  virtual void setShader(QString vsfile);
78  virtual void setShaderFromString(QString vertex_shader_source,
79  QString fragment_shader_source);
80  virtual void onRemoved(void);
81 
82 // virtual axlAbstractActor *createActor(dtkAbstractData *data);
83 
84  QStringList fields(void);
85 
86 protected:
87  void drawAssymblyMatrix(void);
88 
89 public slots:
90  virtual void hide(void);
91  virtual void show(void);
92  virtual void update(void);
93 
94 public :
95  axlActor(void);
96  ~axlActor(void);
97 
98 public:
99  dtkAbstractData * getObserverData(void);
100  vtkSmartPointer<vtkPoints> getPoints(void);
101  void setPoints(vtkSmartPointer<vtkPoints> points);
102  vtkSmartPointer<vtkDoubleArray> getNormals(void);
103  void setNormals(vtkSmartPointer<vtkDoubleArray> normals);
104  vtkSmartPointer<vtkPolyData> getPolyData(void);
105  void setPolyData(vtkSmartPointer<vtkPolyData> polyData);
106  vtkSmartPointer<vtkCellArray> getCellArray(void);
107  void setCellArray(vtkSmartPointer<vtkCellArray> cellArray);
108  vtkSmartPointer<vtkActor> getActor(void);
109  void setActor(vtkSmartPointer<vtkActor> actor);
110  vtkSmartPointer<vtkVolume> getvtkVolume(void);
111  void setvtkVolume(vtkSmartPointer<vtkVolume> actor);
112  vtkSmartPointer<vtkPolyDataMapper> getMapper(void);
113  void setMapper(vtkSmartPointer<vtkPolyDataMapper> mapper);
114  vtkSmartPointer<vtkDataSetMapper> getDataSetMapper(void);
115  void setDataSetMapper(vtkSmartPointer<vtkDataSetMapper> mapper);
116  vtkSmartPointer<vtkCellPicker> getCellPicker();
117  void setCellPicker(vtkSmartPointer<vtkCellPicker> cellPicker);
118  axlActorControlPolygonObserver *getObserver(void);
119  void setObserver(axlActorControlPolygonObserver *observer);
120  vtkSmartPointer<vtkUnstructuredGrid> getUnstructuredGrid(void);
121  void setUnstructuredGrid(vtkSmartPointer<vtkUnstructuredGrid> unstructuredGrid);
122  void setObserverData(dtkAbstractData *data);
123  void NewObserver(void);
124  void deleteObserver(void);
125 
126 private:
127  axlActorPrivate *d;
128 };
129 
130 #endif
#define AXLVTKVIEWPLUGIN_EXPORT
virtual dtkAbstractData * data(void)=0
virtual bool isVisible(void)
virtual void onRemoved(void)
ActorState
Definition: axlActor.h:56
virtual void setShader(QString xmlfile)
virtual void update(void)
virtual void setInterpolation(int interpolation)
virtual void show(void)
virtual void setSize(double size)
virtual void hide(void)
virtual int getState(void)
virtual void setOpacity(double opacity)
virtual void setDisplay(bool display)
virtual void setInteractor(void *interactor)
virtual void setColor(double red, double green, double blue)
virtual void setShaderFromString(QString xmlfile)