X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_ActorDef.h;h=0d3051c54f032a5590c4eee4dbe8899e6a3d3ebe;hp=d412ac68a31016569f9777df65cd02b1330d3109;hb=refs%2Ftags%2FV9_7_0b1;hpb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index d412ac68a..0d3051c54 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 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; @@ -82,7 +83,7 @@ class SMESH_ActorDef : public SMESH_Actor friend class SMESH_Actor; public: - vtkTypeMacro(SMESH_ActorDef,SMESH_Actor); + vtkTypeMacro(SMESH_ActorDef,SMESH_Actor) virtual void Delete(); @@ -94,6 +95,7 @@ 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); @@ -125,11 +127,7 @@ class SMESH_ActorDef : public SMESH_Actor virtual void SetBallColor(double r,double g,double b); virtual void GetBallColor(double& r,double& g,double& b); - virtual void SetHighlightColor(double r,double g,double b); - virtual void GetHighlightColor(double& r,double& g,double& b); - - virtual void SetPreHighlightColor(double r,double g,double b); - virtual void GetPreHighlightColor(double& r,double& g,double& b); + virtual void UpdateSelectionProps(); virtual double GetLineWidth(); virtual void SetLineWidth(double theVal); @@ -143,13 +141,17 @@ class SMESH_ActorDef : public SMESH_Actor virtual void SetBallSize(double size); virtual double GetBallSize(); - virtual int GetNodeObjId(int theVtkID); - virtual double* GetNodeCoord(int theObjID); + virtual void SetBallScale(double size); + virtual double GetBallScale(); + + virtual vtkIdType GetNodeObjId(vtkIdType theVtkID); + virtual double* GetNodeCoord(vtkIdType theObjID); + virtual vtkIdType GetNodeVtkId(vtkIdType theObjID); - virtual int GetElemObjId(int theVtkID); - virtual vtkCell* GetElemCell(int theObjID); + virtual vtkIdType GetElemObjId(vtkIdType theVtkID); + virtual vtkCell* GetElemCell(vtkIdType theObjID); - virtual int GetObjDimension( const int theObjId ); + virtual int GetObjDimension( const vtkIdType theObjId ) override; virtual void SetVisibility(int theMode); void SetVisibility(int theMode, bool theIsUpdateRepersentation); @@ -203,6 +205,8 @@ class SMESH_ActorDef : public SMESH_Actor virtual bool GetFacesOrientation3DVectors(); virtual void SetControlMode(eControl theMode); + virtual void SetControl(SMESH::Controls::FunctorPtr theFunctor); + virtual smIdType GetNumberControlEntities(); virtual eControl GetControlMode(){ return myControlMode;} virtual SMESH::Controls::FunctorPtr GetFunctor() { return myFunctor; } @@ -212,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 +239,8 @@ class SMESH_ActorDef : public SMESH_Actor virtual void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale ); virtual void SetMarkerTexture( int, VTK::MarkerTexture ); + virtual void UpdateFilter(); + protected: void SetControlMode(eControl theMode, bool theCheckEntityMode); void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed); @@ -259,9 +267,6 @@ class SMESH_ActorDef : public SMESH_Actor vtkProperty* myOutLineProp; vtkProperty* myPreselectProp; - vtkProperty* myBallHighlightProp; - vtkProperty* myBallPreselectProp; - SMESH_DeviceActor* myHighlitableActor; eControl myControlMode; @@ -290,8 +295,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; @@ -299,6 +304,7 @@ class SMESH_ActorDef : public SMESH_Actor bool myIsShrunk; vtkImplicitBoolean* myImplicitBoolean; + vtkPlaneCollection* myPlaneCollection; typedef TVTKSmartPtr TPlanePtr; typedef std::vector TCippingPlaneCont; TCippingPlaneCont myCippingPlaneCont;