1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VISU_Actor.h
25 // Author : Laurent CORNABE with the help of Nicolas REJNERI
32 #include "SALOME_Actor.h"
46 #define VTKOCC_EXPORT __declspec (dllexport)
48 #define VTKOCC_EXPORT VTK_EXPORT
51 class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor {
53 vtkTypeMacro(VISU_Actor,SALOME_Actor);
54 void ShallowCopy(vtkProp *prop);
55 static VISU_Actor* New();
58 virtual void setIO(const Handle(SALOME_InteractiveObject)& theIO);
60 VISU::Prs3d_i* GetPrs3d(){ return myPrs3d;}
61 virtual void SetPrs3d(VISU::Prs3d_i* thePrs3d);
63 virtual VISU_PipeLine* GetPipeLine() { return myPipeLine;}
64 virtual void SetPipeLine(VISU_PipeLine* thePipeLine) throw(std::runtime_error&);
66 VISU_Actor* GetParent(){ return myParent;}
67 virtual void SetParent(VISU_Actor* theParent);
69 void highlight(Standard_Boolean highlight);
70 Standard_Boolean isHighlighted() { return true; };
72 void SetOpacity(float opa) {};
73 float GetOpacity() { return 0;};
75 virtual void SetShrinkable(bool theIsShrinkable);
76 virtual bool GetShrinkable() { return myIsShrinkable;}
78 virtual bool IsShrunk() { return myIsShrunk;}
79 virtual void SetShrink(float theFactor = 0.8);
80 virtual void UnShrink();
82 virtual void SetVisibility(int theMode);
83 virtual int GetVisibility();
85 virtual void SetProperty(vtkProperty* theProperty);
86 virtual vtkProperty* GetProperty();
88 virtual void SetLineWidth(float theLineWidth);
89 virtual float GetLineWidth();
92 std::string myFieldName;
98 VISU::Prs3d_i* myPrs3d;
99 VISU_PipeLine* myPipeLine;
100 vtkProperty* HighlightProperty;
105 #endif //VISU_ACTOR_H