1 // SMESH OBJECT : interactive object for SMESH 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 #ifndef VISU_GAUSS_PTS_DEVICE_ACTOR_H
30 #define VISU_GAUSS_PTS_DEVICE_ACTOR_H
32 #include "VTKViewer_GeometryFilter.h"
34 #include <vtkLODActor.h>
35 #include <vtkSmartPointer.h>
37 class VTKViewer_Transform;
38 class VTKViewer_TransformFilter;
39 class VTKViewer_PassThroughFilter;
41 class VISU_OpenGLPointSpriteMapper;
42 class VISU_GaussPointsPL;
45 //============================================================================
46 class VISU_GaussPtsDeviceActor: public vtkLODActor
49 vtkTypeMacro(VISU_GaussPtsDeviceActor,vtkLODActor);
52 VISU_GaussPtsDeviceActor*
57 Render(vtkRenderer *, vtkMapper *);
59 //----------------------------------------------------------------------------
61 AddToRender(vtkRenderer* theRenderer);
64 RemoveFromRender(vtkRenderer* theRenderer);
67 SetTransform(VTKViewer_Transform* theTransform);
69 //----------------------------------------------------------------------------
74 SetPipeLine(VISU_GaussPointsPL* thePipeLine) ;
77 ShallowCopyPL(VISU_GaussPointsPL* thePipeLine);
79 VISU_OpenGLPointSpriteMapper*
87 //----------------------------------------------------------------------------
88 vtkSmartPointer<VISU_GaussPointsPL> myPipeLine;
89 vtkSmartPointer<VISU_OpenGLPointSpriteMapper> myMapper;
90 vtkSmartPointer<VTKViewer_GeometryFilter> myGeomFilter;
91 vtkSmartPointer<VTKViewer_TransformFilter> myTransformFilter;
93 typedef vtkSmartPointer<VTKViewer_PassThroughFilter> PPassThroughFilter;
94 std::vector<PPassThroughFilter> myPassFilter;
96 VISU_GaussPtsDeviceActor();
97 ~VISU_GaussPtsDeviceActor();
100 VISU_GaussPtsDeviceActor(const VISU_GaussPtsDeviceActor&); // Not implemented
101 void operator=(const VISU_GaussPtsDeviceActor&); // Not implemented
105 //============================================================================
108 class vtkAppendPolyData;
109 class vtkPolyDataMapper;
111 #include <vtkLODActor.h>
113 class VISU_CursorPyramid : public vtkLODActor
116 vtkTypeMacro(VISU_CursorPyramid, vtkObject);
124 Render(vtkRenderer *, vtkMapper *);
127 AddToRender(vtkRenderer* theRenderer);
130 RemoveFromRender(vtkRenderer* theRenderer);
133 Init(vtkFloatingPointType theHeight,
134 vtkFloatingPointType theCursorSize,
135 vtkFloatingPointType theRadius,
136 vtkFloatingPointType theMagnification,
137 vtkFloatingPointType theClamp,
138 vtkFloatingPointType thePos[3],
139 vtkFloatingPointType theColor[3]);
141 void SetPreferences(vtkFloatingPointType theHeight,
142 vtkFloatingPointType theCursorSize);
145 VISU_CursorPyramid();
148 Init(vtkFloatingPointType theHeight,
149 vtkFloatingPointType theRadius);
152 vtkSmartPointer<vtkConeSource> mySources[6];
153 vtkSmartPointer<vtkAppendPolyData> myAppendFilter;
154 vtkSmartPointer<vtkPolyDataMapper> myMapper;
156 vtkFloatingPointType myHeight;
157 vtkFloatingPointType myCursorSize;
158 vtkFloatingPointType myRadius;
159 vtkFloatingPointType myMagnification;
160 vtkFloatingPointType myClamp;
163 VISU_CursorPyramid(const VISU_CursorPyramid&); // Not implemented
164 void operator=(const VISU_CursorPyramid&); // Not implemented
168 //==================================================================
169 // class VISU_FramedTextActor
171 #include <vtkActor2D.h>
177 class vtkPolyDataMapper2D;
180 class vtkTextProperty;
183 class VISU_FramedTextActor : public vtkActor2D
187 vtkTypeRevisionMacro(VISU_FramedTextActor,vtkActor2D);
188 static VISU_FramedTextActor *New();
190 virtual int RenderOpaqueGeometry(vtkViewport* viewport);
191 virtual int RenderTranslucentGeometry(vtkViewport*) { return 0; };
192 virtual int RenderOverlay(vtkViewport* viewport);
193 virtual void ReleaseGraphicsResources(vtkWindow *);
194 virtual void SetVisibility (int );
195 virtual int GetVisibility() ;
196 virtual void SetPickable (int ) ;
197 virtual int GetPickable();
200 void SetText(const char* theText);
203 void SetModePosition(const int theMode);
204 int GetModePosition()const;
206 void SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]);
207 const vtkFloatingPointType* GetWorldPoint()const;
209 void SetDistance(const vtkFloatingPointType theDistance);
210 vtkFloatingPointType GetDistance()const;
212 void SetTransparency(const vtkFloatingPointType theTransparency);
213 vtkFloatingPointType GetTransparency()const;
216 VISU_FramedTextActor();
217 ~VISU_FramedTextActor();
221 vtkPolyDataMapper2D *myBarMapper;
222 vtkActor2D *myBarActor;
224 vtkTextProperty *myTextProperty;
225 vtkTextMapper *myTextMapper;
226 vtkActor2D *myTextActor;
228 vtkTimeStamp myBuildTime;
231 vtkFloatingPointType myWorldPoint[4];
232 vtkFloatingPointType myDistance;
233 vtkFloatingPointType myTransparency;
236 VISU_FramedTextActor(const VISU_FramedTextActor&); // Not implemented.
237 void operator=(const VISU_FramedTextActor&); // Not implemented.
240 #endif //VISU_GAUSS_PTS_DEVICE_ACTOR_H