Salome HOME
lot 3 - coloring of section in OCC view see also refs #1838
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Polyline.h
index 06f2ec44b88072882f1f53fa736c8cdab7c00355..be993fe63c9c2b4e6150b8a0a157df4801397312 100644 (file)
@@ -21,6 +21,9 @@
 
 #include <AIS_Shape.hxx>
 #include <QList>
+#include <NCollection_IndexedDataMap.hxx>
+#include <Quantity_Color.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
 
 class TopoDS_Shape;
 class TopoDS_Edge;
@@ -39,8 +42,13 @@ public:
     ( const TopoDS_Shape& theShape, int theType, int theSize );
   static void update( const QList<Handle(AIS_InteractiveObject)>&, int theType, int theSize );
 
+  NCollection_IndexedDataMap<TopoDS_Shape, Quantity_Color, TopTools_ShapeMapHasher> myShapeToColor;
+
+  bool GetColorOfSubShape(const TopoDS_Shape& SubShape, Quantity_Color& outColor);
+
 public:
   DEFINE_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape);
+
 };
 
 class HYDROGUI_Arrow : public AIS_Shape
@@ -48,7 +56,7 @@ class HYDROGUI_Arrow : public AIS_Shape
 public:
   enum Type { None, Triangle, Cone };
 
-  HYDROGUI_Arrow( const TopoDS_Edge& edge );
+  HYDROGUI_Arrow( const TopoDS_Edge& edge, const Handle(HYDROGUI_Polyline)& polyline );
   virtual ~HYDROGUI_Arrow();
 
   virtual void Compute( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
@@ -63,12 +71,15 @@ public:
   int  GetSize() const;
   void SetSize( int );
 
+  const Handle(HYDROGUI_Polyline)& getParentPolyline() const;
+
 public:
   DEFINE_STANDARD_RTTIEXT(HYDROGUI_Arrow, AIS_Shape);
 
 private:
   Type myType;
   int  mySize;
+  Handle(HYDROGUI_Polyline) myParentPoly;
 };
 
 #endif