X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FVTKViewer%2FVTKViewer_Actor.h;h=5225cd6b4df8317ed9374f103d02b5a6fd4a374f;hb=e4b132cf6375e1f4bc1fef8ce9eb7aaf703e2ffc;hp=77e54f2450d71a4559fa1b2f03b4c6b93d6009ec;hpb=1c889394b028b786898a995d38c07c8f3d564837;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index 77e54f245..5225cd6b4 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -1,30 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers // File : SALOME_Actor.h // Author : Nicolas REJNERI -// Module : SALOME -// $Header$ -// + #ifndef VTKVIEVER_ACTOR_H #define VTKVIEVER_ACTOR_H @@ -34,6 +33,7 @@ #include #include +#include class vtkCell; class vtkPointPicker; @@ -51,6 +51,19 @@ class VTKViewer_TransformFilter; extern int VTKViewer_POINT_SIZE; extern int VTKViewer_LINE_WIDTH; +namespace VTKViewer +{ + namespace Representation + { + typedef int Type; + const Type Points = VTK_POINTS; + const Type Wireframe = VTK_WIREFRAME; + const Type Surface = VTK_SURFACE; + const Type Insideframe = Surface + 1; + const Type SurfaceWithEdges = Insideframe + 1; + } +} + #ifdef WIN32 #pragma warning ( disable:4251 ) #endif @@ -91,21 +104,36 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor virtual void SetColor(vtkFloatingPointType r, - vtkFloatingPointType g, - vtkFloatingPointType b); + vtkFloatingPointType g, + vtkFloatingPointType b); //! Get current color virtual void GetColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b); + vtkFloatingPointType& g, + vtkFloatingPointType& b); //! Change color virtual void SetColor(const vtkFloatingPointType theRGB[3]); + //! Change material + virtual + void + SetMaterial(std::vector theProps); + + //! Get current front material + virtual + vtkProperty* + GetFrontMaterial(); + + //! Get current back material + virtual + vtkProperty* + GetBackMaterial(); + //---------------------------------------------------------------------------- // For selection mapping purpose //! Maps VTK index of a node to corresponding object index @@ -223,12 +251,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Set ResolveCoincidentTopology parameters void SetPolygonOffsetParameters(vtkFloatingPointType factor, - vtkFloatingPointType units); + vtkFloatingPointType units); //! Get current ResolveCoincidentTopology parameters void GetPolygonOffsetParameters(vtkFloatingPointType& factor, - vtkFloatingPointType& units); + vtkFloatingPointType& units); virtual void @@ -287,6 +315,11 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor bool isHighlighted(); + //! Ask, if the VTKViewer_Actor is already preselected + virtual + bool + isPreselected(); + //! Set preselection mode virtual void @@ -301,6 +334,18 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor void SetPreviewProperty(vtkProperty* theProperty); + //---------------------------------------------------------------------------- + //! Setting for displaying quadratic elements + virtual void SetQuadraticArcMode(bool theFlag); + virtual bool GetQuadraticArcMode() const; + + virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); + virtual vtkFloatingPointType GetQuadraticArcAngle() const; + + //---------------------------------------------------------------------------- + //! Return pointer to the dataset, which used to calculation of the bounding box of the actor + virtual vtkDataSet* GetHighlightedDataSet(); + protected: //---------------------------------------------------------------------------- bool myIsResolveCoincidentTopology;