X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_ActorDef.h;h=3488f4401ed620c8b3dcf0724bfe31cd3cd6675b;hb=8d297d6698f361d4f2dde723050bcfbaea050920;hp=b346e68b467d50648abb1cbdf18b952d137e12b2;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index b346e68b4..3488f4401 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -6,7 +6,7 @@ // 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -65,6 +65,7 @@ class vtkLookupTable; class vtkPlane; class vtkImplicitBoolean; class vtkTimeStamp; +class vtkPlaneCollection; class SMESH_DeviceActor; class SMESH_NodeLabelActor; @@ -94,51 +95,58 @@ class SMESH_ActorDef : public SMESH_Actor virtual void AddToRender(vtkRenderer* theRenderer); virtual void RemoveFromRender(vtkRenderer* theRenderer); + virtual void EnableSelection( bool enable ); virtual bool hasHighlight() { return true; } virtual void highlight(bool theHighlight); virtual void SetPreSelected(bool thePreselect = false); virtual bool IsInfinitive(); - virtual void SetOpacity(vtkFloatingPointType theValue); - virtual vtkFloatingPointType GetOpacity(); + virtual void SetOpacity(double theValue); + virtual double GetOpacity(); - virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b, int delta ); - virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b, int& delta); + virtual void SetSufaceColor(double r,double g,double b, int delta ); + virtual void GetSufaceColor(double& r,double& g,double& b, int& delta); - virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void SetVolumeColor(double r,double g,double b, int delta ); + virtual void GetVolumeColor(double& r,double& g,double& b, int& delta); - virtual void SetOutlineColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetOutlineColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void SetEdgeColor(double r,double g,double b); + virtual void GetEdgeColor(double& r,double& g,double& b); + virtual void SetOutlineColor(double r,double g,double b); + virtual void GetOutlineColor(double& r,double& g,double& b); - virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void Get0DColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void SetNodeColor(double r,double g,double b); + virtual void GetNodeColor(double& r,double& g,double& b); - virtual void SetBallColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetBallColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void Set0DColor(double r,double g,double b); + virtual void Get0DColor(double& r,double& g,double& b); - virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void SetBallColor(double r,double g,double b); + virtual void GetBallColor(double& r,double& g,double& b); - virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); - virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); + virtual void UpdateSelectionProps(); - virtual vtkFloatingPointType GetLineWidth(); - virtual void SetLineWidth(vtkFloatingPointType theVal); + virtual double GetLineWidth(); + virtual void SetLineWidth(double theVal); - virtual void Set0DSize(vtkFloatingPointType size); - virtual vtkFloatingPointType Get0DSize(); + virtual double GetOutlineWidth(); + virtual void SetOutlineWidth(double theVal); - virtual void SetBallSize(vtkFloatingPointType size); - virtual vtkFloatingPointType GetBallSize(); + virtual void Set0DSize(double size); + virtual double Get0DSize(); + + virtual void SetBallSize(double size); + virtual double GetBallSize(); + + virtual void SetBallScale(double size); + virtual double GetBallScale(); virtual int GetNodeObjId(int theVtkID); - virtual vtkFloatingPointType* GetNodeCoord(int theObjID); + virtual double* GetNodeCoord(int theObjID); + virtual int GetNodeVtkId(int theObjID); virtual int GetElemObjId(int theVtkID); virtual vtkCell* GetElemCell(int theObjID); @@ -156,15 +164,15 @@ class SMESH_ActorDef : public SMESH_Actor virtual void SetPointRepresentation(bool theIsPointsVisible); virtual bool GetPointRepresentation(); - virtual vtkFloatingPointType* GetBounds(); + virtual double* GetBounds(); virtual void SetTransform(VTKViewer_Transform* theTransform); virtual vtkUnstructuredGrid* GetUnstructuredGrid(); virtual vtkDataSet* GetInput(); virtual vtkMapper* GetMapper(); - virtual vtkFloatingPointType GetShrinkFactor(); - virtual void SetShrinkFactor(vtkFloatingPointType theValue); + virtual double GetShrinkFactor(); + virtual void SetShrinkFactor(double theValue); virtual bool IsShrunkable() { return myIsShrinkable;} virtual bool IsShrunk() { return myIsShrunk;} @@ -174,22 +182,31 @@ class SMESH_ActorDef : public SMESH_Actor virtual void SetPointsLabeled(bool theIsPointsLabeled); virtual bool GetPointsLabeled(); + virtual void SetPointsFontProperties( SMESH::LabelFont family, int size, + bool bold, bool italic, bool shadow, + double r, double g, double b ); + virtual void SetCellsFontProperties( SMESH::LabelFont family, int size, + bool bold, bool italic, bool shadow, + double r, double g, double b ); + virtual void SetCellsLabeled(bool theIsCellsLabeled); virtual bool GetCellsLabeled(); virtual void SetFacesOriented(bool theIsFacesOriented); virtual bool GetFacesOriented(); - virtual void SetFacesOrientationColor(vtkFloatingPointType theColor[3]); - virtual void GetFacesOrientationColor(vtkFloatingPointType theColor[3]); + virtual void SetFacesOrientationColor(double r,double g,double b); + virtual void GetFacesOrientationColor(double& r,double& g,double& b); - virtual void SetFacesOrientationScale(vtkFloatingPointType theScale); - virtual vtkFloatingPointType GetFacesOrientationScale(); + virtual void SetFacesOrientationScale(double theScale); + virtual double GetFacesOrientationScale(); virtual void SetFacesOrientation3DVectors(bool theState); virtual bool GetFacesOrientation3DVectors(); virtual void SetControlMode(eControl theMode); + virtual void SetControl(SMESH::Controls::FunctorPtr theFunctor); + virtual int GetNumberControlEntities(); virtual eControl GetControlMode(){ return myControlMode;} virtual SMESH::Controls::FunctorPtr GetFunctor() { return myFunctor; } @@ -199,6 +216,8 @@ class SMESH_ActorDef : public SMESH_Actor virtual vtkIdType GetNumberOfClippingPlanes(); virtual vtkPlane* GetClippingPlane(vtkIdType theID); virtual vtkIdType AddClippingPlane(vtkPlane* thePlane); + virtual void AddOpenGLClippingPlane(vtkPlane* thePlane); + virtual void SetOpenGLClippingPlane(); virtual TVisualObjPtr GetObject() { return myVisualObj;} @@ -233,6 +252,8 @@ class SMESH_ActorDef : public SMESH_Actor vtkProperty* mySurfaceProp; vtkProperty* myBackSurfaceProp; + vtkProperty* myNormalVProp; + vtkProperty* myReversedVProp; vtkProperty* myEdgeProp; vtkProperty* myNodeProp; @@ -243,12 +264,13 @@ class SMESH_ActorDef : public SMESH_Actor vtkProperty* myHighlightProp; vtkProperty* myOutLineProp; vtkProperty* myPreselectProp; - + SMESH_DeviceActor* myHighlitableActor; eControl myControlMode; SMESH::Controls::FunctorPtr myFunctor; vtkProperty* my2DExtProp; + vtkProperty* my3DExtProp; SMESH_CellLabelActor* my2DActor; SMESH_DeviceActor* my2DExtActor; SMESH_CellLabelActor* my3DActor; @@ -271,8 +293,8 @@ class SMESH_ActorDef : public SMESH_Actor SMESH_DeviceActor* my0DExtActor; unsigned int myEntityMode; - unsigned int myEntityState; unsigned int myEntityModeCache; + int myRepresentationCache; bool myIsEntityModeCache; bool myIsPointsVisible; @@ -280,6 +302,7 @@ class SMESH_ActorDef : public SMESH_Actor bool myIsShrunk; vtkImplicitBoolean* myImplicitBoolean; + vtkPlaneCollection* myPlaneCollection; typedef TVTKSmartPtr TPlanePtr; typedef std::vector TCippingPlaneCont; TCippingPlaneCont myCippingPlaneCont; @@ -292,6 +315,7 @@ class SMESH_ActorDef : public SMESH_Actor bool myIsFacesOriented; int myDeltaBrightness; + int myDeltaVBrightness; VTK::MarkerTexture myMarkerTexture;