Salome HOME
PR: synchro V7_main tag mergefrom_V6_main_06Mar13
[modules/smesh.git] / src / OBJECT / SMESH_ActorDef.h
index 6eec6aa2acb52d46ea3d2ed78161b850344cb63e..ee715548c2e45f036177d2004deba8bc6c219044 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  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
@@ -84,6 +84,8 @@ class SMESH_ActorDef : public SMESH_Actor
  public:
   vtkTypeMacro(SMESH_ActorDef,SMESH_Actor);
   
+  virtual void Delete();
+
   virtual void ReleaseGraphicsResources(vtkWindow *renWin);
   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
   virtual int RenderTranslucentGeometry(vtkViewport *viewport);
@@ -98,39 +100,51 @@ class SMESH_ActorDef : public SMESH_Actor
 
   virtual bool IsInfinitive();  
 
-  virtual void SetOpacity(vtkFloatingPointType theValue);
-  virtual vtkFloatingPointType GetOpacity();
+  virtual void SetOpacity(double theValue);
+  virtual double GetOpacity();
+
+  virtual void SetSufaceColor(double r,double g,double b, int delta );
+  virtual void GetSufaceColor(double& r,double& g,double& b, int& delta);
 
-  virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b, int delta );
-  virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b, int& delta);
+  virtual void SetVolumeColor(double r,double g,double b, int delta );
+  virtual void GetVolumeColor(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 SetEdgeColor(double r,double g,double b);
+  virtual void GetEdgeColor(double& r,double& g,double& b);
 
-  virtual void SetOutlineColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
-  virtual void GetOutlineColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& 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 SetNodeColor(double r,double g,double b);
+  virtual void GetNodeColor(double& r,double& g,double& b);
 
-  virtual void Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
-  virtual void Get0DColor(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 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 vtkFloatingPointType GetLineWidth();
-  virtual void SetLineWidth(vtkFloatingPointType theVal);
+  virtual double GetLineWidth();
+  virtual void SetLineWidth(double theVal);
+
+  virtual double GetOutlineWidth();
+  virtual void SetOutlineWidth(double theVal);
 
-  virtual void Set0DSize(vtkFloatingPointType size);
-  virtual vtkFloatingPointType Get0DSize();
+  virtual void Set0DSize(double size);
+  virtual double Get0DSize();
+
+  virtual void SetBallSize(double size);
+  virtual double GetBallSize();
 
   virtual int GetNodeObjId(int theVtkID);
-  virtual vtkFloatingPointType* GetNodeCoord(int theObjID);
+  virtual double* GetNodeCoord(int theObjID);
 
   virtual int GetElemObjId(int theVtkID);
   virtual vtkCell* GetElemCell(int theObjID);
@@ -148,15 +162,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;}
@@ -166,17 +180,24 @@ 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();
@@ -225,6 +246,8 @@ class SMESH_ActorDef : public SMESH_Actor
 
   vtkProperty* mySurfaceProp;
   vtkProperty* myBackSurfaceProp;
+  vtkProperty* myNormalVProp;
+  vtkProperty* myReversedVProp;
   vtkProperty* myEdgeProp;
   vtkProperty* myNodeProp;
 
@@ -235,12 +258,16 @@ class SMESH_ActorDef : public SMESH_Actor
   vtkProperty* myHighlightProp;
   vtkProperty* myOutLineProp;
   vtkProperty* myPreselectProp;
+
+  vtkProperty* myBallHighlightProp;
+  vtkProperty* myBallPreselectProp;
           
   SMESH_DeviceActor* myHighlitableActor;
 
   eControl myControlMode;
   SMESH::Controls::FunctorPtr myFunctor;
   vtkProperty* my2DExtProp;
+  vtkProperty* my3DExtProp;
   SMESH_CellLabelActor* my2DActor;
   SMESH_DeviceActor* my2DExtActor;
   SMESH_CellLabelActor* my3DActor;
@@ -257,11 +284,15 @@ class SMESH_ActorDef : public SMESH_Actor
 
   vtkProperty* my0DProp;
   SMESH_CellLabelActor* my0DActor;
+  vtkProperty* myBallProp;
+  SMESH_CellLabelActor* myBallActor;
   vtkProperty* my0DExtProp;
   SMESH_DeviceActor* my0DExtActor;
 
   unsigned int myEntityMode;
   unsigned int myEntityState;
+  unsigned int myEntityModeCache;
+  bool myIsEntityModeCache;
   bool myIsPointsVisible;
 
   bool myIsShrinkable;
@@ -280,6 +311,7 @@ class SMESH_ActorDef : public SMESH_Actor
   bool myIsFacesOriented;
   
   int myDeltaBrightness;
+  int myDeltaVBrightness;
 
   VTK::MarkerTexture myMarkerTexture;