0026561: Porting CSharp wrapper to OCCT 7.0.0
authorabv <abv@opencascade.com>
Fri, 23 Oct 2015 04:20:32 +0000 (07:20 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 26 Oct 2015 14:05:23 +0000 (17:05 +0300)
Added missing Standard_EXPORT for public methods; declaration of unimplemented method removed.

Restoring some changes made for #26788 but omitted in its commit.

OpenGl_View::ReadDepths() - drop obsolete and broken method; V3d_View::ToPixMap() should be used instead

src/AIS/AIS_LocalContext.hxx
src/BRepFill/BRepFill_Evolved.cxx
src/BRepLib/BRepLib_FindSurface.cxx
src/Bisector/Bisector_BisecPC.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_Window.cxx
src/OpenGl/OpenGl_Window.hxx
src/ShapeFix/ShapeFix_Edge.hxx

index eed643b..02972a2 100644 (file)
@@ -95,10 +95,6 @@ public:
   
   Standard_EXPORT void Terminate (const Standard_Boolean updateviewer = Standard_True);
   
-  //! to be called when a upper local context was closed...
-  //! useful to put pack the right projector...
-  Standard_EXPORT void Reactivate();
-  
   //! returns true if done...
   Standard_EXPORT Standard_Boolean Display (const Handle(AIS_InteractiveObject)& anInteractive, const Standard_Integer DisplayMode = 0, const Standard_Boolean AllowShapeDecomposition = Standard_True, const Standard_Integer ActivationMode = 0);
   
index aa834d2..de4f1a4 100644 (file)
@@ -2095,8 +2095,8 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
             gp_Pnt PC;
             gp_Vec VC;
             C.D1(u,PC,VC);
-            gp_Vec PPC(P,PC);
-            gp_Vec Prod = PPC.Crossed(VC);
+           gp_Vec aPPC(P,PC);
+           gp_Vec Prod = aPPC.Crossed(VC);
             if (IsOut) {
               ToReverse = Prod.Z() < 0.;
             }
index b01ac1b..64451fb 100644 (file)
@@ -203,7 +203,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
 
   TopoDS_Edge E = TopoDS::Edge(ex.Current());
   Standard_Real f,l,ff,ll;
-  Handle(Geom2d_Curve) PC,PPC;
+  Handle(Geom2d_Curve) PC,aPPC;
   Handle(Geom_Surface) SS;
   TopLoc_Location L;
   Standard_Integer i = 0,j;
@@ -221,8 +221,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
         j = 0;
         for(;;) {
           j++;
-          BRep_Tool::CurveOnSurface(TopoDS::Edge(ex.Current()),
-            PPC,SS,L,ff,ll,j);
+          BRep_Tool::CurveOnSurface(TopoDS::Edge(ex.Current()),aPPC,SS,L,ff,ll,j);
           if (SS.IsNull()) {
             break;
           }
index 434ac1e..c1e1672 100644 (file)
@@ -386,11 +386,11 @@ void Bisector_BisecPC::Values(const Standard_Real    U,
   case 2 :  {curve->D3(UOnCurve,PC,Tu,Tuu,T3u);break;}
   }
   
-  gp_Vec2d PPC(PC.X() - point.X(), PC.Y() - point.Y());
+  gp_Vec2d aPPC(PC.X() - point.X(), PC.Y() - point.Y());
   gp_Vec2d Nor( - Tu.Y(), Tu.X());
   
-  Standard_Real SquarePPC = PPC.SquareMagnitude();
-  Standard_Real NorPPC    = Nor.Dot(PPC);
+  Standard_Real SquarePPC = aPPC.SquareMagnitude();
+  Standard_Real NorPPC    = Nor.Dot(aPPC);
   Standard_Real A1;
 
   if (Abs(NorPPC) > gp::Resolution() && (NorPPC*sign) < 0.) {
@@ -402,8 +402,8 @@ void Bisector_BisecPC::Values(const Standard_Real    U,
   if (N == 0) return;                                 // End Calculation Point;
 
   gp_Vec2d      Nu ( - Tuu.Y() , Tuu.X());            // derivative of the normal by U.
-  Standard_Real NuPPC     = Nu .Dot(PPC);
-  Standard_Real TuPPC     = Tu .Dot(PPC);
+  Standard_Real NuPPC     = Nu .Dot(aPPC);
+  Standard_Real TuPPC     = Tu .Dot(aPPC);
   Standard_Real NorPPCE2  = NorPPC*NorPPC;
   Standard_Real A2        = TuPPC/NorPPC - 0.5*NuPPC*SquarePPC/NorPPCE2;
 
@@ -415,8 +415,8 @@ void Bisector_BisecPC::Values(const Standard_Real    U,
   gp_Vec2d Nuu ( - T3u.Y() , T3u.X());
   
   Standard_Real NorPPCE4 = NorPPCE2*NorPPCE2;
-  Standard_Real NuuPPC   = Nuu.Dot(PPC);
-  Standard_Real TuuPPC   = Tuu.Dot(PPC);
+  Standard_Real NuuPPC   = Nuu.Dot(aPPC);
+  Standard_Real TuuPPC   = Tuu.Dot(aPPC);
   
   Standard_Real A21 = TuuPPC/NorPPC - TuPPC*NuPPC/NorPPCE2;
   Standard_Real A22 = (0.5*NuuPPC*SquarePPC + NuPPC*TuPPC)/NorPPCE2 - 
@@ -470,12 +470,12 @@ Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const
   Standard_Real UOnCurve = LinkBisCurve(U);
   
   curve->D1(UOnCurve,PC,Tan);
-  gp_Vec2d PPC(PC.X() - point.X(), PC.Y() - point.Y());
+  gp_Vec2d aPPC(PC.X() - point.X(), PC.Y() - point.Y());
   gp_Vec2d Nor( - Tan.Y(), Tan.X());
 
   Standard_Real NorNor       = Nor.SquareMagnitude();
-  Standard_Real SquareMagPPC = PPC.SquareMagnitude();
-  Standard_Real Prosca       = Nor.Dot(PPC);
+  Standard_Real SquareMagPPC = aPPC.SquareMagnitude();
+  Standard_Real Prosca       = Nor.Dot(aPPC);
   
   if (point.IsEqual(PC,Precision::Confusion())) {
     if (isConvex) { return 0.;}
index 4fb824b..2a29b91 100644 (file)
@@ -296,13 +296,6 @@ public:
   //! @param theMax [in] the maximum point of scene.
   virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) = 0;
 
-  //! Reads depths of shown pixels of the given rectangle.
-  virtual void ReadDepths (const Standard_Integer theX,
-                           const Standard_Integer theY,
-                           const Standard_Integer theWidth,
-                           const Standard_Integer theHeight,
-                           const Standard_Address theBuffer) const = 0;
-
   //! Dump active rendering buffer into specified memory buffer.
   virtual Standard_Boolean BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) = 0;
 
index 4b3ae3b..b572396 100644 (file)
@@ -366,22 +366,6 @@ void OpenGl_View::GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, c
   myGraduatedTrihedron.SetMinMax (theMin, theMax);
 }
 
-// =======================================================================
-// function : ReadDepths
-// purpose  :
-// =======================================================================
-void OpenGl_View::ReadDepths (const Standard_Integer theX,
-                              const Standard_Integer theY,
-                              const Standard_Integer theWidth,
-                              const Standard_Integer theHeight,
-                              const Standard_Address theBuffer) const
-{
-  if (myWindow.IsNull())
-    return;
-
-  myWindow->ReadDepths (theX, theY, theWidth, theHeight, (float*)theBuffer);
-}
-
 // =======================================================================
 // function : BufferDump
 // purpose  :
index 2f0123b..b256b4e 100644 (file)
@@ -183,13 +183,6 @@ public:
   //! @param theMax [in] the maximum point of scene.
   Standard_EXPORT virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) Standard_OVERRIDE;
 
-  //! Reads depths of shown pixels of the given rectangle.
-  Standard_EXPORT virtual void ReadDepths (const Standard_Integer theX,
-                                           const Standard_Integer theY,
-                                           const Standard_Integer theWidth,
-                                           const Standard_Integer theHeight,
-                                           const Standard_Address theBuffer) const Standard_OVERRIDE;
-
   //! Dump active rendering buffer into specified memory buffer.
   Standard_EXPORT virtual Standard_Boolean BufferDump (Image_PixMap& theImage,
                                                        const Graphic3d_BufferType& theBufferType) Standard_OVERRIDE;
index 6a9eb3d..15f8141 100644 (file)
@@ -702,47 +702,6 @@ void OpenGl_Window::Resize()
   Init();
 }
 
-#endif // !__APPLE__
-
-// =======================================================================
-// function : ReadDepths
-// purpose  : TelReadDepths
-// =======================================================================
-void OpenGl_Window::ReadDepths (const Standard_Integer theX,     const Standard_Integer theY,
-                                const Standard_Integer theWidth, const Standard_Integer theHeight,
-                                float* theDepths)
-{
-  if (theDepths == NULL || !Activate())
-    return;
-
-  OpenGl_Mat4 aProjectMat;
-  Graphic3d_TransformUtils::Ortho2D (aProjectMat,
-    0.f, static_cast<GLfloat> (myWidth), 0.f, static_cast<GLfloat> (myHeight));
-
-  myGlContext->WorldViewState.Push();
-  myGlContext->ProjectionState.Push();
-
-  myGlContext->WorldViewState.SetIdentity();
-  myGlContext->ProjectionState.SetCurrent (aProjectMat);
-
-  myGlContext->ApplyProjectionMatrix();
-  myGlContext->ApplyWorldViewMatrix();
-
-#if !defined(GL_ES_VERSION_2_0)
-  glRasterPos2i (theX, theY);
-  myGlContext->DisableFeatures();
-  glReadPixels (theX, theY, theWidth, theHeight, GL_DEPTH_COMPONENT, GL_FLOAT, theDepths);
-  myGlContext->EnableFeatures();
-#endif
-
-  myGlContext->WorldViewState.Pop();
-  myGlContext->ProjectionState.Pop();
-
-  myGlContext->ApplyProjectionMatrix();
-}
-
-#if !defined(__APPLE__) || defined(MACOSX_USE_GLX)
-
 // =======================================================================
 // function : Init
 // purpose  :
index 4fd070f..a3ded8f 100644 (file)
@@ -59,11 +59,6 @@ public:
   //! Resizes the window.
   Standard_EXPORT virtual void Resize();
 
-  //! Reads depth component for current scene into specified buffer.
-  void ReadDepths (const Standard_Integer theX,     const Standard_Integer theY,
-                   const Standard_Integer theWidth, const Standard_Integer theHeight,
-                   float* theDepths);
-
   Handle(Aspect_Window) PlatformWindow() { return myPlatformWindow; }
 
   Standard_Integer Width()  const { return myWidth; }
index ba1a759..c7dd6d2 100644 (file)
@@ -218,7 +218,7 @@ public:
   Standard_EXPORT void SetContext (const Handle(ShapeBuild_ReShape)& context);
 
   //! Returns context
-  Handle(ShapeBuild_ReShape) Context() const;
+  Standard_EXPORT Handle(ShapeBuild_ReShape) Context() const;
 
   DEFINE_STANDARD_RTTI(ShapeFix_Edge,MMgt_TShared)