Developer documentation | Axl-2.5.1

axlAbstractActor.h
Go to the documentation of this file.
1 /* axlAbstractActor.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Tue Nov 9 16:58:59 2010 (+0100)
6  * Version: $Id$
7  * Last-Updated: Tue Nov 9 17:09:38 2010 (+0100)
8  * By: Meriadeg Perrinel
9  * Update #: 19
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLABSTRACTACTOR_H
21 #define AXLABSTRACTACTOR_H
22 
23 #include "axlCoreExport.h"
24 
25 class dtkAbstractData;
26 class axlActor;
27 class axlMesh;
28 
29 #include <QObject>
30 #include <QtGui>
31 class axlAbstractActorPrivate;
32 
33 class AXLCORE_EXPORT axlAbstractActor : public QObject
34 {
35  Q_OBJECT
36 
37 //protected:
38 public :
40  virtual ~axlAbstractActor(void);
41 
42 public:
43  virtual bool isVisible(void);
44 
45  virtual void setInteractor(void *interactor);
46  virtual void setDisplay(bool display);
47  virtual void setData(dtkAbstractData *data);
48  virtual void showControlPoints(bool show);
49  virtual bool isShowControlPoints(void);
50  virtual void setMapperCollorArray(void);
51  virtual void setShader(QString xmlfile);
52  virtual void setShaderFromString(QString xmlfile);
53  virtual void setOpacity(double opacity);
54  virtual void setSize(double size);
55  virtual void setColor(double red, double green, double blue);
56  virtual void setInterpolation(int interpolation);
57 
58  virtual void setParent(axlAbstractActor *parent);
59  virtual axlAbstractActor *parent(void);
60 
61  virtual axlMesh *toMesh(void);
62 
63  virtual int getState(void);
64  virtual void setMode(int state);
65  virtual dtkAbstractData *data(void) = 0;
66  virtual QString identifier(void);
67 
68 signals:
69  void stateChanged(dtkAbstractData * data, int mode);
70  void updated(void);
71 
72 public slots:
73  // bridge
74  // AM: do we need both refresh() and onUpdateGeometry ? They seem
75  // duplicated here.
76  // void refresh(void) { this->onUpdateGeometry(); }
77  virtual void onUpdateGeometry(void) = 0;
78  virtual void onUpdateProperty(void);
79 
80  // Used to update the structure of an object, eg. the control
81  // points of a spline geometry when their structure changes
82  // (eg. after refinement, ie. adding more control points)
83  // Note: by default nothing happens on this event. Re-implement
84  // this slot to add behaviour
85  virtual void onUpdateStructure(void) { }
86 
87  virtual void hide(void);
88  virtual void show(void);
89  virtual void update(void);
90 
91  virtual void onSamplingChanged(void);
92  virtual void onTubeFilterRadiusChanged(double radius);
93  virtual void onControlPointChanged(void);
94  virtual void onRemoved(void);
95  virtual void onModeChanged(int state);
96 
97  virtual void showCurrentPoint(double u, double v, dtkAbstractData *data);
98  virtual void moveCurrentPoint(double u, double v, dtkAbstractData *data);
99  virtual void hideCurrentPoint(double u, double v, dtkAbstractData *data);
100 
101  virtual void onSelectBoundaryEdge(int numEdge, int previous, int n);
102 
103 private:
104  axlAbstractActorPrivate *d;
105 };
106 
107 #endif // AXLABSTRACTACTOR_H
virtual void onUpdateStructure(void)
#define AXLCORE_EXPORT
Class axlMesh defines a piecewise-linear 3D object.
Definition: axlMesh.h:41