Salome HOME
Task: "XAO format: fields on geometry".
[modules/geom.git] / src / OBJECT / GEOM_AISShape.hxx
index 128095ce1ad450f2c98d3702196f3de0fa0d67f2..3a61cfed304d47f0a0280bcc74605f194295ca2c 100644 (file)
@@ -29,6 +29,8 @@
 
 #include "GEOM_OBJECT_defs.hxx"
 
+#include <GEOM_Gen.hh>
+
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
@@ -60,6 +62,9 @@
 #include <AIS_DisplayMode.hxx>
 #include <Graphic3d_MaterialAspect.hxx>
 
+#include <QList>
+#include <QVariant>
+
 class PrsMgr_PresentationManager3d;
 class Prs3d_Presentation;
 class SALOME_InteractiveObject;
@@ -74,7 +79,8 @@ public:
       //WireFrame,       //!< the same as AIS_WireFrame
       //Shading,         //!< the same as AIS_Shaded
       ShadingWithEdges = AIS_Shaded+1, //!< shading with edges
-      TexturedShape = ShadingWithEdges+1 //!< the same as AIS_ExactHLR
+      TexturedShape = ShadingWithEdges+1, //!< the same as AIS_ExactHLR
+      CustomHighlight = TexturedShape+1
     } DispMode;
 
     //! Enumeration of top level display modes
@@ -125,8 +131,8 @@ public:
                                       const Standard_Integer aMode = 0) ;
 
         virtual  bool isShowVectors () { return myDisplayVectors; }
-               virtual  Standard_Boolean switchTopLevel();
-               virtual  Standard_Boolean toActivate();
+                virtual  Standard_Boolean switchTopLevel();
+                virtual  Standard_Boolean toActivate();
         
  // Type management
  //
@@ -140,7 +146,7 @@ public:
 
         void storeBoundaryColors();
 
-       static Quantity_Color topLevelColor();
+        static Quantity_Color topLevelColor();
   static void           setTopLevelColor(const Quantity_Color c);
 
   static TopLevelDispMode topLevelDisplayMode();
@@ -149,14 +155,36 @@ public:
   void setPrevDisplayMode(const Standard_Integer mode);
   Standard_Integer prevDisplayMode() const {return myPrevDisplayMode;}
 
+  // Field step information
+  void setFieldStepInfo( const GEOM::field_data_type theFieldDataType,
+                         const int theFieldDimension,
+                         const QList<QVariant>& theFieldStepData,
+                         const TCollection_AsciiString& theFieldStepName,
+                         const double theFieldStepRangeMin,
+                         const double theFieldStepRangeMax );
+  void getFieldStepInfo( GEOM::field_data_type& theFieldDataType,
+                         int& theFieldDimension,
+                         QList<QVariant>& theFieldStepData,
+                         TCollection_AsciiString& theFieldStepName,
+                         double& theFieldStepRangeMin,
+                         double& theFieldStepRangeMax ) const;
 
 protected: 
   void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
-                  const Handle(Prs3d_Presentation)& aPrs,
-                  const Standard_Integer aMode);
+                   const Handle(Prs3d_Presentation)& aPrs,
+                   const Standard_Integer aMode);
 
   void restoreBoundaryColors();
 
+  // Displaying the field data
+  void drawField( const Handle(Prs3d_Presentation)& thePrs,
+                  const bool theIsText = false,
+                  const bool theIsHighlight = false );
+
+  // Auxiliary method to compute a center of mass for the specified shape
+  static Standard_Boolean computeMassCenter( const TopoDS_Shape& theShape,
+                                             gp_Pnt& theCenter );
+
   Quantity_Color myShadingColor;
 
   Quantity_Color myFreeBoundaryColor;
@@ -173,6 +201,13 @@ private:
   Standard_Boolean         myTopLevel;
   Standard_Integer         myPrevDisplayMode;
 
+  GEOM::field_data_type    myFieldDataType;
+  int                      myFieldDimension;
+  QList<QVariant>          myFieldStepData;
+  TCollection_AsciiString  myFieldStepName;
+  double                   myFieldStepRangeMin;
+  double                   myFieldStepRangeMax;
+
   static TopLevelDispMode myTopLevelDm;
   static Quantity_Color   myTopLevelColor;
 };