2 // Created : Wed Feb 20 17:24:59 2002
3 // Author : Christophe ATTANASIO
6 // Copyright : Open CASCADE 2002
13 #include "SALOME_Actor.h"
16 #include <vtkMapper.h>
17 #include <vtkProperty.h>
18 #include <vtkMatrix4x4.h>
19 #include <vtkCamera.h>
22 #include <TopoDS_Shape.hxx>
29 #define VTKOCC_EXPORT __declspec (dllexport)
33 class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor {
37 vtkTypeMacro(GEOM_Actor,SALOME_Actor);
39 static GEOM_Actor* New();
42 // This causes the actor to be rendered. It, in turn, will render the actor's
43 // property and then mapper.
44 virtual void Render(vtkRenderer *, vtkMapper *);
47 // Release any graphics resources that are being consumed by this actor.
48 // The parameter window could be used to determine which graphic
49 // resources to release.
50 void ReleaseGraphicsResources(vtkWindow *);
52 const TopoDS_Shape& getTopo();
53 void setInputShape(const TopoDS_Shape& ashape,double adef1,int imode);
55 double getDeflection();
56 void setDeflection(double adefl);
63 void setDisplayMode(int);
66 void highlight(Standard_Boolean highlight);
69 void ShallowCopy(vtkProp *prop);
72 void SetHighlightProperty(vtkProperty* Prop);
73 void SetWireframeProperty(vtkProperty* Prop);
74 void SetShadingProperty(vtkProperty* Prop);
77 void SetOpacity(float opa);
81 void SetColor(float r,float g,float b);
82 void GetColor(float& r,float& g,float& b);
88 GEOM_Actor(const GEOM_Actor&) {};
89 void operator=(const GEOM_Actor&) {};
91 void CreateWireframeMapper();
92 void CreateShadingMapper();
93 void CreateMapper(int theMode);
94 void GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result);
101 TopoDS_Shape myShape;
104 vtkMapper* ShadingMapper;
105 vtkMapper* WireframeMapper;
107 vtkProperty* ShadingProperty;
108 vtkProperty* WireframeProperty;
109 vtkProperty* HighlightProperty;
114 #endif //GEOM_ACTOR_H