00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SMESH_ACTOR_H
00029 #define SMESH_ACTOR_H
00030
00031 #include <SALOMEconfig.h>
00032 #include <SALOME_Actor.h>
00033 #include "SMESH_Object.h"
00034
00035 #include <vtkCommand.h>
00036
00037 class vtkUnstructuredGrid;
00038
00039 class SMESH_ScalarBarActor;
00040
00041 class vtkPlane;
00042 class vtkImplicitBoolean;
00043
00044 #ifndef DISABLE_PLOT2DVIEWER
00045 class SPlot2d_Histogram;
00046 #endif
00047
00048 namespace SMESH
00049 {
00050 const vtkIdType DeleteActorEvent = vtkCommand::UserEvent + 100;
00051 }
00052
00053 class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
00054 {
00055 static SMESH_Actor* New() { return NULL;}
00056
00057 public:
00058 vtkTypeMacro(SMESH_Actor,SALOME_Actor);
00059 static SMESH_Actor* New(TVisualObjPtr theVisualObj,
00060 const char* theEntry,
00061 const char* theName,
00062 int theIsClear);
00063
00064 virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00065 virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00066
00067 virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00068 virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00069
00070 virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00071 virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00072
00073 virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00074 virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00075
00076 virtual void Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00077 virtual void Get0DColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00078
00079 virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00080 virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00081
00082 virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
00083 virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
00084
00085 virtual vtkFloatingPointType GetLineWidth() = 0;
00086 virtual void SetLineWidth(vtkFloatingPointType theVal) = 0;
00087
00088 virtual void Set0DSize(vtkFloatingPointType size) = 0;
00089 virtual vtkFloatingPointType Get0DSize() = 0;
00090
00091 enum EReperesent { ePoint, eEdge, eSurface};
00092
00093 enum EEntityMode { e0DElements = 0x01, eEdges = 0x02, eFaces = 0x04, eVolumes = 0x08, eAllEntity = 0x0f};
00094
00095 enum EQuadratic2DRepresentation { eLines = 0x01, eArcs = 0x02 };
00096
00097 virtual void SetEntityMode(unsigned int theMode) = 0;
00098 virtual unsigned int GetEntityMode() const = 0;
00099
00100 virtual void SetQuadratic2DRepresentation(EQuadratic2DRepresentation) = 0;
00101 virtual EQuadratic2DRepresentation GetQuadratic2DRepresentation() = 0;
00102
00103 virtual void SetPointRepresentation(bool theIsPointsVisible) = 0;
00104 virtual bool GetPointRepresentation() = 0;
00105
00106 virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
00107
00108 virtual void SetShrinkFactor(vtkFloatingPointType theValue) = 0;
00109
00110 virtual void SetPointsLabeled(bool theIsPointsLabeled) = 0;
00111 virtual bool GetPointsLabeled() = 0;
00112
00113 virtual void SetCellsLabeled(bool theIsCellsLabeled) = 0;
00114 virtual bool GetCellsLabeled() = 0;
00115
00116 virtual void SetFacesOriented(bool theIsFacesOriented) = 0;
00117 virtual bool GetFacesOriented() = 0;
00118
00119 virtual void SetFacesOrientationColor(vtkFloatingPointType theColor[3]) = 0;
00120 virtual void GetFacesOrientationColor(vtkFloatingPointType theColor[3]) = 0;
00121
00122 virtual void SetFacesOrientationScale(vtkFloatingPointType theScale) = 0;
00123 virtual vtkFloatingPointType GetFacesOrientationScale() = 0;
00124
00125 virtual void SetFacesOrientation3DVectors(bool theState) = 0;
00126 virtual bool GetFacesOrientation3DVectors() = 0;
00127
00128 enum eControl{eNone, eLength, eLength2D, eFreeBorders, eFreeEdges, eFreeNodes,
00129 eFreeFaces, eMultiConnection, eArea, eTaper, eAspectRatio,
00130 eMinimumAngle, eWarping, eSkew, eAspectRatio3D, eMultiConnection2D, eVolume3D,
00131 eMaxElementLength2D, eMaxElementLength3D, eBareBorderFace, eBareBorderVolume,
00132 eOverConstrainedFace, eOverConstrainedVolume};
00133 virtual void SetControlMode(eControl theMode) = 0;
00134 virtual eControl GetControlMode() = 0;
00135 virtual SMESH::Controls::FunctorPtr GetFunctor() = 0;
00136
00137 virtual SMESH_ScalarBarActor* GetScalarBarActor() = 0;
00138
00139 virtual void RemoveAllClippingPlanes() = 0;
00140 virtual vtkIdType GetNumberOfClippingPlanes() = 0;
00141 virtual vtkPlane* GetClippingPlane(vtkIdType theID) = 0;
00142 virtual vtkIdType AddClippingPlane(vtkPlane* thePlane) = 0;
00143
00144 virtual TVisualObjPtr GetObject() = 0;
00145
00146 virtual void SetControlsPrecision( const long ) = 0;
00147 virtual long GetControlsPrecision() const = 0;
00148
00149 virtual void UpdateScalarBar() = 0;
00150 virtual void UpdateDistribution() = 0;
00151
00152 #ifndef DISABLE_PLOT2DVIEWER
00153 virtual SPlot2d_Histogram* GetPlot2Histogram() = 0;
00154 virtual SPlot2d_Histogram* UpdatePlot2Histogram() = 0;
00155 #endif
00156 };
00157
00158
00159 #endif //SMESH_ACTOR_H