0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / OpenGl / OpenGl_Structure.hxx
index 222bfcb..efac3ac 100644 (file)
@@ -31,7 +31,6 @@
 #include <OpenGl_Workspace.hxx>
 
 #include <NCollection_List.hxx>
-#include <InterfaceGraphic_Graphic3d.hxx>
 
 class OpenGl_Structure;
 class OpenGl_GraphicDriver;
@@ -79,15 +78,15 @@ public:
   Standard_EXPORT virtual void Disconnect (Graphic3d_CStructure& theStructure) Standard_OVERRIDE;
 
   //! Synchronize structure transformation
-  Standard_EXPORT virtual void UpdateTransformation() Standard_OVERRIDE;
+  Standard_EXPORT virtual void SetTransformation (const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
 
-  //! Highlight entire structure with color
-  Standard_EXPORT virtual void HighlightWithColor (const Graphic3d_Vec3&  theColor,
-                                                   const Standard_Boolean theToCreate) Standard_OVERRIDE;
+  //! Highlights structure according to the given style and updates corresponding class fields
+  //! (highlight status and style)
+  Standard_EXPORT virtual void GraphicHighlight (const Handle(Graphic3d_HighlightStyle)& theStyle,
+                                                 const Handle(Graphic3d_Structure)&      theStruct) Standard_OVERRIDE;
 
-  //! Highlight structure using boundary box
-  Standard_EXPORT virtual void HighlightWithBndBox (const Handle(Graphic3d_Structure)& theStruct,
-                                                    const Standard_Boolean             theToCreate) Standard_OVERRIDE;
+  //! Unighlights structure and updates corresponding class fields (highlight status and style)
+  Standard_EXPORT virtual void GraphicUnhighlight() Standard_OVERRIDE;
 
   //! Create shadow link to this structure
   Standard_EXPORT virtual Handle(Graphic3d_CStructure) ShadowLink (const Handle(Graphic3d_StructureManager)& theManager) const Standard_OVERRIDE;
@@ -100,36 +99,14 @@ public:
 
 public:
 
-  //! @return graphic groups
-  virtual const Graphic3d_SequenceOfGroup& DrawGroups() const
-  {
-    return myGroups;
-  }
-
   //! Access graphic driver
   OpenGl_GraphicDriver* GlDriver() const
   {
     return (OpenGl_GraphicDriver* )myGraphicDriver.operator->();
   }
 
-  void clearHighlightBox (const Handle(OpenGl_Context)& theGlCtx);
-
-  void setHighlightColor (const Handle(OpenGl_Context)& theGlCtx,
-                          const Graphic3d_Vec3&         theColor);
-
-  void clearHighlightColor (const Handle(OpenGl_Context)& theGlCtx);
-
   Standard_EXPORT void Clear (const Handle(OpenGl_Context)& theGlCtx);
 
-  //! Renders groups of structure without applying any attributes (i.e. transform, material etc).
-  //! @param theWorkspace current workspace
-  //! @param theHasClosed flag will be set to TRUE if structure contains at least one group of closed primitives
-  virtual void renderGeometry (const Handle(OpenGl_Workspace)& theWorkspace,
-                               bool&                           theHasClosed) const;
-
-  //! Renders groups of closed primitives without applying any attributes (i.e. transform, material etc).
-  virtual void renderClosedGeometry (const Handle(OpenGl_Workspace)& theWorkspace) const;
-
   //! Renders the structure.
   virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
 
@@ -161,9 +138,7 @@ public:
         || IsForHighlight
         || IsMutable
         || Is2dText
-        || (TransformPersistence.Flags & Graphic3d_TMF_2d)           != 0
-        || (TransformPersistence.Flags & Graphic3d_TMF_PanPers)      != 0
-        || (TransformPersistence.Flags & Graphic3d_TMF_TriedronPers) != 0;
+        || (!myTrsfPers.IsNull() && myTrsfPers->IsTrihedronOr2d());
   }
 
   //! This method releases GL resources without actual elements destruction.
@@ -193,10 +168,21 @@ protected:
   //! Updates ray-tracable status for structure and its parents.
   void UpdateStateIfRaytracable (const Standard_Boolean toCheck = Standard_True) const;
 
+  //! Renders groups of structure without applying any attributes (i.e. transform, material etc).
+  //! @param theWorkspace current workspace
+  //! @param theHasClosed flag will be set to TRUE if structure contains at least one group of closed primitives
+  Standard_EXPORT void renderGeometry (const Handle(OpenGl_Workspace)& theWorkspace,
+                                       bool&                           theHasClosed) const;
+
+  //! Highlight structure using boundary box
+  Standard_EXPORT void highlightWithBndBox (const Handle(Graphic3d_Structure)& theStruct);
+
+  //! Invalidates highlight box and releases graphic resources it uses
+  Standard_EXPORT void clearHighlightBox (const Handle(OpenGl_Context)& theGlCtx);
+
 protected:
 
   Handle(OpenGl_Group)       myHighlightBox;
-  TEL_COLOUR*                myHighlightColor;
 
   OpenGl_Structure*          myInstancedStructure;