mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026561: Porting CSharp wrapper to OCCT 7.0.0
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
This commit is contained in:
parent
df573a26ed
commit
f1a70360a7
@ -95,10 +95,6 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT void Terminate (const Standard_Boolean updateviewer = Standard_True);
|
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...
|
//! 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);
|
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);
|
||||||
|
|
||||||
|
@ -2095,8 +2095,8 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
|
|||||||
gp_Pnt PC;
|
gp_Pnt PC;
|
||||||
gp_Vec VC;
|
gp_Vec VC;
|
||||||
C.D1(u,PC,VC);
|
C.D1(u,PC,VC);
|
||||||
gp_Vec PPC(P,PC);
|
gp_Vec aPPC(P,PC);
|
||||||
gp_Vec Prod = PPC.Crossed(VC);
|
gp_Vec Prod = aPPC.Crossed(VC);
|
||||||
if (IsOut) {
|
if (IsOut) {
|
||||||
ToReverse = Prod.Z() < 0.;
|
ToReverse = Prod.Z() < 0.;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S,
|
|||||||
|
|
||||||
TopoDS_Edge E = TopoDS::Edge(ex.Current());
|
TopoDS_Edge E = TopoDS::Edge(ex.Current());
|
||||||
Standard_Real f,l,ff,ll;
|
Standard_Real f,l,ff,ll;
|
||||||
Handle(Geom2d_Curve) PC,PPC;
|
Handle(Geom2d_Curve) PC,aPPC;
|
||||||
Handle(Geom_Surface) SS;
|
Handle(Geom_Surface) SS;
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
Standard_Integer i = 0,j;
|
Standard_Integer i = 0,j;
|
||||||
@ -221,8 +221,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S,
|
|||||||
j = 0;
|
j = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
j++;
|
j++;
|
||||||
BRep_Tool::CurveOnSurface(TopoDS::Edge(ex.Current()),
|
BRep_Tool::CurveOnSurface(TopoDS::Edge(ex.Current()),aPPC,SS,L,ff,ll,j);
|
||||||
PPC,SS,L,ff,ll,j);
|
|
||||||
if (SS.IsNull()) {
|
if (SS.IsNull()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -386,11 +386,11 @@ void Bisector_BisecPC::Values(const Standard_Real U,
|
|||||||
case 2 : {curve->D3(UOnCurve,PC,Tu,Tuu,T3u);break;}
|
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());
|
gp_Vec2d Nor( - Tu.Y(), Tu.X());
|
||||||
|
|
||||||
Standard_Real SquarePPC = PPC.SquareMagnitude();
|
Standard_Real SquarePPC = aPPC.SquareMagnitude();
|
||||||
Standard_Real NorPPC = Nor.Dot(PPC);
|
Standard_Real NorPPC = Nor.Dot(aPPC);
|
||||||
Standard_Real A1;
|
Standard_Real A1;
|
||||||
|
|
||||||
if (Abs(NorPPC) > gp::Resolution() && (NorPPC*sign) < 0.) {
|
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;
|
if (N == 0) return; // End Calculation Point;
|
||||||
|
|
||||||
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U.
|
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U.
|
||||||
Standard_Real NuPPC = Nu .Dot(PPC);
|
Standard_Real NuPPC = Nu .Dot(aPPC);
|
||||||
Standard_Real TuPPC = Tu .Dot(PPC);
|
Standard_Real TuPPC = Tu .Dot(aPPC);
|
||||||
Standard_Real NorPPCE2 = NorPPC*NorPPC;
|
Standard_Real NorPPCE2 = NorPPC*NorPPC;
|
||||||
Standard_Real A2 = TuPPC/NorPPC - 0.5*NuPPC*SquarePPC/NorPPCE2;
|
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());
|
gp_Vec2d Nuu ( - T3u.Y() , T3u.X());
|
||||||
|
|
||||||
Standard_Real NorPPCE4 = NorPPCE2*NorPPCE2;
|
Standard_Real NorPPCE4 = NorPPCE2*NorPPCE2;
|
||||||
Standard_Real NuuPPC = Nuu.Dot(PPC);
|
Standard_Real NuuPPC = Nuu.Dot(aPPC);
|
||||||
Standard_Real TuuPPC = Tuu.Dot(PPC);
|
Standard_Real TuuPPC = Tuu.Dot(aPPC);
|
||||||
|
|
||||||
Standard_Real A21 = TuuPPC/NorPPC - TuPPC*NuPPC/NorPPCE2;
|
Standard_Real A21 = TuuPPC/NorPPC - TuPPC*NuPPC/NorPPCE2;
|
||||||
Standard_Real A22 = (0.5*NuuPPC*SquarePPC + NuPPC*TuPPC)/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);
|
Standard_Real UOnCurve = LinkBisCurve(U);
|
||||||
|
|
||||||
curve->D1(UOnCurve,PC,Tan);
|
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());
|
gp_Vec2d Nor( - Tan.Y(), Tan.X());
|
||||||
|
|
||||||
Standard_Real NorNor = Nor.SquareMagnitude();
|
Standard_Real NorNor = Nor.SquareMagnitude();
|
||||||
Standard_Real SquareMagPPC = PPC.SquareMagnitude();
|
Standard_Real SquareMagPPC = aPPC.SquareMagnitude();
|
||||||
Standard_Real Prosca = Nor.Dot(PPC);
|
Standard_Real Prosca = Nor.Dot(aPPC);
|
||||||
|
|
||||||
if (point.IsEqual(PC,Precision::Confusion())) {
|
if (point.IsEqual(PC,Precision::Confusion())) {
|
||||||
if (isConvex) { return 0.;}
|
if (isConvex) { return 0.;}
|
||||||
|
@ -296,13 +296,6 @@ public:
|
|||||||
//! @param theMax [in] the maximum point of scene.
|
//! @param theMax [in] the maximum point of scene.
|
||||||
virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) = 0;
|
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.
|
//! Dump active rendering buffer into specified memory buffer.
|
||||||
virtual Standard_Boolean BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) = 0;
|
virtual Standard_Boolean BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) = 0;
|
||||||
|
|
||||||
|
@ -366,22 +366,6 @@ void OpenGl_View::GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, c
|
|||||||
myGraduatedTrihedron.SetMinMax (theMin, theMax);
|
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
|
// function : BufferDump
|
||||||
// purpose :
|
// purpose :
|
||||||
|
@ -183,13 +183,6 @@ public:
|
|||||||
//! @param theMax [in] the maximum point of scene.
|
//! @param theMax [in] the maximum point of scene.
|
||||||
Standard_EXPORT virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) Standard_OVERRIDE;
|
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.
|
//! Dump active rendering buffer into specified memory buffer.
|
||||||
Standard_EXPORT virtual Standard_Boolean BufferDump (Image_PixMap& theImage,
|
Standard_EXPORT virtual Standard_Boolean BufferDump (Image_PixMap& theImage,
|
||||||
const Graphic3d_BufferType& theBufferType) Standard_OVERRIDE;
|
const Graphic3d_BufferType& theBufferType) Standard_OVERRIDE;
|
||||||
|
@ -702,47 +702,6 @@ void OpenGl_Window::Resize()
|
|||||||
Init();
|
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
|
// function : Init
|
||||||
// purpose :
|
// purpose :
|
||||||
|
@ -59,11 +59,6 @@ public:
|
|||||||
//! Resizes the window.
|
//! Resizes the window.
|
||||||
Standard_EXPORT virtual void Resize();
|
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; }
|
Handle(Aspect_Window) PlatformWindow() { return myPlatformWindow; }
|
||||||
|
|
||||||
Standard_Integer Width() const { return myWidth; }
|
Standard_Integer Width() const { return myWidth; }
|
||||||
|
@ -218,7 +218,7 @@ public:
|
|||||||
Standard_EXPORT void SetContext (const Handle(ShapeBuild_ReShape)& context);
|
Standard_EXPORT void SetContext (const Handle(ShapeBuild_ReShape)& context);
|
||||||
|
|
||||||
//! Returns context
|
//! Returns context
|
||||||
Handle(ShapeBuild_ReShape) Context() const;
|
Standard_EXPORT Handle(ShapeBuild_ReShape) Context() const;
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTI(ShapeFix_Edge,MMgt_TShared)
|
DEFINE_STANDARD_RTTI(ShapeFix_Edge,MMgt_TShared)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user