0027555: Visualization, AIS_Shape - own deviation coefficient change is not considere...
[occt.git] / src / Prs3d / Prs3d_Drawer.hxx
index 37f96cd..a114f12 100644 (file)
@@ -39,6 +39,7 @@ class Prs3d_DatumAspect;
 class Prs3d_DimensionAspect;
 class TCollection_AsciiString;
 
+class Prs3d_Drawer;
 DEFINE_STANDARD_HANDLE(Prs3d_Drawer, MMgt_TShared)
 
 //! A graphic attribute manager which governs how
@@ -127,6 +128,20 @@ public:
   //! Returns true if the drawer has IsoOnPlane setting active.
   Standard_Boolean HasOwnIsoOnPlane() const { return myHasOwnIsoOnPlane; }
 
+  //! Returns True if the drawing of isos on triangulation is enabled.
+  Standard_Boolean IsoOnTriangulation() const
+  {
+    return HasOwnIsoOnTriangulation() || myLink.IsNull()
+         ? myIsoOnTriangulation
+         : myLink->IsoOnTriangulation();
+  }
+
+  //! Returns true if the drawer has IsoOnTriangulation setting active.
+  Standard_Boolean HasOwnIsoOnTriangulation() const { return myHasOwnIsoOnTriangulation; }
+
+  //! Enables or disables isolines on triangulation by setting the parameter theIsEnabled to true or false.
+  Standard_EXPORT void SetIsoOnTriangulation (const Standard_Boolean theToEnable);
+
   //! Sets the discretisation parameter theValue.
   Standard_EXPORT void SetDiscretisation (const Standard_Integer theValue);
 
@@ -187,6 +202,15 @@ public:
          : 0.0;
   }
 
+  //! Updates the previous value used for the chordal deviation coefficient to the current state.
+  void UpdatePreviousDeviationCoefficient()
+  {
+    if (myHasOwnDeviationCoefficient)
+    {
+      myPreviousDeviationCoefficient = DeviationCoefficient();
+    }
+  }
+
   //! Sets the deviation coefficient aCoefficient for removal
   //! of hidden lines created by different viewpoints in
   //! different presentations. The Default value is 0.02.
@@ -267,6 +291,15 @@ public:
          : 0.0;
   }
 
+  //! Updates the previous deviation angle to the current value
+  void UpdatePreviousDeviationAngle()
+  {
+    if (myHasOwnDeviationAngle)
+    {
+      myPreviousDeviationAngle = DeviationAngle();
+    }
+  }
+
   //! Sets anAngle, the angle of maximum chordal deviation for removal of hidden lines created by
   //! different viewpoints in different presentations.
   //! The default value is 20 * M_PI / 180.
@@ -848,6 +881,8 @@ protected:
   Standard_Real                 myPreviousHLRDeviationAngle;
   Standard_Boolean              myIsoOnPlane;
   Standard_Boolean              myHasOwnIsoOnPlane;
+  Standard_Boolean              myIsoOnTriangulation;
+  Standard_Boolean              myHasOwnIsoOnTriangulation;
   Standard_Boolean              myIsAutoTriangulated;
   Standard_Boolean              myHasOwnIsAutoTriangulated;
 
@@ -913,7 +948,7 @@ protected:
 
 public:
 
-  DEFINE_STANDARD_RTTI(Prs3d_Drawer, MMgt_TShared)
+  DEFINE_STANDARD_RTTIEXT(Prs3d_Drawer,MMgt_TShared)
 
 };