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_VTKTrihedron.h
25 // Author : Sergey LITONIN
29 #ifndef GEOM_VTKTrihedron_H
30 #define GEOM_VTKTrihedron_H
32 #include <Geom_Axis2Placement.hxx>
33 #include "SALOME_Actor.h"
34 #include "VTKViewer_Trihedron.h"
36 class vtkActorCollection;
38 class vtkPolyDataMapper;
41 Class : GEOM_VTKTrihedron
42 Description : Class for displaying trihedron of local CS in VTK viewer.
43 Placement of trihedron is chahged with SetPlacement() method
46 class GEOM_VTKTrihedron : public SALOME_Actor
51 GEOM_VTKTrihedron( const GEOM_VTKTrihedron& );
52 virtual ~GEOM_VTKTrihedron();
55 vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
56 static GEOM_VTKTrihedron* New();
58 virtual float GetSize() { return mySize;}
60 virtual void SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
61 virtual void VisibilityOff() { SetVisibility( VTKViewer_Trihedron::eOff ); }
62 virtual void VisibilityOn() { SetVisibility( VTKViewer_Trihedron::eOn ); }
64 virtual void AddToRender( vtkRenderer* theRenderer );
65 virtual void RemoveFromRender( vtkRenderer* theRenderer );
67 virtual int GetVisibleActorCount( vtkRenderer* theRenderer );
69 void SetPlacement( const Handle(Geom_Axis2Placement)& );
71 virtual vtkMapper* GetMapper();
73 virtual void Render(vtkRenderer *, vtkMapper *);
74 virtual bool IsSetCamera() const;
75 virtual bool IsResizable() const;
76 virtual void SetSize( float );
77 virtual void SetCamera( vtkCamera* );
79 void SetColor( float r, float g, float b );
80 void GetColor( float& r, float& g, float& b );
82 virtual bool hasHighlight() { return false; }
85 vtkActorCollection* myPresent;
86 VTKViewer_Axis* myAxis[3];
87 vtkPolyDataMapper* myMapper;
90 gp_Dir myDirX, myDirY, myDirZ;