1 // GEOM OBJECT : interactive object for Geometry entities visualization
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 : GEOM_Actor.h
25 // Author : Christophe ATTANASIO
32 #include "SALOME_Actor.h"
35 #include <TopoDS_Shape.hxx>
42 #define VTKOCC_EXPORT __declspec (dllexport)
46 class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor {
50 vtkTypeMacro(GEOM_Actor,SALOME_Actor);
52 static GEOM_Actor* New();
55 // This causes the actor to be rendered. It, in turn, will render the actor's
56 // property and then mapper.
57 virtual void Render(vtkRenderer *, vtkMapper *);
60 // Release any graphics resources that are being consumed by this actor.
61 // The parameter window could be used to determine which graphic
62 // resources to release.
63 void ReleaseGraphicsResources(vtkWindow *);
65 const TopoDS_Shape& getTopo();
66 void setInputShape(const TopoDS_Shape& ashape,double adef1,int imode);
68 double getDeflection();
69 void setDeflection(double adefl);
76 void setDisplayMode(int);
79 void highlight(Standard_Boolean highlight);
82 void ShallowCopy(vtkProp *prop);
85 void SetHighlightProperty(vtkProperty* Prop);
86 void SetWireframeProperty(vtkProperty* Prop);
87 void SetShadingProperty(vtkProperty* Prop);
90 void SetOpacity(float opa);
94 void SetColor(float r,float g,float b);
95 void GetColor(float& r,float& g,float& b);
101 GEOM_Actor(const GEOM_Actor&) {};
102 void operator=(const GEOM_Actor&) {};
104 void CreateWireframeMapper();
105 void CreateShadingMapper();
106 void CreateMapper(int theMode);
107 void GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result);
114 TopoDS_Shape myShape;
117 vtkMapper* ShadingMapper;
118 vtkMapper* WireframeMapper;
120 vtkProperty* ShadingProperty;
121 vtkProperty* WireframeProperty;
122 vtkProperty* HighlightProperty;
125 #endif //GEOM_ACTOR_H