Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/visu.git] / src / OBJECT / VISU_Actor.h
1 //  File      : VISU_Actor.h
2 //  Created   : Wed Feb 20 18:04:42 CET 2002
3 //  Author    : Laurent CORNABE with the help of Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : VISU
6 //  Copyright : PRINCIPIA RD
7 //  $Header$
8
9
10 #ifndef VISU_ACTOR_H
11 #define VISU_ACTOR_H
12
13 #include "SALOME_Actor.h"
14
15 #include <string>
16 // VTK Includes
17 #include <vtkActor.h>
18 #include <vtkPolyDataMapper.h>
19 #include <vtkPolyData.h>
20 #include <vtkPolyDataNormals.h>
21 #include <vtkProperty.h>
22
23 #ifdef _WIN_32
24 #define VTKOCC_EXPORT __declspec (dllexport)
25 #else
26 #define VTKOCC_EXPORT
27 #endif
28
29 #define VisuActorType_Mesh 1
30 #define VisuActorType_BoundingBox 2
31 #define VisuActorType_DeformedShape 3
32 #define VisuActorType_Vectors 4
33 #define VisuActorType_ScalarMap 5
34 #define VisuActorType_IsoSurfaces 6
35 #define VisuActorType_CutPlanes 7
36 #define VisuActorType_Plot2D 8
37 #define VisuActorType_StreamLines 9
38
39
40
41 namespace VISU { 
42   class Prs3d_i;
43 }
44
45 class VISU_ScalarBarActor;
46
47 class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor {
48   friend class VISU::Prs3d_i;
49  public:
50   vtkTypeMacro(VISU_Actor,SALOME_Actor);
51
52   Standard_Boolean IsHighlighting;
53
54   static VISU_Actor* New();
55
56   void setActor(vtkActor *Actor);
57
58   void ShallowCopy(vtkProp *prop);
59
60   void highlight(Standard_Boolean highlight);
61   Standard_Boolean isHighlighted() { return true; };
62
63   void  SetOpacity(float opa) {};
64   float GetOpacity() 
65     { return 0;};
66
67   Standard_Boolean HasScalarBar()
68     { return myHasScalarBar; }
69
70   void setScalarBar(VISU_ScalarBarActor* theBar);
71   VISU_ScalarBarActor* getScalarBar()
72     { return myScalarBar; }
73
74
75   void setIO(const Handle(SALOME_InteractiveObject)& io) 
76     { SALOME_Actor::setIO(io); myName = io->getName(); }
77     
78
79   VISU::Prs3d_i* getPrs3d() { return Presentation; }
80   void setPrs3d(VISU::Prs3d_i* thePrs) { Presentation = thePrs; }
81     
82   vtkDataSet *DataSource;
83   vtkActor*   EdgeDevice;
84
85   Standard_Boolean IsShrinkable;
86   Standard_Boolean IsShrunk;
87   int VisuActorType;
88   Standard_Boolean ResultAtNode;
89   int VectorComponent;
90   char FieldName[40];
91
92   Standard_Boolean IsDefined;
93
94   float VABounds[6];
95   void setVABounds(const float bounds[6]);
96   void getVABounds(float bounds[6]);
97
98   ~VISU_Actor();
99  protected:
100   VISU_Actor();
101   
102   Standard_Boolean myHasScalarBar;
103   VISU_ScalarBarActor* myScalarBar;
104   VISU::Prs3d_i* Presentation;
105
106  private:
107   vtkProperty* HighlightProperty;
108
109 };
110 #endif //VISU_ACTOR_H