From ee2be2a8812d44c030fe6745498c7d7f54a8bdc4 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 30 May 2017 13:43:59 +0300 Subject: [PATCH] 0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View Quantity_Factor, Quantity_Parameter, Quantity_Ratio, Quantity_Coefficient, Quantity_PlaneAngle, Quantity_Length, V3d_Parameter and V3d_Coordinate have been replaced by Standard_Real in visualization classes. --- samples/CSharp/OCCTProxy/OCCTProxy.cpp | 4 +- samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp | 2 +- samples/CSharp/WPF_D3D/OCCViewer.cs | 2 +- samples/CSharp/WPF_WinForms/OCCViewer.cs | 2 +- samples/CSharp/WinForms/Form2.cs | 2 +- samples/java/jniviewer/jni/OcctJni_Window.hxx | 2 +- .../occtdemo/Common/OCCDemo_Presentation.cpp | 12 +- .../occtdemo/Common/OCCDemo_Presentation.h | 12 +- .../mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp | 1 - .../mfc/occtdemo/Common/WNT/OCCDemoView.cpp | 13 +- samples/mfc/occtdemo/Common/WNT/OCCDemoView.h | 14 +- .../Interpol/Interpol_Presentation.cpp | 2 - .../standard/01_Geometry/src/GeomSources.cpp | 6 +- .../standard/01_Geometry/src/GeomSources.h | 2 +- .../standard/01_Geometry/src/GeometryDoc.cpp | 6 +- .../standard/01_Geometry/src/GeometryDoc.h | 4 +- .../standard/01_Geometry/src/GeometryView.h | 2 +- .../src/ISession2D/ISession2D_Curve.h | 2 - .../src/ISession2D/ISession_Direction.h | 2 +- .../04_Viewer3d/src/ConvertClickToPoint.cxx | 2 +- .../04_Viewer3d/src/OCCDemo_Presentation.cpp | 12 +- .../04_Viewer3d/src/OCCDemo_Presentation.h | 12 +- .../standard/04_Viewer3d/src/Viewer3dView.cpp | 14 +- .../standard/04_Viewer3d/src/Viewer3dView.h | 14 +- .../src/OCCDemo_Presentation.cpp | 12 +- .../src/OCCDemo_Presentation.h | 12 +- .../standard/08_HLR/src/SelectionDialog.cpp | 4 +- .../09_Animation/src/AnimationView3D.h | 2 +- .../10_Convert/src/OCCDemo_Presentation.cpp | 14 +- .../10_Convert/src/OCCDemo_Presentation.h | 14 +- .../10_Convert/src/WNT/OCCDemoView.cpp | 12 +- .../standard/10_Convert/src/WNT/OCCDemoView.h | 16 +- samples/mfc/standard/Common/OCC_2dView.cpp | 2 +- samples/mfc/standard/Common/OCC_3dView.h | 2 +- samples/mfc/standard/Common/OCC_BaseView.h | 2 +- .../Common/Primitive/Sample2D_Image.cpp | 6 +- .../Common/Primitive/Sample2D_Image.h | 30 ++-- .../Common/Primitive/Sample2D_Markers.cpp | 8 +- .../Common/Primitive/Sample2D_Markers.h | 22 +-- .../Common/Resource2D/CircularGrid.cpp | 8 +- .../standard/Common/Resource2D/CircularGrid.h | 4 +- .../Common/Resource2D/RectangularGrid.cpp | 8 +- .../Common/Resource2D/RectangularGrid.h | 4 +- samples/qt/AndroidQt/AndroidQt_Window.h | 2 +- samples/qt/Common/src/OcctWindow.cxx | 4 +- samples/qt/Common/src/OcctWindow.h | 2 +- samples/qt/Common/src/View.h | 2 +- src/AIS/AIS.cxx | 6 +- src/AIS/AIS_AngleDimension.cxx | 4 +- src/AIS/AIS_Axis.cxx | 2 +- src/AIS/AIS_Dimension.cxx | 14 +- src/AIS/AIS_LengthDimension.cxx | 2 +- src/AIS/AIS_PlaneTrihedron.cxx | 2 +- src/Aspect/Aspect_CircularGrid.cxx | 26 ++-- src/Aspect/Aspect_CircularGrid.hxx | 34 +---- src/Aspect/Aspect_Convert.hxx | 26 ++-- src/Aspect/Aspect_Grid.cxx | 32 ++-- src/Aspect/Aspect_Grid.hxx | 47 ++---- src/Aspect/Aspect_NeutralWindow.hxx | 4 +- src/Aspect/Aspect_RectangularGrid.cxx | 50 +++--- src/Aspect/Aspect_RectangularGrid.hxx | 50 ++---- src/Aspect/Aspect_Window.hxx | 3 +- src/Cocoa/Cocoa_Window.hxx | 4 +- src/Cocoa/Cocoa_Window.mm | 4 +- src/DsgPrs/DsgPrs.cxx | 6 +- src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx | 3 +- src/DsgPrs/DsgPrs_SymmetricPresentation.cxx | 2 +- src/Graphic3d/Graphic3d_Group.cxx | 8 +- src/Graphic3d/Graphic3d_Group.hxx | 9 +- src/Graphic3d/Graphic3d_MarkerImage.cxx | 4 +- src/Graphic3d/Graphic3d_MarkerImage.hxx | 1 - src/IVtkOCC/IVtkOCC_ShapeMesher.cxx | 13 +- src/Image/Image_AlienPixMap.cxx | 2 +- src/Image/Image_PixMap.cxx | 62 ++------ src/Image/Image_PixMap.hxx | 4 +- src/OpenGl/OpenGl_GraphicDriver.hxx | 1 - src/OpenGl/OpenGl_Group.cxx | 4 +- src/OpenGl/OpenGl_Group.hxx | 4 +- src/Prs3d/Prs3d.cxx | 10 +- src/Prs3d/Prs3d.hxx | 3 +- src/Prs3d/Prs3d_Arrow.cxx | 8 +- src/Prs3d/Prs3d_Arrow.hxx | 14 +- src/Prs3d/Prs3d_ArrowAspect.cxx | 6 +- src/Prs3d/Prs3d_ArrowAspect.hxx | 16 +- src/Prs3d/Prs3d_Drawer.cxx | 2 +- src/Prs3d/Prs3d_Drawer.hxx | 7 +- src/Prs3d/Prs3d_PlaneAspect.hxx | 36 +++-- src/Prs3d/Prs3d_Point.hxx | 15 +- src/Prs3d/Prs3d_Presentation.hxx | 3 +- src/Prs3d/Prs3d_Projector.cxx | 20 +-- src/Prs3d/Prs3d_Projector.hxx | 21 +-- src/Prs3d/Prs3d_TextAspect.hxx | 10 +- src/PrsMgr/PrsMgr_Presentation.hxx | 1 - src/QABugs/QABugs_6.cxx | 2 +- src/Quantity/Quantity_Color.cxx | 81 +++++----- src/Quantity/Quantity_Color.hxx | 60 +++----- src/StdPrs/StdPrs_Curve.cxx | 48 +++--- src/StdPrs/StdPrs_Curve.hxx | 30 +--- src/StdPrs/StdPrs_DeflectionCurve.cxx | 46 +++--- src/StdPrs/StdPrs_DeflectionCurve.hxx | 10 +- src/StdPrs/StdPrs_Plane.cxx | 14 +- src/StdPrs/StdPrs_Plane.hxx | 25 +-- src/StdPrs/StdPrs_PoleCurve.cxx | 16 +- src/StdPrs/StdPrs_PoleCurve.hxx | 27 +--- src/StdPrs/StdPrs_ToolPoint.hxx | 27 +--- src/StdPrs/StdPrs_ToolVertex.hxx | 27 +--- .../StdPrs_WFDeflectionRestrictedFace.cxx | 36 ++--- .../StdPrs_WFDeflectionRestrictedFace.hxx | 33 +--- src/StdPrs/StdPrs_WFRestrictedFace.cxx | 34 ++--- src/StdPrs/StdPrs_WFRestrictedFace.hxx | 34 ++--- src/V3d/V3d.hxx | 59 ++------ src/V3d/V3d_DirectionalLight.hxx | 48 +++--- src/V3d/V3d_Light.hxx | 9 +- src/V3d/V3d_Plane.hxx | 24 +-- src/V3d/V3d_PositionLight.hxx | 30 ++-- src/V3d/V3d_PositionalLight.hxx | 47 +++--- src/V3d/V3d_SpotLight.hxx | 74 ++++----- src/V3d/V3d_View.cxx | 18 +-- src/V3d/V3d_View.hxx | 143 ++++++++++-------- src/V3d/V3d_View_3.cxx | 2 +- src/V3d/V3d_Viewer.hxx | 34 ++--- src/V3d/V3d_Viewer_3.cxx | 2 +- src/V3d/V3d_Viewer_4.cxx | 60 ++++---- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 16 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 23 ++- src/WNT/WNT_Window.cxx | 6 +- src/WNT/WNT_Window.hxx | 3 +- src/XDEDRAW/XDEDRAW.cxx | 10 +- src/Xw/Xw_Window.cxx | 4 +- src/Xw/Xw_Window.hxx | 4 +- 130 files changed, 891 insertions(+), 1218 deletions(-) diff --git a/samples/CSharp/OCCTProxy/OCCTProxy.cpp b/samples/CSharp/OCCTProxy/OCCTProxy.cpp index 1d316df167..933355b3a8 100644 --- a/samples/CSharp/OCCTProxy/OCCTProxy.cpp +++ b/samples/CSharp/OCCTProxy/OCCTProxy.cpp @@ -164,7 +164,7 @@ public: /// Current zoom void Place(int theX, int theY, float theZoomFactor) { - Quantity_Factor aZoomFactor = theZoomFactor; + Standard_Real aZoomFactor = theZoomFactor; if (!myView().IsNull()) { myView()->Place(theX, theY, aZoomFactor); @@ -537,7 +537,7 @@ public: { Quantity_Color anObjCol; myAISContext()->Color (aCurrent, anObjCol); - Quantity_Parameter r1, r2, r3; + Standard_Real r1, r2, r3; anObjCol.Values(r1, r2, r3, Quantity_TOC_RGB); theRed=(int)r1*255; theGreen=(int)r2*255; diff --git a/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp b/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp index 677c7e94f0..165c705a71 100644 --- a/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp +++ b/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp @@ -180,7 +180,7 @@ public: /// Current zoom void Place (int theX, int theY, float theZoomFactor) { - Quantity_Factor aZoomFactor = theZoomFactor; + Standard_Real aZoomFactor = theZoomFactor; if (!myView().IsNull()) { myView()->Place (theX, theY, aZoomFactor); diff --git a/samples/CSharp/WPF_D3D/OCCViewer.cs b/samples/CSharp/WPF_D3D/OCCViewer.cs index bdb3c0f8db..eb6df776f4 100644 --- a/samples/CSharp/WPF_D3D/OCCViewer.cs +++ b/samples/CSharp/WPF_D3D/OCCViewer.cs @@ -71,7 +71,7 @@ namespace IE_WPF_D3D public bool IsMaterialEnabled { get; private set; } public bool IsDeleteEnabled { get; private set; } - private float myCurZoom;// ~ Quantity_Factor + private float myCurZoom; private int myXmin; private int myYmin; private int myXmax; diff --git a/samples/CSharp/WPF_WinForms/OCCViewer.cs b/samples/CSharp/WPF_WinForms/OCCViewer.cs index 29e4e10072..20d12c1042 100644 --- a/samples/CSharp/WPF_WinForms/OCCViewer.cs +++ b/samples/CSharp/WPF_WinForms/OCCViewer.cs @@ -70,7 +70,7 @@ namespace IE_WPF_WinForms public bool IsMaterialEnabled { get; private set; } public bool IsDeleteEnabled { get; private set; } - private float myCurZoom;// ~ Quantity_Factor + private float myCurZoom; private int myXmin; private int myYmin; private int myXmax; diff --git a/samples/CSharp/WinForms/Form2.cs b/samples/CSharp/WinForms/Form2.cs index 14d0389dd1..f6e82dade3 100644 --- a/samples/CSharp/WinForms/Form2.cs +++ b/samples/CSharp/WinForms/Form2.cs @@ -286,7 +286,7 @@ namespace IE_WinForms protected CurrentAction3d myCurrentMode; protected CurrentPressedKey myCurrentPressedKey; - protected float myCurZoom;// ~ Quantity_Factor + protected float myCurZoom; protected bool myDegenerateModeIsOn; protected int myXmin; protected int myYmin; diff --git a/samples/java/jniviewer/jni/OcctJni_Window.hxx b/samples/java/jniviewer/jni/OcctJni_Window.hxx index f8cd2dad3c..10ec7f01a9 100644 --- a/samples/java/jniviewer/jni/OcctJni_Window.hxx +++ b/samples/java/jniviewer/jni/OcctJni_Window.hxx @@ -53,7 +53,7 @@ public: virtual Standard_Boolean IsMapped() const Standard_OVERRIDE { return Standard_True; } //! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions - virtual Quantity_Ratio Ratio() const Standard_OVERRIDE { return 1.0; } + virtual Standard_Real Ratio() const Standard_OVERRIDE { return 1.0; } //! Returns The Window POSITION in PIXEL virtual void Position (Standard_Integer& theX1, diff --git a/samples/mfc/occtdemo/Common/OCCDemo_Presentation.cpp b/samples/mfc/occtdemo/Common/OCCDemo_Presentation.cpp index 2e9da863f5..5480ab03f1 100755 --- a/samples/mfc/occtdemo/Common/OCCDemo_Presentation.cpp +++ b/samples/mfc/occtdemo/Common/OCCDemo_Presentation.cpp @@ -257,7 +257,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape return aGraphicShape; } -void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc) +void OCCDemo_Presentation::GetViewCenter(Standard_Real& Xc, Standard_Real& Yc) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -265,7 +265,7 @@ void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc) pView->GetViewCenter(Xc,Yc); } -void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc) +void OCCDemo_Presentation::SetViewCenter(Standard_Real Xc, Standard_Real Yc) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -273,7 +273,7 @@ void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc) pView->SetViewCenter(Xc,Yc); } -void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -281,7 +281,7 @@ void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_ pView->GetViewEye(X,Y,Z); } -void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -289,7 +289,7 @@ void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Co pView->SetViewEye(X,Y,Z); } -Quantity_Factor OCCDemo_Presentation::GetViewScale() +Standard_Real OCCDemo_Presentation::GetViewScale() { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -297,7 +297,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale() return pView->GetViewScale(); } -void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) +void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); diff --git a/samples/mfc/occtdemo/Common/OCCDemo_Presentation.h b/samples/mfc/occtdemo/Common/OCCDemo_Presentation.h index 1ac3299835..88b16ebb1d 100755 --- a/samples/mfc/occtdemo/Common/OCCDemo_Presentation.h +++ b/samples/mfc/occtdemo/Common/OCCDemo_Presentation.h @@ -48,12 +48,12 @@ public: void NextSample() {myIndex++;} void PrevSample() {myIndex--;} virtual void DoSample() = 0; - static void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); - static void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); - static void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - static void SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); - static Quantity_Factor GetViewScale(); - static void SetViewScale(Quantity_Factor Coef); + static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc); + static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc); + static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z); + static Standard_Real GetViewScale(); + static void SetViewScale(Standard_Real Coef); static void ResetView(); diff --git a/samples/mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp b/samples/mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp index 3cc7d72815..68049b8e18 100755 --- a/samples/mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp +++ b/samples/mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp @@ -9,7 +9,6 @@ #include "OCCDemoView.h" #include -#include #ifdef _DEBUG #undef THIS_FILE diff --git a/samples/mfc/occtdemo/Common/WNT/OCCDemoView.cpp b/samples/mfc/occtdemo/Common/WNT/OCCDemoView.cpp index 7c1ed702ef..56ca7b6d65 100755 --- a/samples/mfc/occtdemo/Common/WNT/OCCDemoView.cpp +++ b/samples/mfc/occtdemo/Common/WNT/OCCDemoView.cpp @@ -8,7 +8,6 @@ #include "OCCDemoView.h" #include -#include #define ValZWMin 1 @@ -548,32 +547,32 @@ void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) pCmdUI->Enable (myVisMode != VIS_HLR); } -void COCCDemoView::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc) +void COCCDemoView::GetViewCenter(Standard_Real& Xc, Standard_Real& Yc) { myView->Center(Xc,Yc); } -void COCCDemoView::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc) +void COCCDemoView::SetViewCenter(Standard_Real Xc, Standard_Real Yc) { myView->SetCenter(Xc,Yc); } -void COCCDemoView::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void COCCDemoView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { myView->Eye(X,Y,Z); } -void COCCDemoView::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void COCCDemoView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { myView->SetEye(X,Y,Z); } -Quantity_Factor COCCDemoView::GetViewScale() +Standard_Real COCCDemoView::GetViewScale() { return myView->Scale(); } -void COCCDemoView::SetViewScale(Quantity_Factor Coef) +void COCCDemoView::SetViewScale(Standard_Real Coef) { myView->SetScale(Coef); } diff --git a/samples/mfc/occtdemo/Common/WNT/OCCDemoView.h b/samples/mfc/occtdemo/Common/WNT/OCCDemoView.h index cf8ea1bfb6..6112b3db60 100755 --- a/samples/mfc/occtdemo/Common/WNT/OCCDemoView.h +++ b/samples/mfc/occtdemo/Common/WNT/OCCDemoView.h @@ -33,12 +33,12 @@ public: void InitButtons(); void Reset(); void FitAll() { myView->FitAll(); myView->ZFitAll(); }; - void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); - void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); - void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - void SetViewEye(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); - Quantity_Factor GetViewScale(); - void SetViewScale(const Quantity_Factor Coef); + void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc); + void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc); + void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + void SetViewEye(const Standard_Real X,const Standard_Real Y,const Standard_Real Z); + Standard_Real GetViewScale(); + void SetViewScale(const Standard_Real Coef); // Overrides @@ -111,7 +111,7 @@ private: Standard_Integer myYmin; Standard_Integer myXmax; Standard_Integer myYmax; - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; private: enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; diff --git a/samples/mfc/occtdemo/Interpol/Interpol_Presentation.cpp b/samples/mfc/occtdemo/Interpol/Interpol_Presentation.cpp index 19b7ff75a0..f68659339f 100755 --- a/samples/mfc/occtdemo/Interpol/Interpol_Presentation.cpp +++ b/samples/mfc/occtdemo/Interpol/Interpol_Presentation.cpp @@ -18,8 +18,6 @@ #include #include -#include - #ifdef WNT #define EOL "\r\n" #else diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index 72f3187c3b..b5daf19de1 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -56,7 +56,7 @@ void GeomSources::PreProcess(CGeometryDoc* aDoc,DisplayType aDisplayType) } void GeomSources::PostProcess (CGeometryDoc* aDoc, UINT anID, DisplayType aDisplayType, - const TCollection_AsciiString& theString, Standard_Boolean UpdateViewer, Quantity_Coefficient Coef) + const TCollection_AsciiString& theString, Standard_Boolean UpdateViewer, Standard_Real Coef) { Standard_CString aString = theString.ToCString(); if (UpdateViewer) @@ -3808,7 +3808,7 @@ void GeomSources::gpTest47(CGeometryDoc* aDoc) GeomAPI_PointsToBSplineSurface(array3).Surface(); GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); - //Quantity_Length dist = ESS.LowerDistance(); + //Standard_Real dist = ESS.LowerDistance(); gp_Pnt P1,P2; ESS.NearestPoints(P1,P2); @@ -3833,7 +3833,7 @@ Handle(Geom_BSplineSurface) aSurf2 = \n\ GeomAPI_PointsToBSplineSurface(array3).Surface(); \n\ \n\ GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); \n\ -Quantity_Length dist = ESS.LowerDistance(); \n\ +Standard_Real dist = ESS.LowerDistance(); \n\ gp_Pnt P1,P2; \n\ ESS.NearestPoints(P1,P2); \n\ \n"); diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.h b/samples/mfc/standard/01_Geometry/src/GeomSources.h index 8977ba4d6f..33b9836f46 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.h +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.h @@ -82,7 +82,7 @@ private: DisplayType aDisplayType, const TCollection_AsciiString& aString, Standard_Boolean UpdateViewer = Standard_True, - Quantity_Coefficient Coef = -1); + Standard_Real Coef = -1); static void DisplayPoint(CGeometryDoc* aDoc, const gp_Pnt2d& aPoint, const char* aText, diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp index 9674c8a75a..c7bfa42ad7 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp @@ -256,7 +256,7 @@ void CGeometryDoc::MoveEvent2D(const Standard_Integer x, { if(aView->Viewer()->Grid()->IsActive()) { - Quantity_Length aGridX=0,aGridY=0,aGridZ=0; + Standard_Real aGridX=0,aGridY=0,aGridZ=0; aView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ); //View is not updated automatically in ConvertToGrid aView->Update(); @@ -470,7 +470,7 @@ void CGeometryDoc::Minimize3D() //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef) +void CGeometryDoc::Fit3DViews(Standard_Real Coef) { POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) @@ -488,7 +488,7 @@ void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef) //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef) +void CGeometryDoc::Set3DViewsZoom(const Standard_Real& Coef) { POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h index d2f2a7f64c..bd8f39af0a 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h @@ -20,8 +20,8 @@ public: void Put2DOnTop(bool isMax = true); void Put3DOnTop(bool isMax = true); void Fit2DViews(); - void Set3DViewsZoom(const Quantity_Factor& Coef ); - void Fit3DViews(Quantity_Coefficient Coef); + void Set3DViewsZoom(const Standard_Real& Coef ); + void Fit3DViews(Standard_Real Coef); void simplify(const TopoDS_Shape& aShape); diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView.h b/samples/mfc/standard/01_Geometry/src/GeometryView.h index c3b25297d7..15b94687e5 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryView.h @@ -34,7 +34,7 @@ public: // Implementation public: virtual ~CGeometryView(); - void FitAll(Quantity_Coefficient Coef) + void FitAll(Standard_Real Coef) { if (Coef != -1) myView->FitAll(Coef); diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h index ad5fefceda..b9aa649a31 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h @@ -4,8 +4,6 @@ #include #include - -#include #include #include #include diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h index f31bc9d790..051db72dfc 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h @@ -40,7 +40,7 @@ private: gp_Pnt myPnt; gp_Dir myDir; Standard_Real myLength; - Quantity_Length myArrowLength; + Standard_Real myArrowLength; }; #endif // !defined(AFX_ISession_Direction_H__767C0DB3_A3B0_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx b/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx index e48fb67129..7ffd51f904 100755 --- a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx +++ b/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx @@ -3,7 +3,7 @@ gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) { - V3d_Coordinate XEye,YEye,ZEye,XAt,YAt,ZAt; + Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; aView->Eye(XEye,YEye,ZEye); aView->At(XAt,YAt,ZAt); gp_Pnt EyePoint(XEye,YEye,ZEye); diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp index a74f8252ca..6afea3c7fc 100755 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp @@ -257,7 +257,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape return aGraphicShape; } -void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) +void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -265,7 +265,7 @@ void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY pView->GetViewAt (theX, theY, theZ); } -void OCCDemo_Presentation::SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ) +void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -273,7 +273,7 @@ void OCCDemo_Presentation::SetViewAt (const V3d_Coordinate theX, const V3d_Coord pView->SetViewAt (theX, theY, theZ); } -void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -281,7 +281,7 @@ void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_ pView->GetViewEye(X,Y,Z); } -void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -289,7 +289,7 @@ void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Co pView->SetViewEye(X,Y,Z); } -Quantity_Factor OCCDemo_Presentation::GetViewScale() +Standard_Real OCCDemo_Presentation::GetViewScale() { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -297,7 +297,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale() return pView->GetViewScale(); } -void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) +void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h index d1ffb0a166..bafd2c9410 100755 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h @@ -50,12 +50,12 @@ public: void NextSample() {myIndex++;} void PrevSample() {myIndex--;} virtual void DoSample() = 0; - static void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ); - static void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); - static void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - static void SetViewEye (V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); - static Quantity_Factor GetViewScale(); - static void SetViewScale(Quantity_Factor Coef); + static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); + static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); + static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); + static Standard_Real GetViewScale(); + static void SetViewScale(Standard_Real Coef); static void ResetView(); CViewer3dDoc* getDocument() { return myDoc; } diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp index 2fed30f00f..d4cda7536d 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp @@ -193,7 +193,7 @@ CViewer3dDoc* CViewer3dView::GetDocument() // non-debug version is inline gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) { - V3d_Coordinate XEye,YEye,ZEye,XAt,YAt,ZAt; + Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; aView->Eye(XEye,YEye,ZEye); aView->At(XAt,YAt,ZAt); gp_Pnt EyePoint(XEye,YEye,ZEye); @@ -1140,32 +1140,32 @@ void CViewer3dView::Reset() } } -void CViewer3dView::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const +void CViewer3dView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const { myView->At (theX, theY, theZ); } -void CViewer3dView::SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ) +void CViewer3dView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) { myView->SetAt (theX, theY, theZ); } -void CViewer3dView::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void CViewer3dView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { myView->Eye(X,Y,Z); } -void CViewer3dView::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void CViewer3dView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { myView->SetEye(X,Y,Z); } -Quantity_Factor CViewer3dView::GetViewScale() +Standard_Real CViewer3dView::GetViewScale() { return myView->Scale(); } -void CViewer3dView::SetViewScale(Quantity_Factor Coef) +void CViewer3dView::SetViewScale(Standard_Real Coef) { myView->SetScale(Coef); } diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h index a3d0174470..7d8f474c3c 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h @@ -44,12 +44,12 @@ public: void Redraw() { myView->Redraw(); }; void InitButtons(); void Reset(); - void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const; - void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); - void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - void SetViewEye (const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); - Quantity_Factor GetViewScale(); - void SetViewScale (const Quantity_Factor Coef); + void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; + void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); + void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); + Standard_Real GetViewScale(); + void SetViewScale (const Standard_Real Coef); void FitAll() { myView->FitAll(); myView->ZFitAll(); }; @@ -138,7 +138,7 @@ private: Standard_Integer NbActiveLights; Standard_Boolean myHlrModeIsOn; - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; Handle(V3d_AmbientLight) myCurrent_AmbientLight; Handle(V3d_SpotLight) myCurrent_SpotLight; Handle(V3d_PositionalLight) myCurrent_PositionalLight; diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp index f45d81ddd7..b3660bf155 100755 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp +++ b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp @@ -258,7 +258,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape return aGraphicShape; } /* -void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc) +void OCCDemo_Presentation::GetViewCenter(Standard_Real& Xc, Standard_Real& Yc) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -266,7 +266,7 @@ void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc) pView->GetViewCenter(Xc,Yc); } -void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc) +void OCCDemo_Presentation::SetViewCenter(Standard_Real Xc, Standard_Real Yc) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -274,7 +274,7 @@ void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc) pView->SetViewCenter(Xc,Yc); } -void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -282,7 +282,7 @@ void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_ pView->GetViewEye(X,Y,Z); } -void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -290,7 +290,7 @@ void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Co pView->SetViewEye(X,Y,Z); } -Quantity_Factor OCCDemo_Presentation::GetViewScale() +Standard_Real OCCDemo_Presentation::GetViewScale() { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -298,7 +298,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale() return pView->GetViewScale(); } -void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) +void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h index 5b685d6851..2ee4cae3cd 100755 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h @@ -53,12 +53,12 @@ public: void PrevSample() {myIndex--;} virtual void DoSample() = 0; /* - static void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); - static void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); - static void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - static void SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); - static Quantity_Factor GetViewScale(); - static void SetViewScale(Quantity_Factor Coef); + static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc); + static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc); + static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z); + static Standard_Real GetViewScale(); + static void SetViewScale(Standard_Real Coef); static void ResetView(); */ diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp index aeb79fef84..6ef0c98c69 100644 --- a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp +++ b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp @@ -261,13 +261,13 @@ void CSelectionDialog::Apply() void CSelectionDialog::UpdateProjector() { - V3d_Coordinate DX,DY,DZ,XAt,YAt,ZAt, Vx,Vy,Vz ; + Standard_Real DX,DY,DZ,XAt,YAt,ZAt, Vx,Vy,Vz ; myActiveView->Proj(DX,DY,DZ); myActiveView->At(XAt,YAt,ZAt); myActiveView->Up( Vx,Vy,Vz ); OnDisplay(false); Standard_Boolean IsPerspective = (myActiveView->Type() == V3d_PERSPECTIVE); - Quantity_Length aFocus = 1; + Standard_Real aFocus = 1; Prs3d_Projector aPrs3dProjector(IsPerspective,aFocus,DX,DY,DZ,XAt,YAt,ZAt,Vx,Vy,Vz); HLRAlgo_Projector aProjector = aPrs3dProjector.Projector(); diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.h b/samples/mfc/standard/09_Animation/src/AnimationView3D.h index ae7dfa452f..2000eef9cd 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.h +++ b/samples/mfc/standard/09_Animation/src/AnimationView3D.h @@ -135,7 +135,7 @@ private: Standard_Integer myYmin; Standard_Integer myXmax; Standard_Integer myYmax; - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; Standard_Boolean myHlrModeIsOn; View3D_CurrentAction myCurrentMode; diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp index 9a7ea8eba0..b6c40ccf1d 100755 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp +++ b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp @@ -259,7 +259,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape return aGraphicShape; } -void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) +void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -267,7 +267,7 @@ void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY pView->GetViewAt (theX, theY, theZ); } -void OCCDemo_Presentation::SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ) +void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -275,7 +275,7 @@ void OCCDemo_Presentation::SetViewAt (const V3d_Coordinate theX, const V3d_Coord pView->SetViewAt (theX, theY, theZ); } -void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -283,7 +283,7 @@ void OCCDemo_Presentation::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_ pView->GetViewEye(X,Y,Z); } -void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -291,7 +291,7 @@ void OCCDemo_Presentation::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Co pView->SetViewEye(X,Y,Z); } -Quantity_Factor OCCDemo_Presentation::GetViewScale() +Standard_Real OCCDemo_Presentation::GetViewScale() { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -299,7 +299,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale() return pView->GetViewScale(); } -void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) +void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); @@ -315,7 +315,7 @@ void OCCDemo_Presentation::ResetView() pView->Reset(); } -void OCCDemo_Presentation::TranslateView (const V3d_Coordinate theX, const V3d_Coordinate theY) +void OCCDemo_Presentation::TranslateView (const Standard_Real theX, const Standard_Real theY) { CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h index 89b1f18aee..4164b86ac6 100755 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h @@ -50,14 +50,14 @@ public: void NextSample() {myIndex++;} void PrevSample() {myIndex--;} virtual void DoSample() = 0; - static void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ); - static void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); - static void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - static void SetViewEye (V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); - static Quantity_Factor GetViewScale(); - static void SetViewScale(Quantity_Factor Coef); + static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); + static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); + static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); + static Standard_Real GetViewScale(); + static void SetViewScale(Standard_Real Coef); static void ResetView(); - static void TranslateView (const V3d_Coordinate theX, const V3d_Coordinate theY); + static void TranslateView (const Standard_Real theX, const Standard_Real theY); // place one-time initialization code in this function virtual void Init() {} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp index 5b130b09b5..93c67d86ec 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp @@ -546,32 +546,32 @@ void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) pCmdUI->Enable (myVisMode != VIS_HLR); } -void COCCDemoView::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const +void COCCDemoView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const { myView->At (theX, theY, theZ); } -void COCCDemoView::SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ) +void COCCDemoView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) { myView->SetAt (theX, theY, theZ); } -void COCCDemoView::GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) +void COCCDemoView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) { myView->Eye(X,Y,Z); } -void COCCDemoView::SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z) +void COCCDemoView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) { myView->SetEye(X,Y,Z); } -Quantity_Factor COCCDemoView::GetViewScale() +Standard_Real COCCDemoView::GetViewScale() { return myView->Scale(); } -void COCCDemoView::SetViewScale(Quantity_Factor Coef) +void COCCDemoView::SetViewScale(Standard_Real Coef) { myView->SetScale(Coef); } diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h index 63a930be01..ab626b19bf 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h @@ -32,13 +32,13 @@ public: myView->FitAll(); myView->ZFitAll(); }; - void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const; - void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); - void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); - void SetViewEye (const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); - Quantity_Factor GetViewScale(); - void SetViewScale(const Quantity_Factor Coef); - void Translate (const V3d_Coordinate theX, const V3d_Coordinate theY); + void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; + void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); + void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); + void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); + Standard_Real GetViewScale(); + void SetViewScale(const Standard_Real Coef); + void Translate (const Standard_Real theX, const Standard_Real theY); // Operations @@ -116,7 +116,7 @@ private: Standard_Integer myYmin; Standard_Integer myXmax; Standard_Integer myYmax; - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; private: enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; diff --git a/samples/mfc/standard/Common/OCC_2dView.cpp b/samples/mfc/standard/Common/OCC_2dView.cpp index 79a388dc92..8e757393e5 100755 --- a/samples/mfc/standard/Common/OCC_2dView.cpp +++ b/samples/mfc/standard/Common/OCC_2dView.cpp @@ -607,7 +607,7 @@ void OCC_2dView::MoveEvent2D(const Standard_Integer x, { if(myV2dView->Viewer()->Grid()->IsActive()) { - Quantity_Length aGridX=0,aGridY=0,aGridZ=0; + Standard_Real aGridX=0,aGridY=0,aGridZ=0; myV2dView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ); //View is not updated automatically in ConvertToGrid myV2dView->Update(); diff --git a/samples/mfc/standard/Common/OCC_3dView.h b/samples/mfc/standard/Common/OCC_3dView.h index 69a73f4c7c..e701a2b18f 100755 --- a/samples/mfc/standard/Common/OCC_3dView.h +++ b/samples/mfc/standard/Common/OCC_3dView.h @@ -34,7 +34,7 @@ public: void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); }; void Redraw() { if ( !myView.IsNull() ) myView->Redraw(); }; - void SetZoom ( const Quantity_Factor& Coef ) { myView->SetZoom ( Coef ); }; + void SetZoom ( const Standard_Real& Coef ) { myView->SetZoom ( Coef ); }; Handle(V3d_View)& GetView() { return myView; } // Overrides diff --git a/samples/mfc/standard/Common/OCC_BaseView.h b/samples/mfc/standard/Common/OCC_BaseView.h index c3bf793cbd..357e510eda 100755 --- a/samples/mfc/standard/Common/OCC_BaseView.h +++ b/samples/mfc/standard/Common/OCC_BaseView.h @@ -36,7 +36,7 @@ protected: protected: - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; Standard_Integer myXmin; Standard_Integer myYmin; Standard_Integer myXmax; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp index f28eae1dd7..39b3d677d5 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp @@ -5,9 +5,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape) Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName, - const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Factor aScale) + const Standard_Real X, + const Standard_Real Y, + const Standard_Real aScale) :AIS_TexturedShape(TopoDS_Shape()) { myFilename = aFileName; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h index c828f0516d..f5d69c5507 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h @@ -4,8 +4,6 @@ #include #include -#include -#include #include #include #include @@ -19,13 +17,13 @@ class Sample2D_Image : public AIS_TexturedShape { public: Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName, - const Quantity_Length X = 0.0, - const Quantity_Length Y = 0.0, - const Quantity_Factor aScale = 1.0); -Standard_EXPORT inline virtual void GetCoord(Quantity_Length& X,Quantity_Length& Y) const; -Standard_EXPORT inline virtual void SetCoord(const Quantity_Length X,const Quantity_Length Y) ; -Standard_EXPORT inline Quantity_Factor GetScale() const; -Standard_EXPORT inline void SetScale(const Quantity_Factor aNewScale) ; + const Standard_Real X = 0.0, + const Standard_Real Y = 0.0, + const Standard_Real aScale = 1.0); +Standard_EXPORT inline virtual void GetCoord(Standard_Real& X,Standard_Real& Y) const; +Standard_EXPORT inline virtual void SetCoord(const Standard_Real X,const Standard_Real Y) ; +Standard_EXPORT inline Standard_Real GetScale() const; +Standard_EXPORT inline void SetScale(const Standard_Real aNewScale) ; Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape) @@ -34,33 +32,33 @@ private: protected: TopoDS_Face myFace; TCollection_AsciiString myFilename; -Quantity_Length myX; -Quantity_Length myY; -Quantity_Factor myScale; +Standard_Real myX; +Standard_Real myY; +Standard_Real myScale; }; // other inline functions and methods (like "C++: function call" methods) // -inline void Sample2D_Image::GetCoord(Quantity_Length& X, Quantity_Length& Y) const +inline void Sample2D_Image::GetCoord(Standard_Real& X, Standard_Real& Y) const { X = myX; Y = myY; } -inline void Sample2D_Image::SetCoord(const Quantity_Length X, const Quantity_Length Y) +inline void Sample2D_Image::SetCoord(const Standard_Real X, const Standard_Real Y) { myX = X; myY = Y; } -inline Quantity_Factor Sample2D_Image::GetScale() const +inline Standard_Real Sample2D_Image::GetScale() const { return myScale; } -inline void Sample2D_Image::SetScale(const Quantity_Factor aNewScale) +inline void Sample2D_Image::SetScale(const Standard_Real aNewScale) { myScale = aNewScale; } diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp index 1057b1d01f..0977780c38 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp @@ -5,8 +5,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) // generic marker -Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , - const Quantity_Length theYPosition , +Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, + const Standard_Real theYPosition, const Aspect_TypeOfMarker theMarkerType, const Quantity_Color theColor, const Standard_Real theScaleOrId) @@ -19,8 +19,8 @@ Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , myIndex = theScaleOrId; } -Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , - const Quantity_Length theYPosition , +Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, + const Standard_Real theYPosition, const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, const Aspect_TypeOfMarker theMarkerType, const Quantity_Color theColor, diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h index d500007220..0400b41dc4 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h @@ -18,15 +18,15 @@ Sample2D_CTOM_Ellips public: // Generic marker - Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , - const Quantity_Length theYPosition , + Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, + const Standard_Real theYPosition, const Aspect_TypeOfMarker theMarkerType, const Quantity_Color theColor, const Standard_Real theScaleOrId=5.0); // Polyline marker - Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , - const Quantity_Length theYPosition , + Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, + const Standard_Real theYPosition, const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, const Aspect_TypeOfMarker theMarkerType, const Quantity_Color theColor, @@ -50,13 +50,13 @@ Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /* Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker; -Quantity_Length myXPosition ; -Quantity_Length myYPosition ; -Aspect_TypeOfMarker myMarkerType; -Quantity_Color myColor; -Quantity_Length myWidth ; -Quantity_Length myHeight ; -Standard_Real myIndex ;//myScaleOrId +Standard_Real myXPosition; +Standard_Real myYPosition; +Aspect_TypeOfMarker myMarkerType; +Quantity_Color myColor; +Standard_Real myWidth; +Standard_Real myHeight; +Standard_Real myIndex;//myScaleOrId // specific polyline marker Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints; }; diff --git a/samples/mfc/standard/Common/Resource2D/CircularGrid.cpp b/samples/mfc/standard/Common/Resource2D/CircularGrid.cpp index 10b0e3b12e..aa811c92c6 100755 --- a/samples/mfc/standard/Common/Resource2D/CircularGrid.cpp +++ b/samples/mfc/standard/Common/Resource2D/CircularGrid.cpp @@ -60,9 +60,9 @@ void CCircularGrid::UpdateDialogData() { UpdateData(TRUE); ASSERT(!myViewer.IsNull()); - Quantity_Length XOrigin,YOrigin,RadiusStep; + Standard_Real XOrigin,YOrigin,RadiusStep; Standard_Integer DivisionNumber; - Quantity_PlaneAngle RotationAngle ; + Standard_Real RotationAngle; XOrigin = m_XOrigin ; YOrigin = m_YOrigin ; @@ -101,9 +101,9 @@ void CCircularGrid::OnUpdateCirctGridRadiusStep() void CCircularGrid::UpdateValues() { - Quantity_Length XOrigin,YOrigin,RadiusStep; + Standard_Real XOrigin,YOrigin,RadiusStep; Standard_Integer DivisionNumber; - Quantity_PlaneAngle RotationAngle ; + Standard_Real RotationAngle; myViewer->CircularGridValues(XOrigin, YOrigin, RadiusStep, DivisionNumber, RotationAngle ); m_XOrigin = SavedXOrigin = XOrigin; m_YOrigin = SavedYOrigin = YOrigin; diff --git a/samples/mfc/standard/Common/Resource2D/CircularGrid.h b/samples/mfc/standard/Common/Resource2D/CircularGrid.h index efcfadfbe5..8c6f96b9d3 100755 --- a/samples/mfc/standard/Common/Resource2D/CircularGrid.h +++ b/samples/mfc/standard/Common/Resource2D/CircularGrid.h @@ -57,9 +57,9 @@ protected: private : Handle(V3d_Viewer) myViewer; - Quantity_Length SavedXOrigin,SavedYOrigin,SavedRadiusStep; + Standard_Real SavedXOrigin,SavedYOrigin,SavedRadiusStep; Standard_Integer SavedDivisionNumber; - Quantity_PlaneAngle SavedRotationAngle ; + Standard_Real SavedRotationAngle; }; diff --git a/samples/mfc/standard/Common/Resource2D/RectangularGrid.cpp b/samples/mfc/standard/Common/Resource2D/RectangularGrid.cpp index bfde169de5..b121c23c88 100755 --- a/samples/mfc/standard/Common/Resource2D/RectangularGrid.cpp +++ b/samples/mfc/standard/Common/Resource2D/RectangularGrid.cpp @@ -52,8 +52,8 @@ void CRectangularGrid::UpdateDialogData() { UpdateData(TRUE); ASSERT(!myViewer.IsNull()); - Quantity_Length XOrigin,YOrigin , XStep, YStep; - Quantity_PlaneAngle RotationAngle ; + Standard_Real XOrigin,YOrigin , XStep, YStep; + Standard_Real RotationAngle; XOrigin = m_XOrigin ; YOrigin = m_YOrigin ; XStep = m_XStep ; @@ -97,8 +97,8 @@ void CRectangularGrid::OnCancel() void CRectangularGrid::UpdateValues() { - Quantity_Length XOrigin,YOrigin , XStep, YStep; - Quantity_PlaneAngle RotationAngle ; + Standard_Real XOrigin, YOrigin, XStep, YStep; + Standard_Real RotationAngle; myViewer->RectangularGridValues(XOrigin, YOrigin, XStep, YStep, RotationAngle ); m_XOrigin = SavedXOrigin = XOrigin; m_YOrigin = SavedYOrigin = YOrigin; diff --git a/samples/mfc/standard/Common/Resource2D/RectangularGrid.h b/samples/mfc/standard/Common/Resource2D/RectangularGrid.h index f5cc31e78a..c88dc05e15 100755 --- a/samples/mfc/standard/Common/Resource2D/RectangularGrid.h +++ b/samples/mfc/standard/Common/Resource2D/RectangularGrid.h @@ -58,8 +58,8 @@ protected: private : Handle(V3d_Viewer) myViewer; - Quantity_Length SavedXOrigin,SavedYOrigin , SavedXStep, SavedYStep; - Quantity_PlaneAngle SavedRotationAngle ; + Standard_Real SavedXOrigin, SavedYOrigin, SavedXStep, SavedYStep; + Standard_Real SavedRotationAngle; }; //{{AFX_INSERT_LOCATION}} diff --git a/samples/qt/AndroidQt/AndroidQt_Window.h b/samples/qt/AndroidQt/AndroidQt_Window.h index a152c1f4e9..e2d9001d08 100644 --- a/samples/qt/AndroidQt/AndroidQt_Window.h +++ b/samples/qt/AndroidQt/AndroidQt_Window.h @@ -52,7 +52,7 @@ public: virtual Standard_Boolean IsMapped() const { return Standard_True; } //! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions - virtual Quantity_Ratio Ratio() const { return 1.0; } + virtual Standard_Real Ratio() const { return 1.0; } //! Returns The Window POSITION in PIXEL virtual void Position (Standard_Integer& theX1, diff --git a/samples/qt/Common/src/OcctWindow.cxx b/samples/qt/Common/src/OcctWindow.cxx index d0af32dbf5..423401a27d 100644 --- a/samples/qt/Common/src/OcctWindow.cxx +++ b/samples/qt/Common/src/OcctWindow.cxx @@ -139,10 +139,10 @@ Aspect_TypeOfResize OcctWindow::DoResize() const // function : Ratio // purpose : // ======================================================================= -Quantity_Ratio OcctWindow::Ratio() const +Standard_Real OcctWindow::Ratio() const { QRect aRect = myWidget->rect(); - return Quantity_Ratio( aRect.right() - aRect.left() ) / Quantity_Ratio( aRect.bottom() - aRect.top() ); + return Standard_Real( aRect.right() - aRect.left() ) / Standard_Real( aRect.bottom() - aRect.top() ); } // ======================================================================= diff --git a/samples/qt/Common/src/OcctWindow.h b/samples/qt/Common/src/OcctWindow.h index 5d82e41be4..b111656032 100644 --- a/samples/qt/Common/src/OcctWindow.h +++ b/samples/qt/Common/src/OcctWindow.h @@ -69,7 +69,7 @@ public: //! Returns The Window RATIO equal to the physical //! WIDTH/HEIGHT dimensions. - virtual Quantity_Ratio Ratio() const; + virtual Standard_Real Ratio() const; virtual void Size( Standard_Integer& theWidth, Standard_Integer& theHeight ) const; diff --git a/samples/qt/Common/src/View.h b/samples/qt/Common/src/View.h index 3d49755c6c..6bd672057f 100755 --- a/samples/qt/Common/src/View.h +++ b/samples/qt/Common/src/View.h @@ -137,7 +137,7 @@ private: Standard_Integer myYmin; Standard_Integer myXmax; Standard_Integer myYmax; - Quantity_Factor myCurZoom; + Standard_Real myCurZoom; Standard_Boolean myHlrModeIsOn; QList* myViewActions; QList* myRaytraceActions; diff --git a/src/AIS/AIS.cxx b/src/AIS/AIS.cxx index 087bd812ad..60b6067de3 100644 --- a/src/AIS/AIS.cxx +++ b/src/AIS/AIS.cxx @@ -1132,7 +1132,7 @@ Standard_Boolean AIS::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& { return Standard_False; } - Quantity_Parameter anU, aV; + Standard_Real anU, aV; aProjector.LowerDistanceParameters (anU, aV); theSecondAttach = aSecondSurf->Value (anU, aV); } @@ -1158,7 +1158,7 @@ void AIS::InitLengthBetweenCurvilinearFaces (const TopoDS_Face& theFirstFace, gp_Dir& theDirOnPlane) { GeomAPI_ProjectPointOnSurf aProjector; - Quantity_Parameter aPU, aPV; + Standard_Real aPU, aPV; TopExp_Explorer anExplorer (theFirstFace, TopAbs_VERTEX); @@ -1189,7 +1189,7 @@ void AIS::InitLengthBetweenCurvilinearFaces (const TopoDS_Face& theFirstFace, aProjector.Init (theFirstAttach, theSecondSurf); Standard_Integer aBestPointIndex = 0; - Quantity_Length aMinDist = RealLast(); + Standard_Real aMinDist = RealLast(); gp_Dir aLocalDir; for (Standard_Integer aPointIt = 1; aPointIt <= aProjector.NbPoints(); aPointIt++) diff --git a/src/AIS/AIS_AngleDimension.cxx b/src/AIS/AIS_AngleDimension.cxx index 93cd0edcef..f55900bba9 100644 --- a/src/AIS/AIS_AngleDimension.cxx +++ b/src/AIS/AIS_AngleDimension.cxx @@ -641,7 +641,7 @@ void AIS_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)& /* Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect()); - Quantity_Length anArrowLength = aDimensionAspect->ArrowAspect()->Length(); + Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length(); // prepare label string and compute its geometrical width Standard_Real aLabelWidth; @@ -1414,7 +1414,7 @@ void AIS_AngleDimension::FitTextAlignment (const Prs3d_DimensionTextHorizontalPo { Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); - Quantity_Length anArrowLength = aDimensionAspect->ArrowAspect()->Length(); + Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length(); // Prepare label string and compute its geometrical width Standard_Real aLabelWidth; diff --git a/src/AIS/AIS_Axis.cxx b/src/AIS/AIS_Axis.cxx index 3aa1600972..9123430c89 100644 --- a/src/AIS/AIS_Axis.cxx +++ b/src/AIS/AIS_Axis.cxx @@ -266,7 +266,7 @@ void AIS_Axis::ComputeFields() const gp_Dir& oX = anAxis.XDirection(); const gp_Dir& oY = anAxis.YDirection(); const gp_Dir& oZ = anAxis.Direction(); - Quantity_Length xo,yo,zo,x = 0.,y = 0.,z = 0.; + Standard_Real xo,yo,zo,x = 0.,y = 0.,z = 0.; Orig.Coord(xo,yo,zo); myPfirst.SetCoord(xo,yo,zo); diff --git a/src/AIS/AIS_Dimension.cxx b/src/AIS/AIS_Dimension.cxx index d0a716aac7..0d6d2499bb 100755 --- a/src/AIS/AIS_Dimension.cxx +++ b/src/AIS/AIS_Dimension.cxx @@ -376,8 +376,8 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation { Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation); - Quantity_Length aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); - Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); + Standard_Real aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); + Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); if (myDrawer->DimensionAspect()->IsArrows3d()) { @@ -662,8 +662,8 @@ void AIS_Dimension::DrawLinearDimension (const Handle(Prs3d_Presentation)& thePr Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); // For extensions we need to know arrow size, text size and extension size: get it from aspect - Quantity_Length anArrowLength = aDimensionAspect->ArrowAspect()->Length(); - Standard_Real anExtensionSize = aDimensionAspect->ExtensionSize(); + Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length(); + Standard_Real anExtensionSize = aDimensionAspect->ExtensionSize(); // prepare label string and compute its geometrical width Standard_Real aLabelWidth; TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth); @@ -1308,8 +1308,8 @@ void AIS_Dimension::ComputeSelection (const Handle(SelectMgr_Selection)& theSele aGroupOfSensitives->Add (new Select3D_SensitiveCurve (aSensitiveOwner, aSensitivePnts)); } - Quantity_Length anArrowLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); - Standard_Real anArrowAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); + Standard_Real anArrowLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); + Standard_Real anArrowAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); // sensitives for arrows SelectionGeometry::SeqOfArrows::Iterator anArrowIt (mySelectionGeom.Arrows); @@ -1610,7 +1610,7 @@ void AIS_Dimension::FitTextAlignmentForLinear (const gp_Pnt& theFirstPoint, Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); // For extensions we need to know arrow size, text size and extension size: get it from aspect - Quantity_Length anArrowLength = aDimensionAspect->ArrowAspect()->Length(); + Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length(); // prepare label string and compute its geometrical width Standard_Real aLabelWidth; diff --git a/src/AIS/AIS_LengthDimension.cxx b/src/AIS/AIS_LengthDimension.cxx index cd35bf3175..541dfe5306 100755 --- a/src/AIS/AIS_LengthDimension.cxx +++ b/src/AIS/AIS_LengthDimension.cxx @@ -547,7 +547,7 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t mySecondPoint = AIS::ProjectPointOnPlane (myFirstPoint, aSecondPlane); - Quantity_Parameter anU, aV; + Standard_Real anU, aV; ElSLib::Parameters (aSecondPlane, mySecondPoint, anU, aV); BRepTopAdaptor_FClass2d aClassifier (aSecondFace, Precision::Confusion()); diff --git a/src/AIS/AIS_PlaneTrihedron.cxx b/src/AIS/AIS_PlaneTrihedron.cxx index b2edcb404f..46636b88b1 100644 --- a/src/AIS/AIS_PlaneTrihedron.cxx +++ b/src/AIS/AIS_PlaneTrihedron.cxx @@ -162,7 +162,7 @@ void AIS_PlaneTrihedron::Compute(const Handle(PrsMgr_PresentationManager3d)&, gp_Dir xDir = myPlane->Position().Ax2().XDirection(); gp_Pnt orig = myPlane->Position().Ax2().Location(); - Quantity_Length xo,yo,zo,x,y,z; + Standard_Real xo,yo,zo,x,y,z; orig.Coord( xo, yo, zo ); xDir.Coord( x, y, z ); first.SetCoord( xo, yo, zo ); diff --git a/src/Aspect/Aspect_CircularGrid.cxx b/src/Aspect/Aspect_CircularGrid.cxx index dc9f38df05..8bddca6fb9 100644 --- a/src/Aspect/Aspect_CircularGrid.cxx +++ b/src/Aspect/Aspect_CircularGrid.cxx @@ -23,11 +23,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid) Aspect_CircularGrid::Aspect_CircularGrid - (const Quantity_Length aRadiusStep, + (const Standard_Real aRadiusStep, const Standard_Integer aDivisionNumber, - const Quantity_Length anXOrigin, - const Quantity_Length anYOrigin, - const Quantity_PlaneAngle aRotationAngle) + const Standard_Real anXOrigin, + const Standard_Real anYOrigin, + const Standard_Real aRotationAngle) :Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myRadiusStep(aRadiusStep), myDivisionNumber(aDivisionNumber) { } @@ -47,11 +47,11 @@ void Aspect_CircularGrid::SetDivisionNumber(const Standard_Integer aNumber) { UpdateDisplay(); } void Aspect_CircularGrid::SetGridValues - (const Quantity_Length theXOrigin, - const Quantity_Length theYOrigin, - const Quantity_Length theRadiusStep, + (const Standard_Real theXOrigin, + const Standard_Real theYOrigin, + const Standard_Real theRadiusStep, const Standard_Integer theDivisionNumber, - const Quantity_PlaneAngle theRotationAngle) { + const Standard_Real theRotationAngle) { myXOrigin = theXOrigin; myYOrigin = theYOrigin; Standard_NegativeValue_Raise_if(theRadiusStep < 0., "invalid radius step"); @@ -64,10 +64,10 @@ void Aspect_CircularGrid::SetGridValues Init(); UpdateDisplay(); } -void Aspect_CircularGrid::Compute(const Quantity_Length X, - const Quantity_Length Y, - Quantity_Length& gridX, - Quantity_Length& gridY) const { +void Aspect_CircularGrid::Compute(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const { Standard_Real xo = XOrigin(); Standard_Real yo = YOrigin(); @@ -131,7 +131,7 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X, gridY = yo + sn * radius; } -Quantity_Length Aspect_CircularGrid::RadiusStep() const { +Standard_Real Aspect_CircularGrid::RadiusStep() const { return myRadiusStep; } diff --git a/src/Aspect/Aspect_CircularGrid.hxx b/src/Aspect/Aspect_CircularGrid.hxx index e3a3f3cc70..731d3e1da6 100644 --- a/src/Aspect/Aspect_CircularGrid.hxx +++ b/src/Aspect/Aspect_CircularGrid.hxx @@ -20,75 +20,55 @@ #include #include -#include #include #include #include -#include + class Standard_NegativeValue; class Standard_NullValue; class Standard_NumericError; - class Aspect_CircularGrid; DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid) - class Aspect_CircularGrid : public Aspect_Grid { public: - //! creates a new grid. By default this grid is not //! active. - Standard_EXPORT Aspect_CircularGrid(const Quantity_Length aRadiusStep, const Standard_Integer aDivisionNumber, const Quantity_Length XOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aRotationAngle = 0); + Standard_EXPORT Aspect_CircularGrid(const Standard_Real aRadiusStep, const Standard_Integer aDivisionNumber, const Standard_Real XOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aRotationAngle = 0); //! defines the x step of the grid. - Standard_EXPORT void SetRadiusStep (const Quantity_Length aStep); + Standard_EXPORT void SetRadiusStep (const Standard_Real aStep); //! defines the step of the grid. Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber); - Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle); + Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle); //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const Standard_OVERRIDE; + Standard_EXPORT void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE; //! returns the x step of the grid. - Standard_EXPORT Quantity_Length RadiusStep() const; + Standard_EXPORT Standard_Real RadiusStep() const; //! returns the x step of the grid. Standard_EXPORT Standard_Integer DivisionNumber() const; Standard_EXPORT void Init() Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid) -protected: - - - - private: - - Quantity_Length myRadiusStep; + Standard_Real myRadiusStep; Standard_Integer myDivisionNumber; Standard_Real myAlpha; Standard_Real myA1; Standard_Real myB1; - }; - - - - - - #endif // _Aspect_CircularGrid_HeaderFile diff --git a/src/Aspect/Aspect_Convert.hxx b/src/Aspect/Aspect_Convert.hxx index d1c9f4a14b..048f3be16c 100644 --- a/src/Aspect/Aspect_Convert.hxx +++ b/src/Aspect/Aspect_Convert.hxx @@ -15,7 +15,7 @@ #define _Aspect_Convert_HeaderFile #include -#include +#include //! Auxiliary functions for DCU <-> Pixels conversions. namespace Aspect_Convert @@ -27,16 +27,16 @@ namespace Aspect_Convert } inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, - const Quantity_Parameter theQCenterX, const Quantity_Parameter theQCenterY, - const Quantity_Parameter theQSizeX, const Quantity_Parameter theQSizeY, + const Standard_Real theQCenterX, const Standard_Real theQCenterY, + const Standard_Real theQSizeX, const Standard_Real theQSizeY, Standard_Integer& thePxLeft, Standard_Integer& thePxTop, Standard_Integer& thePxSizeX, Standard_Integer& thePxSizeY) { - Quantity_Parameter theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); + Standard_Real theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); thePxSizeX = Round (theQSizeX * theParentSizeMin); thePxSizeY = Round (theQSizeY * theParentSizeMin); - Standard_Integer thePxCenterX = Round(theQCenterX * Quantity_Parameter (theParentPxSizeX)); - Standard_Integer thePxCenterY = Round((1.0 - theQCenterY) * Quantity_Parameter (theParentPxSizeY)); + Standard_Integer thePxCenterX = Round(theQCenterX * Standard_Real (theParentPxSizeX)); + Standard_Integer thePxCenterY = Round((1.0 - theQCenterY) * Standard_Real (theParentPxSizeY)); thePxLeft = thePxCenterX - thePxSizeX / 2; thePxTop = thePxCenterY - thePxSizeY / 2; } @@ -44,16 +44,16 @@ namespace Aspect_Convert inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, const Standard_Integer thePxLeft, const Standard_Integer thePxTop, const Standard_Integer thePxSizeX, const Standard_Integer thePxSizeY, - Quantity_Parameter& theQCenterX, Quantity_Parameter& theQCenterY, - Quantity_Parameter& theQSizeX, Quantity_Parameter& theQSizeY) + Standard_Real& theQCenterX, Standard_Real& theQCenterY, + Standard_Real& theQSizeX, Standard_Real& theQSizeY) { - Quantity_Parameter theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); - theQSizeX = Quantity_Parameter(thePxSizeX) / theParentSizeMin; - theQSizeY = Quantity_Parameter(thePxSizeY) / theParentSizeMin; + Standard_Real theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); + theQSizeX = Standard_Real(thePxSizeX) / theParentSizeMin; + theQSizeY = Standard_Real(thePxSizeY) / theParentSizeMin; Standard_Integer thePxCenterX = thePxLeft + thePxSizeX / 2; Standard_Integer thePxCenterY = thePxTop + thePxSizeY / 2; - theQCenterX = Quantity_Parameter (thePxCenterX) / Quantity_Parameter (theParentPxSizeX); - theQCenterY = 1.0 - Quantity_Parameter (thePxCenterY) / Quantity_Parameter (theParentPxSizeY); + theQCenterX = Standard_Real (thePxCenterX) / Standard_Real (theParentPxSizeX); + theQCenterY = 1.0 - Standard_Real (thePxCenterY) / Standard_Real (theParentPxSizeY); } inline void FitIn (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, diff --git a/src/Aspect/Aspect_Grid.cxx b/src/Aspect/Aspect_Grid.cxx index 8bc3de3d1b..2deebb59bb 100644 --- a/src/Aspect/Aspect_Grid.cxx +++ b/src/Aspect/Aspect_Grid.cxx @@ -19,9 +19,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared) Aspect_Grid::Aspect_Grid( - const Quantity_Length anXOrigin, - const Quantity_Length anYOrigin, - const Quantity_PlaneAngle anAngle, + const Standard_Real anXOrigin, + const Standard_Real anYOrigin, + const Standard_Real anAngle, const Quantity_Color& aColor, const Quantity_Color& aTenthColor) : myRotationAngle(anAngle), @@ -35,32 +35,32 @@ Aspect_Grid::Aspect_Grid( } -void Aspect_Grid::SetXOrigin(const Quantity_Length anOrigin) { +void Aspect_Grid::SetXOrigin(const Standard_Real anOrigin) { myXOrigin = anOrigin; Init(); UpdateDisplay(); } -void Aspect_Grid::SetYOrigin(const Quantity_Length anOrigin) { +void Aspect_Grid::SetYOrigin(const Standard_Real anOrigin) { myYOrigin = anOrigin; Init(); UpdateDisplay(); } -void Aspect_Grid::SetRotationAngle(const Quantity_Length anAngle){ +void Aspect_Grid::SetRotationAngle(const Standard_Real anAngle){ myRotationAngle = anAngle; Init(); UpdateDisplay(); } -void Aspect_Grid::Rotate(const Quantity_PlaneAngle anAngle) { +void Aspect_Grid::Rotate(const Standard_Real anAngle) { myRotationAngle += anAngle; Init(); UpdateDisplay(); } -void Aspect_Grid::Translate(const Quantity_Length aDx, - const Quantity_Length aDy) { +void Aspect_Grid::Translate(const Standard_Real aDx, + const Standard_Real aDy) { myXOrigin += aDx; myYOrigin += aDy; Init(); @@ -80,10 +80,10 @@ void Aspect_Grid::Colors(Quantity_Color& aColor, aTenthColor = myTenthColor; } -void Aspect_Grid::Hit(const Quantity_Length X, - const Quantity_Length Y, - Quantity_Length& gridX, - Quantity_Length& gridY) const { +void Aspect_Grid::Hit(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const { if (myIsActive) { Compute(X,Y,gridX,gridY);} else{ @@ -99,15 +99,15 @@ void Aspect_Grid::Deactivate () { myIsActive = Standard_False; } -Quantity_Length Aspect_Grid::XOrigin() const { +Standard_Real Aspect_Grid::XOrigin() const { return myXOrigin; } -Quantity_Length Aspect_Grid::YOrigin() const { +Standard_Real Aspect_Grid::YOrigin() const { return myYOrigin; } -Quantity_Length Aspect_Grid::RotationAngle() const { +Standard_Real Aspect_Grid::RotationAngle() const { return myRotationAngle; } diff --git a/src/Aspect/Aspect_Grid.hxx b/src/Aspect/Aspect_Grid.hxx index 6dfc711d7d..234f9da08a 100644 --- a/src/Aspect/Aspect_Grid.hxx +++ b/src/Aspect/Aspect_Grid.hxx @@ -20,39 +20,33 @@ #include #include -#include -#include #include #include #include #include -class Quantity_Color; - class Aspect_Grid; DEFINE_STANDARD_HANDLE(Aspect_Grid, MMgt_TShared) - class Aspect_Grid : public MMgt_TShared { public: - //! defines the x Origin of the grid. - Standard_EXPORT void SetXOrigin (const Quantity_Length anOrigin); + Standard_EXPORT void SetXOrigin (const Standard_Real anOrigin); //! defines the y Origin of the grid. - Standard_EXPORT void SetYOrigin (const Quantity_Length anOrigin); + Standard_EXPORT void SetYOrigin (const Standard_Real anOrigin); //! defines the orientation of the the grid. - Standard_EXPORT void SetRotationAngle (const Quantity_PlaneAngle anAngle); + Standard_EXPORT void SetRotationAngle (const Standard_Real anAngle); //! Rotate the grid from a relative angle. - Standard_EXPORT void Rotate (const Quantity_PlaneAngle anAngle); + Standard_EXPORT void Rotate (const Standard_Real anAngle); //! Translate the grid from a relative distance. - Standard_EXPORT void Translate (const Quantity_Length aDx, const Quantity_Length aDy); + Standard_EXPORT void Translate (const Standard_Real aDx, const Standard_Real aDy); //! Change the colors of the grid Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor); @@ -60,10 +54,10 @@ public: //! returns the point of the grid the closest to the point X,Y //! if the grid is active. If the grid is not active returns //! X,Y. - Standard_EXPORT void Hit (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const; + Standard_EXPORT void Hit (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const; //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT virtual void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const = 0; + Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const = 0; //! activates the grid. The Hit method will return //! gridx and gridx computed according to the steps @@ -75,13 +69,13 @@ public: Standard_EXPORT void Deactivate(); //! returns the x Origin of the grid. - Standard_EXPORT Quantity_Length XOrigin() const; + Standard_EXPORT Standard_Real XOrigin() const; //! returns the x Origin of the grid. - Standard_EXPORT Quantity_Length YOrigin() const; + Standard_EXPORT Standard_Real YOrigin() const; //! returns the x Angle of the grid. - Standard_EXPORT Quantity_PlaneAngle RotationAngle() const; + Standard_EXPORT Standard_Real RotationAngle() const; //! Returns TRUE when the grid is active. Standard_EXPORT Standard_Boolean IsActive() const; @@ -106,41 +100,28 @@ public: Standard_EXPORT virtual void Init() = 0; - - - DEFINE_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared) protected: - //! creates a new grid. By default this grid is not //! active. - Standard_EXPORT Aspect_Grid(const Quantity_Length anXOrigin = 0.0, const Quantity_Length anYOrigin = 0.0, const Quantity_PlaneAngle aRotationAngle = 0, const Quantity_Color& aColor = Quantity_NOC_GRAY50, const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70); + Standard_EXPORT Aspect_Grid(const Standard_Real anXOrigin = 0.0, const Standard_Real anYOrigin = 0.0, const Standard_Real aRotationAngle = 0, const Quantity_Color& aColor = Quantity_NOC_GRAY50, const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70); //! Updates the grid parameters. Standard_EXPORT virtual void UpdateDisplay(); - Quantity_PlaneAngle myRotationAngle; - Quantity_Length myXOrigin; - Quantity_Length myYOrigin; + Standard_Real myRotationAngle; + Standard_Real myXOrigin; + Standard_Real myYOrigin; Quantity_Color myColor; Quantity_Color myTenthColor; - private: - Standard_Boolean myIsActive; Aspect_GridDrawMode myDrawMode; - }; - - - - - - #endif // _Aspect_Grid_HeaderFile diff --git a/src/Aspect/Aspect_NeutralWindow.hxx b/src/Aspect/Aspect_NeutralWindow.hxx index cab0f969b1..d685d3683f 100644 --- a/src/Aspect/Aspect_NeutralWindow.hxx +++ b/src/Aspect/Aspect_NeutralWindow.hxx @@ -65,10 +65,10 @@ public: virtual Standard_Boolean DoMapping() const Standard_OVERRIDE { return Standard_True; } //! Returns window ratio equal to the physical width/height dimensions. - virtual Quantity_Ratio Ratio() const Standard_OVERRIDE + virtual Standard_Real Ratio() const Standard_OVERRIDE { return (myWidth != 0 && myHeight != 0) - ? Quantity_Ratio(myWidth) / Quantity_Ratio(myHeight) + ? Standard_Real(myWidth) / Standard_Real(myHeight) : 1.0; } diff --git a/src/Aspect/Aspect_RectangularGrid.cxx b/src/Aspect/Aspect_RectangularGrid.cxx index cf6824b68a..c470c2c058 100644 --- a/src/Aspect/Aspect_RectangularGrid.cxx +++ b/src/Aspect/Aspect_RectangularGrid.cxx @@ -22,13 +22,13 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid) Aspect_RectangularGrid::Aspect_RectangularGrid( - const Quantity_Length aXStep, - const Quantity_Length aYStep, - const Quantity_Length anXOrigin, - const Quantity_Length anYOrigin, - const Quantity_PlaneAngle aFirstAngle, - const Quantity_PlaneAngle aSecondAngle, - const Quantity_PlaneAngle aRotationAngle) + const Standard_Real aXStep, + const Standard_Real aYStep, + const Standard_Real anXOrigin, + const Standard_Real anYOrigin, + const Standard_Real aFirstAngle, + const Standard_Real aSecondAngle, + const Standard_Real aRotationAngle) :Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myXStep(aXStep),myYStep(aYStep),myFirstAngle(aFirstAngle),mySecondAngle(aSecondAngle) { @@ -43,7 +43,7 @@ Aspect_RectangularGrid::Aspect_RectangularGrid( -void Aspect_RectangularGrid::SetXStep(const Quantity_Length aStep) { +void Aspect_RectangularGrid::SetXStep(const Standard_Real aStep) { Standard_NegativeValue_Raise_if(aStep < 0. , "invalid x step"); Standard_NullValue_Raise_if(aStep == 0. , "invalid y step"); myXStep = aStep; @@ -51,7 +51,7 @@ void Aspect_RectangularGrid::SetXStep(const Quantity_Length aStep) { UpdateDisplay(); } -void Aspect_RectangularGrid::SetYStep(const Quantity_Length aStep) { +void Aspect_RectangularGrid::SetYStep(const Standard_Real aStep) { Standard_NegativeValue_Raise_if(aStep < 0. , "invalid x step"); Standard_NullValue_Raise_if(aStep == 0. , "invalid y step"); myYStep = aStep; @@ -59,9 +59,9 @@ void Aspect_RectangularGrid::SetYStep(const Quantity_Length aStep) { UpdateDisplay(); } -void Aspect_RectangularGrid::SetAngle(const Quantity_PlaneAngle anAngle1, - const Quantity_PlaneAngle anAngle2){ - +void Aspect_RectangularGrid::SetAngle (const Standard_Real anAngle1, + const Standard_Real anAngle2) +{ Standard_NumericError_Raise_if(!CheckAngle (anAngle1,anAngle2 ), "axis are parallel"); myFirstAngle = anAngle1; @@ -71,11 +71,11 @@ void Aspect_RectangularGrid::SetAngle(const Quantity_PlaneAngle anAngle1, } void Aspect_RectangularGrid::SetGridValues( - const Quantity_Length theXOrigin, - const Quantity_Length theYOrigin, - const Quantity_Length theXStep, - const Quantity_Length theYStep, - const Quantity_PlaneAngle theRotationAngle) { + const Standard_Real theXOrigin, + const Standard_Real theYOrigin, + const Standard_Real theXStep, + const Standard_Real theYStep, + const Standard_Real theRotationAngle) { myXOrigin = theXOrigin; myYOrigin = theYOrigin; @@ -90,10 +90,10 @@ void Aspect_RectangularGrid::SetGridValues( UpdateDisplay(); } -void Aspect_RectangularGrid::Compute(const Quantity_Length X, - const Quantity_Length Y, - Quantity_Length& gridX, - Quantity_Length& gridY) const { +void Aspect_RectangularGrid::Compute(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const { Standard_Real D1 = b1 * X - a1 * Y - c1; Standard_Real D2 = b2 * X - a2 * Y - c2; Standard_Integer n1 = Standard_Integer ( Abs(D1)/myXStep + 0.5); @@ -105,19 +105,19 @@ void Aspect_RectangularGrid::Compute(const Quantity_Length X, gridY = ( offset2*b1 - offset1*b2) /Delta; } -Quantity_Length Aspect_RectangularGrid::XStep() const { +Standard_Real Aspect_RectangularGrid::XStep() const { return myXStep; } -Quantity_Length Aspect_RectangularGrid::YStep() const { +Standard_Real Aspect_RectangularGrid::YStep() const { return myYStep; } -Quantity_Length Aspect_RectangularGrid::FirstAngle() const { +Standard_Real Aspect_RectangularGrid::FirstAngle() const { return myFirstAngle; } -Quantity_Length Aspect_RectangularGrid::SecondAngle() const { +Standard_Real Aspect_RectangularGrid::SecondAngle() const { return mySecondAngle; } diff --git a/src/Aspect/Aspect_RectangularGrid.hxx b/src/Aspect/Aspect_RectangularGrid.hxx index cb31b0f438..a00e1b3a9d 100644 --- a/src/Aspect/Aspect_RectangularGrid.hxx +++ b/src/Aspect/Aspect_RectangularGrid.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include @@ -29,11 +27,9 @@ class Standard_NegativeValue; class Standard_NullValue; class Standard_NumericError; - class Aspect_RectangularGrid; DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid) - class Aspect_RectangularGrid : public Aspect_Grid { @@ -44,57 +40,48 @@ public: //! active. //! The first angle is given relatively to the horizontal. //! The second angle is given relatively to the vertical. - Standard_EXPORT Aspect_RectangularGrid(const Quantity_Length aXStep, const Quantity_Length aYStep, const Quantity_Length anXOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aFirstAngle = 0, const Quantity_PlaneAngle aSecondAngle = 0, const Quantity_PlaneAngle aRotationAngle = 0); + Standard_EXPORT Aspect_RectangularGrid(const Standard_Real aXStep, const Standard_Real aYStep, const Standard_Real anXOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aFirstAngle = 0, const Standard_Real aSecondAngle = 0, const Standard_Real aRotationAngle = 0); //! defines the x step of the grid. - Standard_EXPORT void SetXStep (const Quantity_Length aStep); + Standard_EXPORT void SetXStep (const Standard_Real aStep); //! defines the y step of the grid. - Standard_EXPORT void SetYStep (const Quantity_Length aStep); + Standard_EXPORT void SetYStep (const Standard_Real aStep); //! defines the angle of the second network //! the fist angle is given relatively to the horizontal. //! the second angle is given relatively to the vertical. - Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle1, const Quantity_PlaneAngle anAngle2); + Standard_EXPORT void SetAngle (const Standard_Real anAngle1, const Standard_Real anAngle2); - Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle RotationAngle); + Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle); //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const Standard_OVERRIDE; + Standard_EXPORT void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE; //! returns the x step of the grid. - Standard_EXPORT Quantity_Length XStep() const; + Standard_EXPORT Standard_Real XStep() const; //! returns the x step of the grid. - Standard_EXPORT Quantity_Length YStep() const; + Standard_EXPORT Standard_Real YStep() const; //! returns the x Angle of the grid, relatively to the horizontal. - Standard_EXPORT Quantity_PlaneAngle FirstAngle() const; + Standard_EXPORT Standard_Real FirstAngle() const; //! returns the y Angle of the grid, relatively to the vertical. - Standard_EXPORT Quantity_PlaneAngle SecondAngle() const; + Standard_EXPORT Standard_Real SecondAngle() const; Standard_EXPORT void Init() Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid) -protected: - - - - private: - - Standard_EXPORT Standard_Boolean CheckAngle (const Quantity_PlaneAngle alpha, const Quantity_PlaneAngle beta) const; + Standard_EXPORT Standard_Boolean CheckAngle (const Standard_Real alpha, const Standard_Real beta) const; - Quantity_Length myXStep; - Quantity_Length myYStep; - Quantity_PlaneAngle myFirstAngle; - Quantity_PlaneAngle mySecondAngle; + Standard_Real myXStep; + Standard_Real myYStep; + Standard_Real myFirstAngle; + Standard_Real mySecondAngle; Standard_Real a1; Standard_Real b1; Standard_Real c1; @@ -102,13 +89,6 @@ private: Standard_Real b2; Standard_Real c2; - }; - - - - - - #endif // _Aspect_RectangularGrid_HeaderFile diff --git a/src/Aspect/Aspect_Window.hxx b/src/Aspect/Aspect_Window.hxx index 136e1a367d..a54eb293ef 100644 --- a/src/Aspect/Aspect_Window.hxx +++ b/src/Aspect/Aspect_Window.hxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include class Aspect_WindowDefinitionError; @@ -91,7 +90,7 @@ public: //! Returns The Window RATIO equal to the physical //! WIDTH/HEIGHT dimensions - Standard_EXPORT virtual Quantity_Ratio Ratio() const = 0; + Standard_EXPORT virtual Standard_Real Ratio() const = 0; //! Returns The Window POSITION in PIXEL Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const = 0; diff --git a/src/Cocoa/Cocoa_Window.hxx b/src/Cocoa/Cocoa_Window.hxx index 5dfd3778ad..12ad440df2 100644 --- a/src/Cocoa/Cocoa_Window.hxx +++ b/src/Cocoa/Cocoa_Window.hxx @@ -48,8 +48,6 @@ #include #include #include -#include -#include class Aspect_WindowDefinitionError; class Aspect_WindowError; @@ -97,7 +95,7 @@ public: Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE; //! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions - Standard_EXPORT virtual Quantity_Ratio Ratio() const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Ratio() const Standard_OVERRIDE; //! Returns The Window POSITION in PIXEL Standard_EXPORT virtual void Position (Standard_Integer& X1, diff --git a/src/Cocoa/Cocoa_Window.mm b/src/Cocoa/Cocoa_Window.mm index 94bf61c185..24f6545cb5 100644 --- a/src/Cocoa/Cocoa_Window.mm +++ b/src/Cocoa/Cocoa_Window.mm @@ -311,7 +311,7 @@ Standard_Boolean Cocoa_Window::DoMapping() const // function : Ratio // purpose : // ======================================================================= -Quantity_Ratio Cocoa_Window::Ratio() const +Standard_Real Cocoa_Window::Ratio() const { if (myHView == NULL) { @@ -323,7 +323,7 @@ Quantity_Ratio Cocoa_Window::Ratio() const #else NSRect aBounds = [myHView bounds]; #endif - return Quantity_Ratio (aBounds.size.width / aBounds.size.height); + return Standard_Real (aBounds.size.width / aBounds.size.height); } // ======================================================================= diff --git a/src/DsgPrs/DsgPrs.cxx b/src/DsgPrs/DsgPrs.cxx index 9acb962f3b..2b10543f56 100644 --- a/src/DsgPrs/DsgPrs.cxx +++ b/src/DsgPrs/DsgPrs.cxx @@ -234,14 +234,14 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs { GeomAPI_ProjectPointOnSurf ProjectorOnSurface; GeomAPI_ProjectPointOnCurve ProjectorOnCurve; - Quantity_Parameter U1, V1, U2, V2; + Standard_Real U1, V1, U2, V2; Standard_Real LastU, LastV; Standard_Real SquareTolerance = Precision::SquareConfusion(); ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf ); Standard_Integer Index(1); - Quantity_Length MinDist = RealLast(); - Quantity_Parameter LocalU, LocalV; + Standard_Real MinDist = RealLast(); + Standard_Real LocalU, LocalV; gp_Vec D1U, D1V; gp_Dir LocalDir; for (Standard_Integer i = 1; i <= ProjectorOnSurface.NbPoints(); i++) diff --git a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx index 88fcd4f8e4..b86ed2cb48 100644 --- a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx +++ b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -244,7 +243,7 @@ void DsgPrs_ShapeDirPresentation::Add(const Handle(Prs3d_Presentation)& prs, box.Get(c[0],c[1],c[2],c[3],c[4],c[5]); gp_Pnt ptmin(c[0], c[1], c[2]), ptmax(c[3], c[4], c[5]); - Quantity_Length leng = ptmin.Distance(ptmax)/3.; + Standard_Real leng = ptmin.Distance(ptmax)/3.; // mei 19/09/96 extrusion infinie -> taille fixe if (leng >= 20000.) leng = 50; diff --git a/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx b/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx index 3e429ae744..cc21107cd7 100644 --- a/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx +++ b/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx @@ -119,7 +119,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese gp_Pnt PointMin = ElCLib::Value(parmin,L3); gp_Pnt PointMax = ElCLib::Value(parmax,L3); - Quantity_Length X,Y,Z; + Standard_Real X,Y,Z; Standard_Real D1(aAxis.Distance(AttachmentPoint1)),coeff(.5); gp_Pnt pint,Pj_P1,P1Previous = P1; diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index 46b2c98883..2797a911df 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -375,7 +375,7 @@ void Graphic3d_Group::Marker (const Graphic3d_Vertex& thePoint, void Graphic3d_Group::Text (const Standard_CString /*theText*/, const Graphic3d_Vertex& thePoint, const Standard_Real /*theHeight*/, - const Quantity_PlaneAngle /*theAngle*/, + const Standard_Real /*theAngle*/, const Graphic3d_TextPath /*theTp*/, const Graphic3d_HorizontalTextAlignment /*theHta*/, const Graphic3d_VerticalTextAlignment /*theVta*/, @@ -419,7 +419,7 @@ void Graphic3d_Group::Text (const Standard_CString theText, void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_VerticalTextAlignment theVta, @@ -437,7 +437,7 @@ void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, const gp_Ax2& theOrientation, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTP, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, @@ -463,7 +463,7 @@ void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, void Graphic3d_Group::Text (const Standard_CString /*theText*/, const gp_Ax2& theOrientation, const Standard_Real /*theHeight*/, - const Quantity_PlaneAngle /*theAngle*/, + const Standard_Real /*theAngle*/, const Graphic3d_TextPath /*theTp*/, const Graphic3d_HorizontalTextAlignment /*theHta*/, const Graphic3d_VerticalTextAlignment /*theVta*/, diff --git a/src/Graphic3d/Graphic3d_Group.hxx b/src/Graphic3d/Graphic3d_Group.hxx index 88b8144848..807b778a4d 100644 --- a/src/Graphic3d/Graphic3d_Group.hxx +++ b/src/Graphic3d/Graphic3d_Group.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -177,7 +176,7 @@ public: //! Coordinates (NPC) Space). //! AAngle : Orientation of the text //! (with respect to the horizontal). - Standard_EXPORT virtual void Text (const Standard_CString AText, const Graphic3d_Vertex& APoint, const Standard_Real AHeight, const Quantity_PlaneAngle AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax = Standard_True); + Standard_EXPORT virtual void Text (const Standard_CString AText, const Graphic3d_Vertex& APoint, const Standard_Real AHeight, const Standard_Real AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax = Standard_True); //! Creates the string at position . //! The 3D point of attachment is projected. The text is @@ -204,7 +203,7 @@ public: //! Coordinates (NPC) Space). //! AAngle : Orientation of the text //! (with respect to the horizontal). - Standard_EXPORT void Text (const TCollection_ExtendedString& AText, const Graphic3d_Vertex& APoint, const Standard_Real AHeight, const Quantity_PlaneAngle AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax = Standard_True); + Standard_EXPORT void Text (const TCollection_ExtendedString& AText, const Graphic3d_Vertex& APoint, const Standard_Real AHeight, const Standard_Real AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax = Standard_True); //! Creates the string at position . //! The 3D point of attachment is projected. The text is @@ -225,7 +224,7 @@ public: Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, const gp_Ax2& theOrientation, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, @@ -236,7 +235,7 @@ public: Standard_EXPORT virtual void Text (const TCollection_ExtendedString& theText, const gp_Ax2& theOrientation, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, diff --git a/src/Graphic3d/Graphic3d_MarkerImage.cxx b/src/Graphic3d/Graphic3d_MarkerImage.cxx index 7a6c50b32d..8063a1af68 100755 --- a/src/Graphic3d/Graphic3d_MarkerImage.cxx +++ b/src/Graphic3d/Graphic3d_MarkerImage.cxx @@ -90,7 +90,7 @@ Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray (const Stand { for (Standard_Integer aColumn = 0; aColumn < aWidth; aColumn++) { - Quantity_Parameter anAlphaValue; + Standard_Real anAlphaValue; Quantity_Color aColor = myImage->PixelColor (aColumn, aRow, anAlphaValue); Standard_Boolean aBitOn = Standard_False; @@ -179,7 +179,7 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha() myImageAlpha = new Image_PixMap(); myImageAlpha->InitZero (Image_Format_Alpha, myImage->Width(), myImage->Height()); myImageAlpha->SetTopDown (Standard_False); - Quantity_Parameter anAlpha; + Standard_Real anAlpha; for (Standard_Size aRowIter = 0; aRowIter < myImage->Height(); aRowIter++) { Standard_Byte* anImageRow = myImageAlpha->ChangeRow (aRowIter); diff --git a/src/Graphic3d/Graphic3d_MarkerImage.hxx b/src/Graphic3d/Graphic3d_MarkerImage.hxx index 3296dee046..e73e0ddd8a 100755 --- a/src/Graphic3d/Graphic3d_MarkerImage.hxx +++ b/src/Graphic3d/Graphic3d_MarkerImage.hxx @@ -17,7 +17,6 @@ #define _Graphic3d_MarkerImage_H__ #include -#include #include class Image_PixMap; diff --git a/src/IVtkOCC/IVtkOCC_ShapeMesher.cxx b/src/IVtkOCC/IVtkOCC_ShapeMesher.cxx index 241c92c456..fb9afadd88 100644 --- a/src/IVtkOCC/IVtkOCC_ShapeMesher.cxx +++ b/src/IVtkOCC/IVtkOCC_ShapeMesher.cxx @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -456,12 +455,12 @@ static void FindLimits (const Adaptor3d_Curve& theCurve, //! @param [in] theU2 maximal curve parameter value //! @param [out] thePoints the container for generated polyline //================================================================ -static void DrawCurve (Adaptor3d_Curve& theCurve, - const Quantity_Length theDeflection, - const Standard_Real theAngle, - const Standard_Real theU1, - const Standard_Real theU2, - IVtk_Polyline& thePoints) +static void DrawCurve (Adaptor3d_Curve& theCurve, + const Standard_Real theDeflection, + const Standard_Real theAngle, + const Standard_Real theU1, + const Standard_Real theU2, + IVtk_Polyline& thePoints) { switch (theCurve.GetType()) { diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index 34d5723eb5..cb795aca7f 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -350,7 +350,7 @@ bool Image_AlienPixMap::savePPM (const TCollection_AsciiString& theFileName) con // Write pixel data Quantity_Color aColor; - Quantity_Parameter aDummy; + Standard_Real aDummy; Standard_Byte aByte; for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) { diff --git a/src/Image/Image_PixMap.cxx b/src/Image/Image_PixMap.cxx index ff21e1525c..7538d363a1 100644 --- a/src/Image/Image_PixMap.cxx +++ b/src/Image/Image_PixMap.cxx @@ -193,7 +193,7 @@ void Image_PixMap::Clear() // ======================================================================= Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX, const Standard_Integer theY, - Quantity_Parameter& theAlpha) const + Standard_Real& theAlpha) const { if (IsEmpty() || theX < 0 || (Standard_Size )theX >= SizeX() @@ -209,10 +209,7 @@ Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX, { const Standard_ShortReal& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel)), - Quantity_Parameter (Standard_Real (aPixel)), - Quantity_Parameter (Standard_Real (aPixel)), - Quantity_TOC_RGB); + return Quantity_Color (aPixel, aPixel, aPixel, Quantity_TOC_RGB); } case Image_Format_AlphaF: { @@ -224,100 +221,67 @@ Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX, { const Image_ColorRGBAF& aPixel = Value (theY, theX); theAlpha = aPixel.a(); - return Quantity_Color (Quantity_Parameter (aPixel.r()), - Quantity_Parameter (aPixel.g()), - Quantity_Parameter (aPixel.b()), - Quantity_TOC_RGB); + return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB); } case Image_Format_BGRAF: { const Image_ColorBGRAF& aPixel = Value (theY, theX); theAlpha = aPixel.a(); - return Quantity_Color (Quantity_Parameter (aPixel.r()), - Quantity_Parameter (aPixel.g()), - Quantity_Parameter (aPixel.b()), - Quantity_TOC_RGB); + return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB); } case Image_Format_RGBF: { const Image_ColorRGBF& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (aPixel.r()), - Quantity_Parameter (aPixel.g()), - Quantity_Parameter (aPixel.b()), - Quantity_TOC_RGB); + return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB); } case Image_Format_BGRF: { const Image_ColorBGRF& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (aPixel.r()), - Quantity_Parameter (aPixel.g()), - Quantity_Parameter (aPixel.b()), - Quantity_TOC_RGB); + return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB); } case Image_Format_RGBA: { const Image_ColorRGBA& aPixel = Value (theY, theX); theAlpha = Standard_Real (aPixel.a()) / 255.0; - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB); } case Image_Format_BGRA: { const Image_ColorBGRA& aPixel = Value (theY, theX); theAlpha = Standard_Real (aPixel.a()) / 255.0; - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b() / 255.0), Quantity_TOC_RGB); } case Image_Format_RGB32: { const Image_ColorRGB32& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB); } case Image_Format_BGR32: { const Image_ColorBGR32& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB); } case Image_Format_RGB: { const Image_ColorRGB& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB); } case Image_Format_BGR: { const Image_ColorBGR& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0), - Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB); } case Image_Format_Gray: { const Standard_Byte& aPixel = Value (theY, theX); theAlpha = 1.0; // opaque - return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel) / 255.0), - Quantity_Parameter (Standard_Real (aPixel) / 255.0), - Quantity_Parameter (Standard_Real (aPixel) / 255.0), - Quantity_TOC_RGB); + return Quantity_Color (Standard_Real (aPixel) / 255.0, Standard_Real (aPixel) / 255.0, Standard_Real (aPixel) / 255.0, Quantity_TOC_RGB); } case Image_Format_Alpha: { diff --git a/src/Image/Image_PixMap.hxx b/src/Image/Image_PixMap.hxx index 13cb269f76..39f3630229 100644 --- a/src/Image/Image_PixMap.hxx +++ b/src/Image/Image_PixMap.hxx @@ -105,7 +105,7 @@ public: // high-level API inline Quantity_Color PixelColor (const Standard_Integer theX, const Standard_Integer theY) const { - Quantity_Parameter aDummy; + Standard_Real aDummy; return PixelColor (theX, theY, aDummy); } @@ -114,7 +114,7 @@ public: // high-level API //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). Standard_EXPORT Quantity_Color PixelColor (const Standard_Integer theX, const Standard_Integer theY, - Quantity_Parameter& theAlpha) const; + Standard_Real& theAlpha) const; //! Sets the pixel color. This function is relatively slow. //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index c69a3a72be..5fb33ca6ac 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Group.cxx b/src/OpenGl/OpenGl_Group.cxx index 4c53148d57..f539a6867e 100644 --- a/src/OpenGl/OpenGl_Group.cxx +++ b/src/OpenGl/OpenGl_Group.cxx @@ -274,7 +274,7 @@ void OpenGl_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theTy void OpenGl_Group::Text (const Standard_CString theTextUtf, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_VerticalTextAlignment theVta, @@ -304,7 +304,7 @@ void OpenGl_Group::Text (const Standard_CString theTextUtf, void OpenGl_Group::Text (const Standard_CString theTextUtf, const gp_Ax2& theOrientation, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, diff --git a/src/OpenGl/OpenGl_Group.hxx b/src/OpenGl/OpenGl_Group.hxx index 710eb03cce..c845615d48 100644 --- a/src/OpenGl/OpenGl_Group.hxx +++ b/src/OpenGl/OpenGl_Group.hxx @@ -114,7 +114,7 @@ public: Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_VerticalTextAlignment theVta, @@ -124,7 +124,7 @@ public: Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, const gp_Ax2& theOrientation, const Standard_Real theHeight, - const Quantity_PlaneAngle theAngle, + const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, diff --git a/src/Prs3d/Prs3d.cxx b/src/Prs3d/Prs3d.cxx index ccd9cd5f7f..54b7869170 100644 --- a/src/Prs3d/Prs3d.cxx +++ b/src/Prs3d/Prs3d.cxx @@ -31,13 +31,13 @@ //purpose : //======================================================================= Standard_Boolean Prs3d::MatchSegment - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const gp_Pnt& P1, const gp_Pnt& P2, - Quantity_Length& dist) + Standard_Real& dist) { Standard_Real X1,Y1,Z1,X2,Y2,Z2; P1.Coord(X1,Y1,Z1); P2.Coord(X2,Y2,Z2); diff --git a/src/Prs3d/Prs3d.hxx b/src/Prs3d/Prs3d.hxx index ec8fc7d190..0fc819df50 100644 --- a/src/Prs3d/Prs3d.hxx +++ b/src/Prs3d/Prs3d.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -51,7 +50,7 @@ public: //! draws an arrow at a given location, with respect //! to a given direction. - Standard_EXPORT static Standard_Boolean MatchSegment (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const gp_Pnt& p1, const gp_Pnt& p2, Quantity_Length& dist); + Standard_EXPORT static Standard_Boolean MatchSegment (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const gp_Pnt& p1, const gp_Pnt& p2, Standard_Real& dist); //! Computes the absolute deflection value depending on //! the type of deflection in theDrawer: diff --git a/src/Prs3d/Prs3d_Arrow.cxx b/src/Prs3d/Prs3d_Arrow.cxx index a2d0c82d79..cedd23a991 100644 --- a/src/Prs3d/Prs3d_Arrow.cxx +++ b/src/Prs3d/Prs3d_Arrow.cxx @@ -33,8 +33,8 @@ void Prs3d_Arrow::Draw(const Handle(Graphic3d_Group)& theGroup, const gp_Pnt& theLocation, const gp_Dir& theDirection, - const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength) + const Standard_Real theAngle, + const Standard_Real theLength) { Handle(Graphic3d_ArrayOfSegments) aPrimitives = Prs3d_Arrow::DrawSegments(theLocation, theDirection, theAngle, theLength, 15); @@ -47,8 +47,8 @@ void Prs3d_Arrow::Draw(const Handle(Graphic3d_Group)& theGroup, //======================================================================= Handle(Graphic3d_ArrayOfSegments) Prs3d_Arrow::DrawSegments (const gp_Pnt& theLocation, const gp_Dir& theDir, - const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength, + const Standard_Real theAngle, + const Standard_Real theLength, const Standard_Integer theNbSegments) { Handle(Graphic3d_ArrayOfSegments) aSegments = new Graphic3d_ArrayOfSegments (theNbSegments + 1, 2 * (2 * theNbSegments)); diff --git a/src/Prs3d/Prs3d_Arrow.hxx b/src/Prs3d/Prs3d_Arrow.hxx index 69b2f67901..06ce991ec2 100644 --- a/src/Prs3d/Prs3d_Arrow.hxx +++ b/src/Prs3d/Prs3d_Arrow.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class gp_Ax1; class gp_Pnt; @@ -55,8 +53,8 @@ public: //! @param theNbSegments count of points on polyline where location is connected Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation, const gp_Dir& theDir, - const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength, + const Standard_Real theAngle, + const Standard_Real theLength, const Standard_Integer theNbSegments); //! Defines the representation of the arrow. @@ -69,16 +67,16 @@ public: Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup, const gp_Pnt& theLocation, const gp_Dir& theDirection, - const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength); + const Standard_Real theAngle, + const Standard_Real theLength); //! Alias to another method Draw() for backward compatibility. Standard_DEPRECATED("Prs3d_Arrow::Draw() taking Graphic3d_Group should be used instead") static void Draw (const Handle(Prs3d_Presentation)& thePrs, const gp_Pnt& theLocation, const gp_Dir& theDirection, - const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength) + const Standard_Real theAngle, + const Standard_Real theLength) { Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength); } diff --git a/src/Prs3d/Prs3d_ArrowAspect.cxx b/src/Prs3d/Prs3d_ArrowAspect.cxx index f1eabad73d..dcd3b0204c 100644 --- a/src/Prs3d/Prs3d_ArrowAspect.cxx +++ b/src/Prs3d/Prs3d_ArrowAspect.cxx @@ -34,8 +34,8 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect() // function : Prs3d_ArrowAspect // purpose : // ======================================================================= -Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Quantity_PlaneAngle theAngle, - const Quantity_Length theLength) +Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Standard_Real theAngle, + const Standard_Real theLength) : myArrowAspect (new Graphic3d_AspectLine3d (Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0)), myAngle (theAngle), myLength(theLength) @@ -59,7 +59,7 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Handle(Graphic3d_AspectLine3d)& theA // function : SetAngle // purpose : // ======================================================================= -void Prs3d_ArrowAspect::SetAngle (const Quantity_PlaneAngle theAngle) +void Prs3d_ArrowAspect::SetAngle (const Standard_Real theAngle) { Prs3d_InvalidAngle_Raise_if (theAngle <= 0.0 || theAngle >= M_PI / 2.0, "Prs3d_ArrowAspect::SetAngle() - angle out of range"); diff --git a/src/Prs3d/Prs3d_ArrowAspect.hxx b/src/Prs3d/Prs3d_ArrowAspect.hxx index 42c5e99ffe..6489b5a0db 100644 --- a/src/Prs3d/Prs3d_ArrowAspect.hxx +++ b/src/Prs3d/Prs3d_ArrowAspect.hxx @@ -19,8 +19,6 @@ #include #include -#include -#include //! A framework for displaying arrows in representations of dimensions and relations. class Prs3d_ArrowAspect : public Prs3d_BasicAspect @@ -37,21 +35,21 @@ public: //! Constructs a framework to display an arrow with a //! shaft of the length aLength and having a head with //! sides at the angle anAngle from each other. - Standard_EXPORT Prs3d_ArrowAspect(const Quantity_PlaneAngle anAngle, const Quantity_Length aLength); + Standard_EXPORT Prs3d_ArrowAspect(const Standard_Real anAngle, const Standard_Real aLength); Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect); //! defines the angle of the arrows. - Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle); + Standard_EXPORT void SetAngle (const Standard_Real anAngle); //! returns the current value of the angle used when drawing an arrow. - Quantity_PlaneAngle Angle() const { return myAngle; } + Standard_Real Angle() const { return myAngle; } //! Defines the length of the arrows. - void SetLength (const Quantity_Length theLength) { myLength = theLength; } + void SetLength (const Standard_Real theLength) { myLength = theLength; } //! Returns the current value of the length used when drawing an arrow. - Quantity_Length Length() const { return myLength; } + Standard_Real Length() const { return myLength; } void SetColor (const Quantity_Color& theColor) { myArrowAspect->SetColor (theColor); } @@ -62,8 +60,8 @@ public: protected: Handle(Graphic3d_AspectLine3d) myArrowAspect; - Quantity_PlaneAngle myAngle; - Quantity_Length myLength; + Standard_Real myAngle; + Standard_Real myLength; }; diff --git a/src/Prs3d/Prs3d_Drawer.cxx b/src/Prs3d/Prs3d_Drawer.cxx index 0691f177fe..7691ae2e71 100644 --- a/src/Prs3d/Prs3d_Drawer.cxx +++ b/src/Prs3d/Prs3d_Drawer.cxx @@ -118,7 +118,7 @@ void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfD // purpose : // ======================================================================= -void Prs3d_Drawer::SetMaximalChordialDeviation (const Quantity_Length theChordialDeviation) +void Prs3d_Drawer::SetMaximalChordialDeviation (const Standard_Real theChordialDeviation) { myHasOwnChordialDeviation = Standard_True; myChordialDeviation = theChordialDeviation; diff --git a/src/Prs3d/Prs3d_Drawer.hxx b/src/Prs3d/Prs3d_Drawer.hxx index 56acba3908..5c0eed3e24 100644 --- a/src/Prs3d/Prs3d_Drawer.hxx +++ b/src/Prs3d/Prs3d_Drawer.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -76,11 +75,11 @@ public: //! Prs3d_DeflectionCurve //! Prs3d_WFDeflectionSurface //! Prs3d_WFDeflectionRestrictedFace - Standard_EXPORT void SetMaximalChordialDeviation (const Quantity_Length theChordialDeviation); + Standard_EXPORT void SetMaximalChordialDeviation (const Standard_Real theChordialDeviation); //! Returns the maximal chordal deviation. The default value is 0.1. //! Drawings of curves or patches are made with respect to an absolute maximal chordal deviation. - Quantity_Length MaximalChordialDeviation() const + Standard_Real MaximalChordialDeviation() const { return HasOwnMaximalChordialDeviation() || myLink.IsNull() ? myChordialDeviation @@ -855,7 +854,7 @@ protected: Standard_Boolean myHasOwnNbPoints; Standard_Real myMaximalParameterValue; Standard_Boolean myHasOwnMaximalParameterValue; - Quantity_Length myChordialDeviation; + Standard_Real myChordialDeviation; Standard_Boolean myHasOwnChordialDeviation; Aspect_TypeOfDeflection myTypeOfDeflection; Standard_Boolean myHasOwnTypeOfDeflection; diff --git a/src/Prs3d/Prs3d_PlaneAspect.hxx b/src/Prs3d/Prs3d_PlaneAspect.hxx index 54cc3f3f24..4833059bc7 100644 --- a/src/Prs3d/Prs3d_PlaneAspect.hxx +++ b/src/Prs3d/Prs3d_PlaneAspect.hxx @@ -17,8 +17,6 @@ #ifndef _Prs3d_PlaneAspect_HeaderFile #define _Prs3d_PlaneAspect_HeaderFile -#include -#include #include //! A framework to define the display of planes. @@ -39,24 +37,24 @@ public: //! Returns the settings for displaying an arrow. const Handle(Prs3d_LineAspect)& ArrowAspect() const { return myArrowAspect; } - void SetArrowsLength (const Quantity_Length theLength) { myArrowsLength = theLength; } + void SetArrowsLength (const Standard_Real theLength) { myArrowsLength = theLength; } //! Returns the length of the arrow shaft used in the display of arrows. - Quantity_Length ArrowsLength() const { return myArrowsLength; } + Standard_Real ArrowsLength() const { return myArrowsLength; } //! Sets the angle of the arrowhead used in the display of planes. - void SetArrowsSize (const Quantity_Length theSize) { myArrowsSize = theSize; } + void SetArrowsSize (const Standard_Real theSize) { myArrowsSize = theSize; } //! Returns the size of arrows used in the display of planes. - Quantity_Length ArrowsSize() const { return myArrowsSize; } + Standard_Real ArrowsSize() const { return myArrowsSize; } //! Sets the angle of the arrowhead used in the display //! of arrows involved in the presentation of planes. - void SetArrowsAngle (const Quantity_PlaneAngle theAngle) { myArrowsAngle = theAngle; } + void SetArrowsAngle (const Standard_Real theAngle) { myArrowsAngle = theAngle; } //! Returns the angle of the arrowhead used in the //! display of arrows involved in the presentation of planes. - Quantity_PlaneAngle ArrowsAngle() const { return myArrowsAngle; } + Standard_Real ArrowsAngle() const { return myArrowsAngle; } //! Sets the display attributes defined in DisplayCenterArrow to active. void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; } @@ -80,35 +78,35 @@ public: //! Returns true if the display of isoparameters is allowed. Standard_Boolean DisplayIso() const { return myDrawIso; } - void SetPlaneLength (const Quantity_Length theLX, const Quantity_Length theLY) + void SetPlaneLength (const Standard_Real theLX, const Standard_Real theLY) { myPlaneXLength = theLX; myPlaneYLength = theLY; } //! Returns the length of the x axis used in the display of planes. - Quantity_Length PlaneXLength() const { return myPlaneXLength; } + Standard_Real PlaneXLength() const { return myPlaneXLength; } //! Returns the length of the y axis used in the display of planes. - Quantity_Length PlaneYLength() const { return myPlaneYLength; } + Standard_Real PlaneYLength() const { return myPlaneYLength; } //! Sets the distance L between isoparameters used in the display of planes. - void SetIsoDistance (const Quantity_Length theL) { myIsoDistance = theL; } + void SetIsoDistance (const Standard_Real theL) { myIsoDistance = theL; } //! Returns the distance between isoparameters used in the display of planes. - Quantity_Length IsoDistance() const { return myIsoDistance; } + Standard_Real IsoDistance() const { return myIsoDistance; } protected: Handle(Prs3d_LineAspect) myEdgesAspect; Handle(Prs3d_LineAspect) myIsoAspect; Handle(Prs3d_LineAspect) myArrowAspect; - Quantity_Length myArrowsLength; - Quantity_Length myArrowsSize; - Quantity_PlaneAngle myArrowsAngle; - Quantity_Length myPlaneXLength; - Quantity_Length myPlaneYLength; - Quantity_Length myIsoDistance; + Standard_Real myArrowsLength; + Standard_Real myArrowsSize; + Standard_Real myArrowsAngle; + Standard_Real myPlaneXLength; + Standard_Real myPlaneYLength; + Standard_Real myIsoDistance; Standard_Boolean myDrawCenterArrow; Standard_Boolean myDrawEdgesArrows; Standard_Boolean myDrawEdges; diff --git a/src/Prs3d/Prs3d_Point.hxx b/src/Prs3d/Prs3d_Point.hxx index c4e20228d2..4d2b25bc99 100755 --- a/src/Prs3d/Prs3d_Point.hxx +++ b/src/Prs3d/Prs3d_Point.hxx @@ -14,14 +14,12 @@ #ifndef _Prs3d_Point_H__ #define _Prs3d_Point_H__ - #include #include #include #include #include #include -#include template class Prs3d_Point : Prs3d_Root @@ -34,7 +32,7 @@ private: (const AnyPoint& thePoint, const Handle(Graphic3d_Group) theGroup) { - Quantity_Length aX,aY,aZ; + Standard_Real aX,aY,aZ; PointTool::Coord(thePoint,aX,aY,aZ); Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1); anArrayOfPoints->AddVertex (aX, aY, aZ); @@ -54,15 +52,16 @@ public: Standard_EXPORT static Standard_Boolean Match (const AnyPoint& thePoint, - const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance) + const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance) { - Quantity_Length aX,aY,aZ; + Standard_Real aX,aY,aZ; PointTool::Coord(thePoint, aX, aY, aZ); return Sqrt((theX - aX)*(theX - aX) + (theY - aY)*(theY - aY) + (theZ - aZ)*(theZ - aZ)) <= theDistance; } }; + #endif diff --git a/src/Prs3d/Prs3d_Presentation.hxx b/src/Prs3d/Prs3d_Presentation.hxx index a09ea2d6a2..09c5386be1 100644 --- a/src/Prs3d/Prs3d_Presentation.hxx +++ b/src/Prs3d/Prs3d_Presentation.hxx @@ -22,7 +22,7 @@ #include #include -#include + class Prs3d_Root; class Graphic3d_StructureManager; class Graphic3d_Structure; @@ -30,7 +30,6 @@ class Graphic3d_DataStructureManager; class Geom_Transformation; class Graphic3d_Group; - class Prs3d_Presentation; DEFINE_STANDARD_HANDLE(Prs3d_Presentation, Graphic3d_Structure) diff --git a/src/Prs3d/Prs3d_Projector.cxx b/src/Prs3d/Prs3d_Projector.cxx index 1c9eed824f..c40f5fdcd0 100644 --- a/src/Prs3d/Prs3d_Projector.cxx +++ b/src/Prs3d/Prs3d_Projector.cxx @@ -29,16 +29,16 @@ Prs3d_Projector::Prs3d_Projector (const HLRAlgo_Projector& HLPr): MyProjector(HL Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers, - const Quantity_Length Focus, - const Quantity_Length DX, - const Quantity_Length DY, - const Quantity_Length DZ, - const Quantity_Length XAt, - const Quantity_Length YAt, - const Quantity_Length ZAt, - const Quantity_Length XUp, - const Quantity_Length YUp, - const Quantity_Length ZUp) + const Standard_Real Focus, + const Standard_Real DX, + const Standard_Real DY, + const Standard_Real DZ, + const Standard_Real XAt, + const Standard_Real YAt, + const Standard_Real ZAt, + const Standard_Real XUp, + const Standard_Real YUp, + const Standard_Real ZUp) { gp_Pnt At (XAt,YAt,ZAt); gp_Dir Zpers (DX,DY,DZ); diff --git a/src/Prs3d/Prs3d_Projector.hxx b/src/Prs3d/Prs3d_Projector.hxx index 3e8bb232e1..573242b605 100644 --- a/src/Prs3d/Prs3d_Projector.hxx +++ b/src/Prs3d/Prs3d_Projector.hxx @@ -23,9 +23,6 @@ #include #include #include -#include -class HLRAlgo_Projector; - class Prs3d_Projector; DEFINE_STANDARD_HANDLE(Prs3d_Projector, MMgt_TShared) @@ -51,33 +48,17 @@ public: //! - XAt, YAt and ZAt are the coordinates of the view point; //! - XUp, YUp and ZUp are the coordinates of the //! vertical direction vector. - Standard_EXPORT Prs3d_Projector(const Standard_Boolean Pers, const Quantity_Length Focus, const Quantity_Length DX, const Quantity_Length DY, const Quantity_Length DZ, const Quantity_Length XAt, const Quantity_Length YAt, const Quantity_Length ZAt, const Quantity_Length XUp, const Quantity_Length YUp, const Quantity_Length ZUp); + Standard_EXPORT Prs3d_Projector(const Standard_Boolean Pers, const Standard_Real Focus, const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, const Standard_Real XAt, const Standard_Real YAt, const Standard_Real ZAt, const Standard_Real XUp, const Standard_Real YUp, const Standard_Real ZUp); //! Returns a projector object for use in a hidden line removal algorithm. Standard_EXPORT HLRAlgo_Projector Projector() const; - - - DEFINE_STANDARD_RTTIEXT(Prs3d_Projector,MMgt_TShared) -protected: - - - - private: - HLRAlgo_Projector MyProjector; - }; - - - - - - #endif // _Prs3d_Projector_HeaderFile diff --git a/src/Prs3d/Prs3d_TextAspect.hxx b/src/Prs3d/Prs3d_TextAspect.hxx index 9c986a5e2f..34fb410b02 100644 --- a/src/Prs3d/Prs3d_TextAspect.hxx +++ b/src/Prs3d/Prs3d_TextAspect.hxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include //! Defines the attributes when displaying a text. class Prs3d_TextAspect : public Prs3d_BasicAspect @@ -46,19 +44,19 @@ public: void SetHeightWidthRatio (const Standard_Real theRatio) { myTextAspect->SetExpansionFactor (theRatio); } //! Sets the length of the box which text will occupy. - void SetSpace (const Quantity_Length theSpace) { myTextAspect->SetSpace (theSpace); } + void SetSpace (const Standard_Real theSpace) { myTextAspect->SetSpace (theSpace); } //! Sets the height of the text. void SetHeight (const Standard_Real theHeight) { myHeight = theHeight; } //! Sets the angle - void SetAngle (const Quantity_PlaneAngle theAngle) { myAngle = theAngle; } + void SetAngle (const Standard_Real theAngle) { myAngle = theAngle; } //! Returns the height of the text box. Standard_Real Height() const { return myHeight; } //! Returns the angle - Quantity_PlaneAngle Angle() const { return myAngle; } + Standard_Real Angle() const { return myAngle; } //! Sets horizontal alignment of text. void SetHorizontalJustification (const Graphic3d_HorizontalTextAlignment theJustification) { myHorizontalJustification = theJustification; } @@ -108,7 +106,7 @@ public: protected: Handle(Graphic3d_AspectText3d) myTextAspect; - Quantity_PlaneAngle myAngle; + Standard_Real myAngle; Standard_Real myHeight; Graphic3d_HorizontalTextAlignment myHorizontalJustification; Graphic3d_VerticalTextAlignment myVerticalJustification; diff --git a/src/PrsMgr/PrsMgr_Presentation.hxx b/src/PrsMgr/PrsMgr_Presentation.hxx index 02c3d9fe20..789cd6ab72 100644 --- a/src/PrsMgr/PrsMgr_Presentation.hxx +++ b/src/PrsMgr/PrsMgr_Presentation.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class PrsMgr_PresentationManager; class PrsMgr_Prs; diff --git a/src/QABugs/QABugs_6.cxx b/src/QABugs/QABugs_6.cxx index 73f03e4742..6a72be8c9a 100644 --- a/src/QABugs/QABugs_6.cxx +++ b/src/QABugs/QABugs_6.cxx @@ -103,7 +103,7 @@ static Standard_Integer OCC281bug (Draw_Interpretor& di, Standard_Integer argc, if (aViewer->IsActive()) { if (aViewer->GridEcho()) { - V3d_Coordinate X,Y,Z; + Standard_Real X,Y,Z; aView->ConvertToGrid(x,y,X,Y,Z); } else { di << "NOT aViewer->GridEcho()\n"; diff --git a/src/Quantity/Quantity_Color.cxx b/src/Quantity/Quantity_Color.cxx index 53334a483b..9c07c29c41 100644 --- a/src/Quantity/Quantity_Color.cxx +++ b/src/Quantity/Quantity_Color.cxx @@ -31,7 +31,7 @@ void call_rgbhls(float r, float g, float b, float& h, float& l, float& s); #define RGBHLS_H_UNDEFINED -1.0 -static Quantity_Parameter TheEpsilon = 0.0001; +static Standard_Real TheEpsilon = 0.0001; // -- les composantes RGB // MyRed : Standard_ShortReal; @@ -78,7 +78,7 @@ Quantity_Color::Quantity_Color (const Quantity_NameOfColor AName) { (AName, Quantity_TOC_RGB, MyRed, MyGreen, MyBlue); } -Quantity_Color::Quantity_Color (const Quantity_Parameter R1, const Quantity_Parameter R2, const Quantity_Parameter R3, const Quantity_TypeOfColor AType) { +Quantity_Color::Quantity_Color (const Standard_Real R1, const Standard_Real R2, const Standard_Real R3, const Quantity_TypeOfColor AType) { switch (AType) { @@ -159,7 +159,7 @@ void Quantity_Color::SetValues (const Quantity_NameOfColor AName) { } -void Quantity_Color::SetValues (const Quantity_Parameter R1, const Quantity_Parameter R2, const Quantity_Parameter R3, const Quantity_TypeOfColor AType) { +void Quantity_Color::SetValues (const Standard_Real R1, const Standard_Real R2, const Standard_Real R3, const Quantity_TypeOfColor AType) { switch (AType) { @@ -234,15 +234,15 @@ Standard_Real R2, G2, B2; } -void Quantity_Color::Delta (const Quantity_Color& AColor, Quantity_Parameter& DC, Quantity_Parameter& DI) const { +void Quantity_Color::Delta (const Quantity_Color& AColor, Standard_Real& DC, Standard_Real& DI) const { Standard_ShortReal MyHue, MyLight, MySaturation; Quantity_Color::rgbhls (MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation); - DC = Quantity_Parameter (MySaturation - AColor.Saturation ()); - DI = Quantity_Parameter (MyLight - AColor.Light ()); + DC = Standard_Real (MySaturation - AColor.Saturation ()); + DI = Standard_Real (MyLight - AColor.Light ()); } @@ -292,19 +292,18 @@ Standard_Integer Begin, End, Current; } -Quantity_Parameter Quantity_Color::Epsilon () { - - return (TheEpsilon); - +Standard_Real Quantity_Color::Epsilon() +{ + return TheEpsilon; } -void Quantity_Color::SetEpsilon (const Quantity_Parameter AnEpsilon) { +void Quantity_Color::SetEpsilon (const Standard_Real AnEpsilon) { TheEpsilon = AnEpsilon; } -Quantity_NameOfColor Quantity_Color::Name (const Quantity_Parameter R, const Quantity_Parameter G, const Quantity_Parameter B) { +Quantity_NameOfColor Quantity_Color::Name (const Standard_Real R, const Standard_Real G, const Standard_Real B) { if ( R < 0. || R > 1. || G < 0. || G > 1. || @@ -317,25 +316,25 @@ Quantity_Color AColor (R, G, B, Quantity_TOC_RGB); // Couleur definie en RGB. } -Quantity_Parameter Quantity_Color::Red () const { +Standard_Real Quantity_Color::Red () const { return (Standard_Real (MyRed)); } -Quantity_Parameter Quantity_Color::Green () const { +Standard_Real Quantity_Color::Green () const { return (Standard_Real (MyGreen)); } -Quantity_Parameter Quantity_Color::Blue () const { +Standard_Real Quantity_Color::Blue () const { return (Standard_Real (MyBlue)); } -Quantity_Parameter Quantity_Color::Hue () const { +Standard_Real Quantity_Color::Hue () const { Standard_ShortReal MyHue, MyLight, MySaturation; @@ -346,7 +345,7 @@ Standard_ShortReal MyHue, MyLight, MySaturation; } -Quantity_Parameter Quantity_Color::Light () const { +Standard_Real Quantity_Color::Light () const { Standard_ShortReal MyHue, MyLight, MySaturation; @@ -357,7 +356,7 @@ Standard_ShortReal MyHue, MyLight, MySaturation; } -Quantity_Parameter Quantity_Color::Saturation () const { +Standard_Real Quantity_Color::Saturation () const { Standard_ShortReal MyHue, MyLight, MySaturation; @@ -368,15 +367,15 @@ Standard_ShortReal MyHue, MyLight, MySaturation; } -void Quantity_Color::Values (Quantity_Parameter& R1, Quantity_Parameter& R2, Quantity_Parameter& R3, const Quantity_TypeOfColor AType) const { +void Quantity_Color::Values (Standard_Real& R1, Standard_Real& R2, Standard_Real& R3, const Quantity_TypeOfColor AType) const { switch (AType) { case Quantity_TOC_RGB : - R1 = Quantity_Parameter (MyRed); - R2 = Quantity_Parameter (MyGreen); - R3 = Quantity_Parameter (MyBlue); + R1 = Standard_Real (MyRed); + R2 = Standard_Real (MyGreen); + R3 = Standard_Real (MyBlue); break; case Quantity_TOC_HLS : @@ -385,16 +384,16 @@ void Quantity_Color::Values (Quantity_Parameter& R1, Quantity_Parameter& R2, Qua Quantity_Color::rgbhls (MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation); - R1 = Quantity_Parameter (MyHue); - R2 = Quantity_Parameter (MyLight); - R3 = Quantity_Parameter (MySaturation); + R1 = Standard_Real (MyHue); + R2 = Standard_Real (MyLight); + R3 = Standard_Real (MySaturation); } break; } } -void Quantity_Color::RgbHls (const Quantity_Parameter R, const Quantity_Parameter G, const Quantity_Parameter B, Quantity_Parameter& H, Quantity_Parameter& L, Quantity_Parameter& S) { +void Quantity_Color::RgbHls (const Standard_Real R, const Standard_Real G, const Standard_Real B, Standard_Real& H, Standard_Real& L, Standard_Real& S) { Standard_ShortReal HH, LL, SS; @@ -403,13 +402,13 @@ Standard_ShortReal HH, LL, SS; Standard_ShortReal (B), HH, LL, SS); - H = Quantity_Parameter (HH); - L = Quantity_Parameter (LL); - S = Quantity_Parameter (SS); + H = Standard_Real (HH); + L = Standard_Real (LL); + S = Standard_Real (SS); } -void Quantity_Color::HlsRgb (const Quantity_Parameter H, const Quantity_Parameter L, const Quantity_Parameter S, Quantity_Parameter& R, Quantity_Parameter& G, Quantity_Parameter& B) { +void Quantity_Color::HlsRgb (const Standard_Real H, const Standard_Real L, const Standard_Real S, Standard_Real& R, Standard_Real& G, Standard_Real& B) { Standard_ShortReal RR, GG, BB; @@ -418,9 +417,9 @@ Standard_ShortReal RR, GG, BB; Standard_ShortReal (S), RR, GG, BB); - R = Quantity_Parameter (RR); - G = Quantity_Parameter (GG); - B = Quantity_Parameter (BB); + R = Standard_Real (RR); + G = Standard_Real (GG); + B = Standard_Real (BB); } @@ -462,10 +461,10 @@ void Quantity_Color::Color2argb (const Quantity_Color& theColor, void Quantity_Color::Argb2color (const Standard_Integer theARGB, Quantity_Color& theColor) { - const Quantity_Parameter aColor[3] = { - static_cast ((theARGB & 0xff0000) >> 16), - static_cast ((theARGB & 0x00ff00) >> 8), - static_cast ((theARGB & 0x0000ff)) + const Standard_Real aColor[3] = { + static_cast ((theARGB & 0xff0000) >> 16), + static_cast ((theARGB & 0x00ff00) >> 8), + static_cast ((theARGB & 0x0000ff)) }; theColor.SetValues(aColor[0] / 255.0, aColor[1] / 255.0, aColor[2] / 255.0, Quantity_TOC_RGB); @@ -3626,9 +3625,9 @@ void TestOfColor (); void TestOfColor () { -Quantity_Parameter H, L, S; -Quantity_Parameter R, G, B; -Quantity_Parameter DC, DI; +Standard_Real H, L, S; +Standard_Real R, G, B; +Standard_Real DC, DI; Standard_Integer i; cout << "definition color tests\n----------------------\n"; @@ -3643,7 +3642,7 @@ const char *const cyan = "YELLOW"; const char *const blue = "ROYALBLUE2"; const char *const brown = "SANDYBROWN"; -Quantity_Parameter RR, GG, BB; +Standard_Real RR, GG, BB; const Standard_Real DELTA = 1.0e-4; diff --git a/src/Quantity/Quantity_Color.hxx b/src/Quantity/Quantity_Color.hxx index eacc3cad7b..544b2ee027 100644 --- a/src/Quantity/Quantity_Color.hxx +++ b/src/Quantity/Quantity_Color.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -71,9 +70,9 @@ public: //! Value -1.0 is a special value reserved for grayscale color (S should be 0.0). //! - theR2 is the Lightness (L) within range [0.0; 1.0] //! - theR3 is the Saturation (S) within range [0.0; 1.0] - Standard_EXPORT Quantity_Color (const Quantity_Parameter theR1, - const Quantity_Parameter theR2, - const Quantity_Parameter theR3, + Standard_EXPORT Quantity_Color (const Standard_Real theR1, + const Standard_Real theR2, + const Standard_Real theR3, const Quantity_TypeOfColor theType); //! Define color from RGB values. @@ -110,9 +109,9 @@ public: //! -1.0 is a special value reserved for grayscale color (S should be 0.0). //! - theR2 is the Lightness (L) within range [0.0; 1.0] //! - theR3 is the Saturation (S) within range [0.0; 1.0] - Standard_EXPORT void SetValues (const Quantity_Parameter theR1, - const Quantity_Parameter theR2, - const Quantity_Parameter theR3, + Standard_EXPORT void SetValues (const Standard_Real theR1, + const Standard_Real theR2, + const Standard_Real theR3, const Quantity_TypeOfColor theType); //! Returns the percentage change of contrast and intensity @@ -121,7 +120,7 @@ public: //! The calculation is with respect to the current value of //! If is positive then is more contrasty. //! If is positive then is more intense. - Standard_EXPORT void Delta (const Quantity_Color& AColor, Quantity_Parameter& DC, Quantity_Parameter& DI) const; + Standard_EXPORT void Delta (const Quantity_Color& AColor, Standard_Real& DC, Standard_Real& DI) const; //! Returns the distance between two colours. It's a //! value between 0 and the square root of 3 @@ -132,15 +131,15 @@ public: Standard_EXPORT Standard_Real SquareDistance (const Quantity_Color& AColor) const; //! Returns the Blue component (quantity of blue) of the color within range [0.0; 1.0]. - Standard_EXPORT Quantity_Parameter Blue() const; + Standard_EXPORT Standard_Real Blue() const; //! Returns the Green component (quantity of green) of the color within range [0.0; 1.0]. - Standard_EXPORT Quantity_Parameter Green() const; + Standard_EXPORT Standard_Real Green() const; //! Returns the Hue component (hue angle) of the color //! in degrees within range [0.0; 360.0], 0.0 being Red. //! -1.0 is a special value reserved for grayscale color (S should be 0.0) - Standard_EXPORT Quantity_Parameter Hue() const; + Standard_EXPORT Standard_Real Hue() const; //! Returns Standard_True if the distance between and //! is greater than Epsilon (). @@ -163,7 +162,7 @@ Standard_Boolean operator == (const Quantity_Color& Other) const } //! Returns the Light component (value of the lightness) of the color within range [0.0; 1.0]. - Standard_EXPORT Quantity_Parameter Light() const; + Standard_EXPORT Standard_Real Light() const; //! Returns the name of the color defined by its //! quantities of red R, green G and blue B; more @@ -174,10 +173,10 @@ Standard_Boolean operator == (const Quantity_Color& Other) const Standard_EXPORT Quantity_NameOfColor Name() const; //! Returns the Red component (quantity of red) of the color within range [0.0; 1.0]. - Standard_EXPORT Quantity_Parameter Red() const; + Standard_EXPORT Standard_Real Red() const; //! Returns the Saturation component (value of the saturation) of the color within range [0.0; 1.0]. - Standard_EXPORT Quantity_Parameter Saturation() const; + Standard_EXPORT Standard_Real Saturation() const; //! Return the color as vector of 3 float elements. operator const NCollection_Vec3&() const { return *(const NCollection_Vec3* )this; } @@ -192,23 +191,23 @@ Standard_Boolean operator == (const Quantity_Color& Other) const //! -1.0 is a special value reserved for grayscale color (S should be 0.0). //! - theR2 is the Lightness (L) within range [0.0; 1.0] //! - theR3 is the Saturation (S) within range [0.0; 1.0] - Standard_EXPORT void Values (Quantity_Parameter& theR1, - Quantity_Parameter& theR2, - Quantity_Parameter& theR3, + Standard_EXPORT void Values (Standard_Real& theR1, + Standard_Real& theR2, + Standard_Real& theR3, const Quantity_TypeOfColor theType) const; //! Sets the specified value used to compare and //! an other color in IsDifferent and in IsEqual methods. //! Warning: The default value is 0.0001 - Standard_EXPORT static void SetEpsilon (const Quantity_Parameter AnEpsilon); + Standard_EXPORT static void SetEpsilon (const Standard_Real AnEpsilon); //! Returns the specified value used to compare and //! an other color in IsDifferent and in IsEqual methods. - Standard_EXPORT static Quantity_Parameter Epsilon(); + Standard_EXPORT static Standard_Real Epsilon(); //! Returns the name of the colour for which the RGB components //! are nearest to , and . - Standard_EXPORT static Quantity_NameOfColor Name (const Quantity_Parameter R, const Quantity_Parameter G, const Quantity_Parameter B); + Standard_EXPORT static Quantity_NameOfColor Name (const Standard_Real R, const Standard_Real G, const Standard_Real B); //! Returns the name of the color identified by //! AName in the Quantity_NameOfColor enumeration. @@ -226,10 +225,10 @@ Standard_Boolean operator == (const Quantity_Color& Other) const Standard_EXPORT static Standard_Boolean ColorFromName (const Standard_CString theName, Quantity_NameOfColor& theColor); //! Converts HLS components into RGB ones. - Standard_EXPORT static void HlsRgb (const Quantity_Parameter H, const Quantity_Parameter L, const Quantity_Parameter S, Quantity_Parameter& R, Quantity_Parameter& G, Quantity_Parameter& B); + Standard_EXPORT static void HlsRgb (const Standard_Real H, const Standard_Real L, const Standard_Real S, Standard_Real& R, Standard_Real& G, Standard_Real& B); //! Converts RGB components into HLS ones. - Standard_EXPORT static void RgbHls (const Quantity_Parameter R, const Quantity_Parameter G, const Quantity_Parameter B, Quantity_Parameter& H, Quantity_Parameter& L, Quantity_Parameter& S); + Standard_EXPORT static void RgbHls (const Standard_Real R, const Standard_Real G, const Standard_Real B, Standard_Real& H, Standard_Real& L, Standard_Real& S); //! Convert the Color value to ARGB integer value. //! theARGB has Alpha equal to zero, so the output is @@ -242,18 +241,8 @@ Standard_Boolean operator == (const Quantity_Color& Other) const //! Internal test Standard_EXPORT static void Test(); - - - -protected: - - - - - private: - //! Converts HLS components into RGB ones. Standard_EXPORT static void hlsrgb (const Standard_ShortReal H, const Standard_ShortReal L, const Standard_ShortReal S, Standard_ShortReal& R, Standard_ShortReal& G, Standard_ShortReal& B); @@ -276,13 +265,6 @@ private: Standard_ShortReal MyGreen; Standard_ShortReal MyBlue; - }; - - - - - - #endif // _Quantity_Color_HeaderFile diff --git a/src/StdPrs/StdPrs_Curve.cxx b/src/StdPrs/StdPrs_Curve.cxx index 023db0484e..058cb40ab8 100644 --- a/src/StdPrs/StdPrs_Curve.cxx +++ b/src/StdPrs/StdPrs_Curve.cxx @@ -145,17 +145,17 @@ static void DrawCurve (const Adaptor3d_Curve& aCurve, // purpose: //================================================================== static Standard_Boolean MatchCurve ( - const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, - const Quantity_Length TheDeflection, + const Standard_Real TheDeflection, const Standard_Integer NbP, const Standard_Real U1, const Standard_Real U2) { - Quantity_Length retdist; + Standard_Real retdist; switch (aCurve.GetType()) { case GeomAbs_Line: @@ -310,10 +310,10 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation, // purpose: //================================================================== Standard_Boolean StdPrs_Curve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle (Prs3d_Drawer)& aDrawer) { @@ -332,12 +332,12 @@ Standard_Boolean StdPrs_Curve::Match // purpose: //================================================================== Standard_Boolean StdPrs_Curve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, - const Quantity_Length aDeflection, + const Standard_Real aDeflection, const Standard_Real aLimit, const Standard_Integer NbPoints) { @@ -354,10 +354,10 @@ Standard_Boolean StdPrs_Curve::Match // purpose: //================================================================== Standard_Boolean StdPrs_Curve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, @@ -380,14 +380,14 @@ Standard_Boolean StdPrs_Curve::Match // purpose: //================================================================== Standard_Boolean StdPrs_Curve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, - const Quantity_Length aDeflection, + const Standard_Real aDeflection, const Standard_Integer aNbPoints) { return MatchCurve(X,Y,Z,aDistance,aCurve,aDeflection,aNbPoints,U1,U2); diff --git a/src/StdPrs/StdPrs_Curve.hxx b/src/StdPrs/StdPrs_Curve.hxx index 4721d3ecca..2e69da3b8d 100644 --- a/src/StdPrs/StdPrs_Curve.hxx +++ b/src/StdPrs/StdPrs_Curve.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include class Prs3d_Presentation; @@ -80,45 +79,24 @@ public: //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve is less than aDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve is less than aDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Quantity_Length aDeflection, const Standard_Real aLimit, const Standard_Integer aNbPoints); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real aDeflection, const Standard_Real aLimit, const Standard_Integer aNbPoints); //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve aCurve is less than aDistance. //! The drawing is considered between the points //! of parameter U1 and U2; - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer); //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve aCurve is less than aDistance. //! The drawing is considered between the points //! of parameter U1 and U2; - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Quantity_Length aDeflection, const Standard_Integer aNbPoints); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Standard_Real aDeflection, const Standard_Integer aNbPoints); }; - - - - - - #endif // _StdPrs_Curve_HeaderFile diff --git a/src/StdPrs/StdPrs_DeflectionCurve.cxx b/src/StdPrs/StdPrs_DeflectionCurve.cxx index 9b1369bfb9..8b4ea4aea7 100644 --- a/src/StdPrs/StdPrs_DeflectionCurve.cxx +++ b/src/StdPrs/StdPrs_DeflectionCurve.cxx @@ -131,7 +131,7 @@ static Standard_Boolean FindLimits(const Adaptor3d_Curve& aCurve, //================================================================== static void drawCurve (Adaptor3d_Curve& aCurve, const Handle(Graphic3d_Group)& aGroup, - const Quantity_Length TheDeflection, + const Standard_Real TheDeflection, const Standard_Real anAngle, const Standard_Real U1, const Standard_Real U2, @@ -206,17 +206,17 @@ static void drawCurve (Adaptor3d_Curve& aCurve, // purpose: //================================================================== static Standard_Boolean MatchCurve ( - const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, - const Quantity_Length TheDeflection, + const Standard_Real TheDeflection, const Standard_Real anAngle, const Standard_Real U1, const Standard_Real U2) { - Quantity_Length retdist; + Standard_Real retdist; switch (aCurve.GetType()) { case GeomAbs_Line: @@ -444,10 +444,10 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati // purpose: //================================================================== Standard_Boolean StdPrs_DeflectionCurve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle (Prs3d_Drawer)& aDrawer) { @@ -467,10 +467,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match // purpose: //================================================================== Standard_Boolean StdPrs_DeflectionCurve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, @@ -492,10 +492,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match // purpose: //================================================================== Standard_Boolean StdPrs_DeflectionCurve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, @@ -510,10 +510,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match // purpose: //================================================================== Standard_Boolean StdPrs_DeflectionCurve::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real aDeflection, const Standard_Real aLimit, diff --git a/src/StdPrs/StdPrs_DeflectionCurve.hxx b/src/StdPrs/StdPrs_DeflectionCurve.hxx index a793c00075..8cd4bb3174 100644 --- a/src/StdPrs/StdPrs_DeflectionCurve.hxx +++ b/src/StdPrs/StdPrs_DeflectionCurve.hxx @@ -26,7 +26,7 @@ #include #include #include -#include + class Prs3d_Presentation; class Adaptor3d_Curve; @@ -90,25 +90,25 @@ public: //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve aCurve with respect of the maximal //! chordial deviation defined by the drawer aDrawer is less then aDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); //! returns true if the distance between the point (X,Y,Z) and the //! drawing of the curve aCurve with respect of the maximal //! chordial deviation defined by the drawer aDrawer is less //! then aDistance. The drawing is considered between the points //! of parameter U1 and U2; - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer); //! Returns true if the distance between the point (theX, theY, theZ) //! and the drawing with respect of the maximal chordial deviation theDeflection is less then theDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length theX, const Quantity_Length theY, const Quantity_Length theZ, const Quantity_Length theDistance, + Standard_EXPORT static Standard_Boolean Match (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, const Adaptor3d_Curve& theCurve, const Standard_Real theDeflection, const Standard_Real theLimit, const Standard_Real theAngle); //! Returns true if the distance between the point (theX, theY, theZ) //! and the drawing with respect of the maximal chordial deviation theDeflection is less then theDistance. //! The drawing is considered between the points of parameter theU1 and theU2. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length theX, const Quantity_Length theY, const Quantity_Length theZ, const Quantity_Length theDistance, + Standard_EXPORT static Standard_Boolean Match (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, const Adaptor3d_Curve& theCurve, const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theDeflection, const Standard_Real theAngle); diff --git a/src/StdPrs/StdPrs_Plane.cxx b/src/StdPrs/StdPrs_Plane.cxx index 7e0f97e0d8..536c2c2566 100644 --- a/src/StdPrs/StdPrs_Plane.cxx +++ b/src/StdPrs/StdPrs_Plane.cxx @@ -82,9 +82,9 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation, gp_Dir norm = thegeom->Pln().Axis().Direction(); gp_Pnt loc; - Quantity_Length siz = theaspect->ArrowsSize(); - Quantity_Length len = theaspect->ArrowsLength(); - Quantity_PlaneAngle ang = theaspect->ArrowsAngle(); + Standard_Real siz = theaspect->ArrowsSize(); + Standard_Real len = theaspect->ArrowsLength(); + Standard_Real ang = theaspect->ArrowsAngle(); gp_Vec trans(norm); trans.Scale(Standard_Real(siz)); @@ -130,10 +130,10 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation, } Standard_Boolean StdPrs_Plane::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Surface& aPlane, const Handle (Prs3d_Drawer)&) { diff --git a/src/StdPrs/StdPrs_Plane.hxx b/src/StdPrs/StdPrs_Plane.hxx index e68d8584b5..0c91ebd7e8 100644 --- a/src/StdPrs/StdPrs_Plane.hxx +++ b/src/StdPrs/StdPrs_Plane.hxx @@ -24,7 +24,7 @@ #include #include #include -#include + class Prs3d_Presentation; class Adaptor3d_Surface; @@ -45,29 +45,8 @@ public: //! returns true if the distance between the point (X,Y,Z) and the //! plane is less than aDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Surface& aPlane, const Handle(Prs3d_Drawer)& aDrawer); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Surface& aPlane, const Handle(Prs3d_Drawer)& aDrawer); }; - - - - - - #endif // _StdPrs_Plane_HeaderFile diff --git a/src/StdPrs/StdPrs_PoleCurve.cxx b/src/StdPrs/StdPrs_PoleCurve.cxx index 2537d9dc5e..9d7116130e 100644 --- a/src/StdPrs/StdPrs_PoleCurve.cxx +++ b/src/StdPrs/StdPrs_PoleCurve.cxx @@ -79,10 +79,10 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation, //purpose : //======================================================================= -Standard_Boolean StdPrs_PoleCurve::Match(const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, +Standard_Boolean StdPrs_PoleCurve::Match(const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle (Prs3d_Drawer)& /*aDrawer*/) { @@ -116,10 +116,10 @@ Standard_Boolean StdPrs_PoleCurve::Match(const Quantity_Length X, //======================================================================= Standard_Integer StdPrs_PoleCurve::Pick - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& /*aDrawer*/) { diff --git a/src/StdPrs/StdPrs_PoleCurve.hxx b/src/StdPrs/StdPrs_PoleCurve.hxx index 282fab3474..9c78baad01 100644 --- a/src/StdPrs/StdPrs_PoleCurve.hxx +++ b/src/StdPrs/StdPrs_PoleCurve.hxx @@ -24,8 +24,8 @@ #include #include #include -#include #include + class Prs3d_Presentation; class Adaptor3d_Curve; @@ -51,34 +51,13 @@ public: //! returns true if the distance between the point (X,Y,Z) and the //! broken line made of the poles is less then aDistance. - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); //! returns the pole the most near of the point (X,Y,Z) and //! returns its range. The distance between the pole and //! (X,Y,Z) must be less then aDistance. If no pole corresponds, 0 is returned. - Standard_EXPORT static Standard_Integer Pick (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static Standard_Integer Pick (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); }; - - - - - - #endif // _StdPrs_PoleCurve_HeaderFile diff --git a/src/StdPrs/StdPrs_ToolPoint.hxx b/src/StdPrs/StdPrs_ToolPoint.hxx index 515d3ad7ed..619f3d9c14 100644 --- a/src/StdPrs/StdPrs_ToolPoint.hxx +++ b/src/StdPrs/StdPrs_ToolPoint.hxx @@ -21,41 +21,16 @@ #include #include -#include class Geom_Point; - - class StdPrs_ToolPoint { public: DEFINE_STANDARD_ALLOC - - Standard_EXPORT static void Coord (const Handle(Geom_Point)& aPoint, Quantity_Length& X, Quantity_Length& Y, Quantity_Length& Z); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static void Coord (const Handle(Geom_Point)& aPoint, Standard_Real& X, Standard_Real& Y, Standard_Real& Z); }; - - - - - - #endif // _StdPrs_ToolPoint_HeaderFile diff --git a/src/StdPrs/StdPrs_ToolVertex.hxx b/src/StdPrs/StdPrs_ToolVertex.hxx index 26cd7db673..ebab5a3f5e 100644 --- a/src/StdPrs/StdPrs_ToolVertex.hxx +++ b/src/StdPrs/StdPrs_ToolVertex.hxx @@ -21,41 +21,16 @@ #include #include -#include class TopoDS_Vertex; - - class StdPrs_ToolVertex { public: DEFINE_STANDARD_ALLOC - - Standard_EXPORT static void Coord (const TopoDS_Vertex& aPoint, Quantity_Length& X, Quantity_Length& Y, Quantity_Length& Z); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static void Coord (const TopoDS_Vertex& aPoint, Standard_Real& X, Standard_Real& Y, Standard_Real& Z); }; - - - - - - #endif // _StdPrs_ToolVertex_HeaderFile diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx index 96a8cc8af2..40520ee732 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx @@ -103,7 +103,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, - const Quantity_Length Deflection, + const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, @@ -361,15 +361,15 @@ void StdPrs_WFDeflectionRestrictedFace::Add // purpose //========================================================================= Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, - const Quantity_Length Deflection, + const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso) { @@ -567,10 +567,10 @@ void StdPrs_WFDeflectionRestrictedFace::AddVIso // purpose //========================================================================= Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { @@ -591,10 +591,10 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match // purpose //========================================================================= Standard_Boolean StdPrs_WFDeflectionRestrictedFace::MatchUIso - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { @@ -615,10 +615,10 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::MatchUIso // purpose //========================================================================= Standard_Boolean StdPrs_WFDeflectionRestrictedFace::MatchVIso - (const Quantity_Length X, - const Quantity_Length Y, - const Quantity_Length Z, - const Quantity_Length aDistance, + (const Standard_Real X, + const Standard_Real Y, + const Standard_Real Z, + const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx index 7c4c49b036..64fd2031f5 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx @@ -24,9 +24,9 @@ #include #include #include -#include #include #include + class Prs3d_Presentation; class BRepAdaptor_HSurface; class Bnd_Box; @@ -110,37 +110,16 @@ public: //! as a geometric surface. //! Curves give a sequence of face curves, it is used if the PrimitiveArray //! visualization approach is activated (it is activated by default). - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Quantity_Length Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, Prs3d_NListOfSequenceOfPnt& Curves); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, Prs3d_NListOfSequenceOfPnt& Curves); - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean MatchUIso (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean MatchUIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean MatchVIso (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean MatchVIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Quantity_Length aDeflection, const Standard_Integer NBUiso, const Standard_Integer NBViso); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real aDeflection, const Standard_Integer NBUiso, const Standard_Integer NBViso); }; - - - - - - #endif // _StdPrs_WFDeflectionRestrictedFace_HeaderFile diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.cxx b/src/StdPrs/StdPrs_WFRestrictedFace.cxx index 3501db8d36..725ed93ebe 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.cxx @@ -217,14 +217,14 @@ void StdPrs_WFRestrictedFace::Add //========================================================================= Standard_Boolean StdPrs_WFRestrictedFace::Match - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, - const Quantity_Length theDeflection, + const Standard_Real theDeflection, const Standard_Integer theNbUIso, const Standard_Integer theNBVIso, const Handle(Prs3d_Drawer)& theDrawer) @@ -454,10 +454,10 @@ void StdPrs_WFRestrictedFace::AddVIso //========================================================================= Standard_Boolean StdPrs_WFRestrictedFace::Match - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { @@ -479,10 +479,10 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match //========================================================================= Standard_Boolean StdPrs_WFRestrictedFace::MatchUIso - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { @@ -504,10 +504,10 @@ Standard_Boolean StdPrs_WFRestrictedFace::MatchUIso //========================================================================= Standard_Boolean StdPrs_WFRestrictedFace::MatchVIso - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.hxx b/src/StdPrs/StdPrs_WFRestrictedFace.hxx index 8852424158..cfe12c2472 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.hxx @@ -47,39 +47,39 @@ public: const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean Match - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, - const Quantity_Length theDeflection, + const Standard_Real theDeflection, const Standard_Integer theNbUIso, const Standard_Integer theNbVIso, const Handle(Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean Match - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean MatchUIso - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean MatchVIso - (const Quantity_Length theX, - const Quantity_Length theY, - const Quantity_Length theZ, - const Quantity_Length theDistance, + (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theDistance, const Handle(BRepAdaptor_HSurface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); diff --git a/src/V3d/V3d.hxx b/src/V3d/V3d.hxx index 0ab00887c2..04a22491a8 100644 --- a/src/V3d/V3d.hxx +++ b/src/V3d/V3d.hxx @@ -22,27 +22,9 @@ #include #include -#include -#include -#include -#include -class Graphic3d_Vector; -class Graphic3d_Group; -class V3d_View; -class V3d_Viewer; -class V3d_Viewer; -class V3d_View; -class V3d_Light; -class V3d_AmbientLight; -class V3d_PositionLight; -class V3d_PositionalLight; -class V3d_DirectionalLight; -class V3d_SpotLight; -class V3d_RectangularGrid; -class V3d_CircularGrid; -class V3d_ColorScale; -class V3d_ColorScaleLayerItem; +#include +class V3d_View; //! This package contains the set of commands and services //! of the 3D Viewer. It provides a set of high level commands @@ -53,45 +35,32 @@ public: DEFINE_STANDARD_ALLOC - //! Determines the orientation vector corresponding //! to the predefined orientation type. Standard_EXPORT static Graphic3d_Vector GetProjAxis (const V3d_TypeOfOrientation Orientation); - + //! Compute the graphic structure of arrow. //! X0,Y0,Z0 : coordinate of the arrow. //! DX,DY,DZ : Direction of the arrow. //! Alpha : Angle of arrow. //! Lng : Length of arrow. - Standard_EXPORT static void ArrowOfRadius (const Handle(Graphic3d_Group)& garrow, const V3d_Coordinate X0, const V3d_Coordinate Y0, const V3d_Coordinate Z0, const V3d_Parameter DX, const V3d_Parameter DY, const V3d_Parameter DZ, const Quantity_PlaneAngle Alpha, const V3d_Parameter Lng); - + Standard_EXPORT static void ArrowOfRadius (const Handle(Graphic3d_Group)& garrow, + const Standard_Real X0, const Standard_Real Y0, const Standard_Real Z0, + const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, + const Standard_Real Alpha, + const Standard_Real Lng); + //! Compute the graphic structure of circle. //! X0,Y0,Z0 : Center of circle. //! VX,VY,VZ : Axis of circle. //! Radius : Radius of circle. - Standard_EXPORT static void CircleInPlane (const Handle(Graphic3d_Group)& gcircle, const V3d_Coordinate X0, const V3d_Coordinate Y0, const V3d_Coordinate Z0, const V3d_Parameter VX, const V3d_Parameter VY, const V3d_Parameter VZ, const V3d_Parameter Radius); - - Standard_EXPORT static void SwitchViewsinWindow (const Handle(V3d_View)& aPreviousView, const Handle(V3d_View)& aNextView); + Standard_EXPORT static void CircleInPlane (const Handle(Graphic3d_Group)& gcircle, + const Standard_Real X0, const Standard_Real Y0, const Standard_Real Z0, + const Standard_Real VX, const Standard_Real VY, const Standard_Real VZ, + const Standard_Real Radius); -friend class V3d_Viewer; -friend class V3d_View; -friend class V3d_Light; -friend class V3d_AmbientLight; -friend class V3d_PositionLight; -friend class V3d_PositionalLight; -friend class V3d_DirectionalLight; -friend class V3d_SpotLight; -friend class V3d_RectangularGrid; -friend class V3d_CircularGrid; -friend class V3d_ColorScale; -friend class V3d_ColorScaleLayerItem; + Standard_EXPORT static void SwitchViewsinWindow (const Handle(V3d_View)& aPreviousView, const Handle(V3d_View)& aNextView); }; - - - - - - #endif // _V3d_HeaderFile diff --git a/src/V3d/V3d_DirectionalLight.hxx b/src/V3d/V3d_DirectionalLight.hxx index ab68c739d0..2b7f9b4876 100644 --- a/src/V3d/V3d_DirectionalLight.hxx +++ b/src/V3d/V3d_DirectionalLight.hxx @@ -40,12 +40,12 @@ public: //! theXp, theYp, theZp : Coordinate of light source Position. //! The others parameters describe before. Standard_EXPORT V3d_DirectionalLight (const Handle(V3d_Viewer)& theViewer, - const V3d_Coordinate theXt, - const V3d_Coordinate theYt, - const V3d_Coordinate theZt, - const V3d_Coordinate theXp, - const V3d_Coordinate theYp, - const V3d_Coordinate theZp, + const Standard_Real theXt, + const Standard_Real theYt, + const Standard_Real theZt, + const Standard_Real theXp, + const Standard_Real theYp, + const Standard_Real theZp, const Quantity_Color& theColor = Quantity_NOC_WHITE, const Standard_Boolean theIsHeadlight = Standard_False); @@ -54,19 +54,19 @@ public: //! Defines the direction of the light source by the predefined vector theXm, theYm, theZm. //! Warning: raises BadValue from V3d if the vector is null. - Standard_EXPORT void SetDirection (const Quantity_Parameter theXm, - const Quantity_Parameter theYm, - const Quantity_Parameter theZm); + Standard_EXPORT void SetDirection (const Standard_Real theXm, + const Standard_Real theYm, + const Standard_Real theZm); //! Defines the point of light source representation. - Standard_EXPORT void SetDisplayPosition (const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ); + Standard_EXPORT void SetDisplayPosition (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ); //! Calls SetDisplayPosition method. - Standard_EXPORT virtual void SetPosition (const V3d_Coordinate theXp, - const V3d_Coordinate theYp, - const V3d_Coordinate theZp) Standard_OVERRIDE; + Standard_EXPORT virtual void SetPosition (const Standard_Real theXp, + const Standard_Real theYp, + const Standard_Real theZp) Standard_OVERRIDE; //! Modifies the smoothing angle (in radians) Standard_EXPORT void SetSmoothAngle (const Standard_Real theValue); @@ -84,19 +84,19 @@ public: const V3d_TypeOfRepresentation theRepresentation) Standard_OVERRIDE; //! Calls DisplayPosition method. - Standard_EXPORT virtual void Position (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const Standard_OVERRIDE; + Standard_EXPORT virtual void Position (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const Standard_OVERRIDE; //! Returns the chosen position to represent the light source. - Standard_EXPORT void DisplayPosition (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const; + Standard_EXPORT void DisplayPosition (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const; //! Returns the theVx, theVy, theVz direction of the light source. - Standard_EXPORT void Direction (Quantity_Parameter& theVx, - Quantity_Parameter& theVy, - Quantity_Parameter& theVz) const; + Standard_EXPORT void Direction (Standard_Real& theVx, + Standard_Real& theVy, + Standard_Real& theVz) const; DEFINE_STANDARD_RTTIEXT(V3d_DirectionalLight,V3d_PositionLight) diff --git a/src/V3d/V3d_Light.hxx b/src/V3d/V3d_Light.hxx index 3849ca96d0..75a46bb249 100644 --- a/src/V3d/V3d_Light.hxx +++ b/src/V3d/V3d_Light.hxx @@ -21,12 +21,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include @@ -85,7 +83,12 @@ protected: //! Returns the symetric point coordinates of "aPoint" //! on the sphere of center "Center" and radius "Radius". //! VX,VY,VZ is the project vector of view. - Standard_EXPORT static void SymetricPointOnSphere (const Handle(V3d_View)& aView, const Graphic3d_Vertex& Center, const Graphic3d_Vertex& aPoint, const Quantity_Parameter Radius, V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z, Quantity_Parameter& VX, Quantity_Parameter& VY, Quantity_Parameter& VZ); + Standard_EXPORT static void SymetricPointOnSphere (const Handle(V3d_View)& aView, + const Graphic3d_Vertex& Center, + const Graphic3d_Vertex& aPoint, + const Standard_Real Radius, + Standard_Real& X, Standard_Real& Y, Standard_Real& Z, + Standard_Real& VX, Standard_Real& VY, Standard_Real& VZ); protected: diff --git a/src/V3d/V3d_Plane.hxx b/src/V3d/V3d_Plane.hxx index ca87568a81..71a15be786 100755 --- a/src/V3d/V3d_Plane.hxx +++ b/src/V3d/V3d_Plane.hxx @@ -46,16 +46,16 @@ class V3d_Plane : public MMgt_TShared public: //! Creates a clipping plane from plane coefficients. - Standard_EXPORT V3d_Plane (const Quantity_Parameter theA = 0.0, - const Quantity_Parameter theB = 0.0, - const Quantity_Parameter theC = 1.0, - const Quantity_Parameter theD = 0.0); + Standard_EXPORT V3d_Plane (const Standard_Real theA = 0.0, + const Standard_Real theB = 0.0, + const Standard_Real theC = 1.0, + const Standard_Real theD = 0.0); //! Change plane equation. - Standard_EXPORT void SetPlane (const Quantity_Parameter theA, - const Quantity_Parameter theB, - const Quantity_Parameter theC, - const Quantity_Parameter theD); + Standard_EXPORT void SetPlane (const Standard_Real theA, + const Standard_Real theB, + const Standard_Real theC, + const Standard_Real theD); //! Display the plane representation in the choosen view. Standard_EXPORT virtual void Display (const Handle(V3d_View)& theView, @@ -65,10 +65,10 @@ public: Standard_EXPORT void Erase(); //! Returns the parameters of the plane. - Standard_EXPORT void Plane (Quantity_Parameter& theA, - Quantity_Parameter& theB, - Quantity_Parameter& theC, - Quantity_Parameter& theD) const; + Standard_EXPORT void Plane (Standard_Real& theA, + Standard_Real& theB, + Standard_Real& theC, + Standard_Real& theD) const; //! Returns TRUE when the plane representation is displayed. Standard_EXPORT Standard_Boolean IsDisplayed() const; diff --git a/src/V3d/V3d_PositionLight.hxx b/src/V3d/V3d_PositionLight.hxx index c0f85b469d..1d0784ca22 100644 --- a/src/V3d/V3d_PositionLight.hxx +++ b/src/V3d/V3d_PositionLight.hxx @@ -18,8 +18,6 @@ #define _V3d_PositionLight_HeaderFile #include -#include -#include #include #include #include @@ -35,17 +33,17 @@ class V3d_PositionLight : public V3d_Light public: //! Defines the position of the light source. Should be redefined! - Standard_EXPORT virtual void SetPosition (const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ) = 0; + Standard_EXPORT virtual void SetPosition (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ) = 0; //! Defines the target of the light (the center of the sphere). - Standard_EXPORT void SetTarget (const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ); + Standard_EXPORT void SetTarget (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ); //! Define the radius. - Standard_EXPORT void SetRadius (const Quantity_Parameter theRadius); + Standard_EXPORT void SetRadius (const Standard_Real theRadius); //! Calculate the position of the light, on the hide face of the picking sphere. Standard_EXPORT void OnHideFace (const Handle(V3d_View)& theView); @@ -80,7 +78,7 @@ public: Standard_EXPORT void Erase(); //! Returns the radius of the picking sphere. - Standard_EXPORT Quantity_Parameter Radius() const; + Standard_EXPORT Standard_Real Radius() const; //! Returns the visibility status //! If True the source is visible. @@ -88,14 +86,14 @@ public: Standard_EXPORT Standard_Boolean SeeOrHide (const Handle(V3d_View)& theView) const; //! Returns the position of the light source. - Standard_EXPORT virtual void Position (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const = 0; + Standard_EXPORT virtual void Position (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const = 0; //! Returns the position of the target of the light source. - Standard_EXPORT void Target (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const; + Standard_EXPORT void Target (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const; DEFINE_STANDARD_RTTIEXT(V3d_PositionLight,V3d_Light) diff --git a/src/V3d/V3d_PositionalLight.hxx b/src/V3d/V3d_PositionalLight.hxx index a3953166b4..20946e8fcf 100644 --- a/src/V3d/V3d_PositionalLight.hxx +++ b/src/V3d/V3d_PositionalLight.hxx @@ -17,7 +17,6 @@ #ifndef _V3d_PositionalLight_HeaderFile #define _V3d_PositionalLight_HeaderFile -#include #include class V3d_PositionalLight; @@ -40,12 +39,12 @@ public: //! from the surface. //! Warning! raises BadValue from V3d //! if one of the attenuation coefficients is not in range [0, 1]. Standard_EXPORT V3d_PositionalLight (const Handle(V3d_Viewer)& theViewer, - const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ, + const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, const Quantity_Color& theColor = Quantity_NOC_WHITE, - const Quantity_Coefficient theConstAttenuation = 1.0, - const Quantity_Coefficient theLinearAttenuation = 0.0); + const Standard_Real theConstAttenuation = 1.0, + const Standard_Real theLinearAttenuation = 0.0); //! Creates a light source of the Positional type in the viewer. //! theXt, theYt, theZt : Coordinate of Target light source. @@ -59,26 +58,26 @@ public: //! from the surface. //! Warning! raises BadValue from V3d //! if one of the attenuation coefficients is not between 0 et 1. Standard_EXPORT V3d_PositionalLight (const Handle(V3d_Viewer)& theViewer, - const V3d_Coordinate theXt, - const V3d_Coordinate theYt, - const V3d_Coordinate theZt, - const V3d_Coordinate theXp, - const V3d_Coordinate theYp, - const V3d_Coordinate theZp, + const Standard_Real theXt, + const Standard_Real theYt, + const Standard_Real theZt, + const Standard_Real theXp, + const Standard_Real theYp, + const Standard_Real theZp, const Quantity_Color& theColor = Quantity_NOC_WHITE, - const Quantity_Coefficient theConstAttenuation = 1.0, - const Quantity_Coefficient theLinearAttenuation = 0.0); + const Standard_Real theConstAttenuation = 1.0, + const Standard_Real theLinearAttenuation = 0.0); //! Defines the position of the light source. - Standard_EXPORT virtual void SetPosition (const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ) Standard_OVERRIDE; + Standard_EXPORT virtual void SetPosition (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ) Standard_OVERRIDE; //! Defines the attenuation factors. //! Warning: raises BadValue from V3d //! if one of the attenuation coefficients is not between 0 et 1. - Standard_EXPORT void SetAttenuation (const Quantity_Coefficient theConstAttenuation, - const Quantity_Coefficient theLinearAttenuation); + Standard_EXPORT void SetAttenuation (const Standard_Real theConstAttenuation, + const Standard_Real theLinearAttenuation); //! Modifies the smoothing radius Standard_EXPORT void SetSmoothRadius (const Standard_Real theValue); @@ -97,13 +96,13 @@ public: const V3d_TypeOfRepresentation theRepresentation) Standard_OVERRIDE; //! Returns the position of the light source. - Standard_EXPORT void Position (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const Standard_OVERRIDE; + Standard_EXPORT void Position (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const Standard_OVERRIDE; //! Returns the attenuation factors. - Standard_EXPORT void Attenuation (Quantity_Coefficient& theConstAttenuation, - Quantity_Coefficient& theLinearAttenuation) const; + Standard_EXPORT void Attenuation (Standard_Real& theConstAttenuation, + Standard_Real& theLinearAttenuation) const; DEFINE_STANDARD_RTTIEXT(V3d_PositionalLight,V3d_PositionLight) diff --git a/src/V3d/V3d_SpotLight.hxx b/src/V3d/V3d_SpotLight.hxx index 9034a5e96e..d169d7ee3c 100644 --- a/src/V3d/V3d_SpotLight.hxx +++ b/src/V3d/V3d_SpotLight.hxx @@ -43,15 +43,15 @@ public: //! If one of the coefficients is not between 0 and 1. //! If the lighting angle is <= 0 or > PI. Standard_EXPORT V3d_SpotLight (const Handle(V3d_Viewer)& theViewer, - const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ, + const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, const V3d_TypeOfOrientation theDirection = V3d_XnegYnegZpos, const Quantity_Color& theColor = Quantity_NOC_WHITE, - const Quantity_Coefficient theConstAttenuation = 1.0, - const Quantity_Coefficient theLinearAttenuation = 0.0, - const Quantity_Coefficient theConcentration = 1.0, - const Quantity_PlaneAngle theAngle = 0.523599); + const Standard_Real theConstAttenuation = 1.0, + const Standard_Real theLinearAttenuation = 0.0, + const Standard_Real theConcentration = 1.0, + const Standard_Real theAngle = 0.523599); //! Creates a light source of the Spot type in the viewer. //! theXt, theYt, theZt : Coordinate of light source Target. @@ -61,28 +61,28 @@ public: //! If one of the coefficients is not between 0 and 1. //! If the lighting angle is <= 0 or > PI. Standard_EXPORT V3d_SpotLight (const Handle(V3d_Viewer)& theViewer, - const V3d_Coordinate theXt, - const V3d_Coordinate theYt, - const V3d_Coordinate theZt, - const V3d_Coordinate theXp, - const V3d_Coordinate theYp, - const V3d_Coordinate theZp, + const Standard_Real theXt, + const Standard_Real theYt, + const Standard_Real theZt, + const Standard_Real theXp, + const Standard_Real theYp, + const Standard_Real theZp, const Quantity_Color& theColor = Quantity_NOC_WHITE, - const Quantity_Coefficient theConstAttenuation = 1.0, - const Quantity_Coefficient theLinearAttenuation = 0.0, - const Quantity_Coefficient theConcentration = 1.0, - const Quantity_PlaneAngle theAngle = 0.523599); + const Standard_Real theConstAttenuation = 1.0, + const Standard_Real theLinearAttenuation = 0.0, + const Standard_Real theConcentration = 1.0, + const Standard_Real theAngle = 0.523599); //! Defines the position of the light source. - Standard_EXPORT virtual void SetPosition (const V3d_Coordinate theX, - const V3d_Coordinate theY, - const V3d_Coordinate theZ) Standard_OVERRIDE; + Standard_EXPORT virtual void SetPosition (const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ) Standard_OVERRIDE; //! Defines the direction of the light source. //! If the normal vector is NULL. - Standard_EXPORT void SetDirection (const Quantity_Parameter theVx, - const Quantity_Parameter theVy, - const Quantity_Parameter theVz); + Standard_EXPORT void SetDirection (const Standard_Real theVx, + const Standard_Real theVy, + const Standard_Real theVz); //! Defines the direction of the light source //! according to a predefined directional vector. @@ -91,17 +91,17 @@ public: //! Defines the coefficients of attenuation. //! Warning! raises BadValue from V3d //! if one of the coefficient is < 0 or > 1. - Standard_EXPORT void SetAttenuation (const Quantity_Coefficient theConstAttenuation, - const Quantity_Coefficient theLinearAttenuation); + Standard_EXPORT void SetAttenuation (const Standard_Real theConstAttenuation, + const Standard_Real theLinearAttenuation); //! Defines the coefficient of concentration. //! if the coefficient is < 0 or > 1. - Standard_EXPORT void SetConcentration (const Quantity_Coefficient theConcentration); + Standard_EXPORT void SetConcentration (const Standard_Real theConcentration); //! Defines the spot angle in RADIANS. //! Warning: raises BadValue from from V3d //! If the angle is <= 0 or > PI. - Standard_EXPORT void SetAngle (const Quantity_PlaneAngle theAngle); + Standard_EXPORT void SetAngle (const Standard_Real theAngle); //! Display the graphic structure of light source //! in the chosen view. We have three type of representation @@ -117,23 +117,23 @@ public: const V3d_TypeOfRepresentation theRepresentation) Standard_OVERRIDE; //! Returns the direction of the light source defined by theVx, theVy, theVz. - Standard_EXPORT void Direction (Quantity_Parameter& theVx, - Quantity_Parameter& theVy, - Quantity_Parameter& theVz) const; + Standard_EXPORT void Direction (Standard_Real& theVx, + Standard_Real& theVy, + Standard_Real& theVz) const; //! Returns the position of the light source. - Standard_EXPORT void Position (V3d_Coordinate& theX, - V3d_Coordinate& theY, - V3d_Coordinate& theZ) const Standard_OVERRIDE; + Standard_EXPORT void Position (Standard_Real& theX, + Standard_Real& theY, + Standard_Real& theZ) const Standard_OVERRIDE; //! Returns the attenuation factors A1,A2 of the light source. - Standard_EXPORT void Attenuation (Quantity_Coefficient& theConstAttentuation, - Quantity_Coefficient& theLinearAttentuation) const; + Standard_EXPORT void Attenuation (Standard_Real& theConstAttentuation, + Standard_Real& theLinearAttentuation) const; - Standard_EXPORT Quantity_Coefficient Concentration() const; + Standard_EXPORT Standard_Real Concentration() const; //! Returns the spot angle. - Standard_EXPORT Quantity_PlaneAngle Angle() const; + Standard_EXPORT Standard_Real Angle() const; DEFINE_STANDARD_RTTIEXT(V3d_SpotLight,V3d_PositionLight) diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 7db3ad078f..7c78bf8f30 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -1462,7 +1462,7 @@ void V3d_View::SetRatio() //function : FitAll //purpose : //============================================================================= -void V3d_View::FitAll (const Quantity_Coefficient theMargin, const Standard_Boolean theToUpdate) +void V3d_View::FitAll (const Standard_Real theMargin, const Standard_Boolean theToUpdate) { FitAll (myView->MinMaxValues(), theMargin, theToUpdate); } @@ -1471,7 +1471,7 @@ void V3d_View::FitAll (const Quantity_Coefficient theMargin, const Standard_Bool //function : FitAll //purpose : //============================================================================= -void V3d_View::FitAll (const Bnd_Box& theBox, const Quantity_Coefficient theMargin, const Standard_Boolean theToUpdate) +void V3d_View::FitAll (const Bnd_Box& theBox, const Standard_Real theMargin, const Standard_Boolean theToUpdate) { Standard_ASSERT_RAISE(theMargin >= 0.0 && theMargin < 1.0, "Invalid margin coefficient"); @@ -1497,8 +1497,8 @@ void V3d_View::FitAll (const Bnd_Box& theBox, const Quantity_Coefficient theMarg //function : DepthFitAll //purpose : //============================================================================= -void V3d_View::DepthFitAll(const Quantity_Coefficient Aspect, - const Quantity_Coefficient Margin) +void V3d_View::DepthFitAll(const Standard_Real Aspect, + const Standard_Real Margin) { Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,U,V,W,U1,V1,W1 ; Standard_Real Umin,Vmin,Wmin,Umax,Vmax,Wmax ; @@ -2472,7 +2472,7 @@ Graphic3d_Vertex V3d_View::TrsPoint( const Graphic3d_Vertex &P, const TColStd_Ar //======================================================================= void V3d_View::Pan (const Standard_Integer theDXp, const Standard_Integer theDYp, - const Quantity_Factor theZoomFactor, + const Standard_Real theZoomFactor, const Standard_Boolean theToStart) { Panning (Convert (theDXp), Convert (theDYp), theZoomFactor, theToStart); @@ -2484,7 +2484,7 @@ void V3d_View::Pan (const Standard_Integer theDXp, //======================================================================= void V3d_View::Panning (const Standard_Real theDXv, const Standard_Real theDYv, - const Quantity_Factor theZoomFactor, + const Standard_Real theZoomFactor, const Standard_Boolean theToStart) { Standard_ASSERT_RAISE (theZoomFactor > 0.0, "Bad zoom factor"); @@ -2587,8 +2587,8 @@ void V3d_View::ZoomAtPoint (const Standard_Integer theMouseStartX, Standard_Real aZoomAtPointYv = 0.0; Convert (MyZoomAtPointX, MyZoomAtPointY, aZoomAtPointXv, aZoomAtPointYv); - V3d_Coordinate aDxv = aZoomAtPointXv / aCoef; - V3d_Coordinate aDyv = aZoomAtPointYv / aCoef; + Standard_Real aDxv = aZoomAtPointXv / aCoef; + Standard_Real aDyv = aZoomAtPointYv / aCoef; aCamera->SetScale (aCamera->Scale() / aCoef); Translate (aCamera, aZoomAtPointXv - aDxv, aZoomAtPointYv - aDyv); @@ -2658,7 +2658,7 @@ void V3d_View::FitAll(const Standard_Real theXmin, //============================================================================= void V3d_View::StartRotation(const Standard_Integer X, const Standard_Integer Y, - const Quantity_Ratio zRotationThreshold) + const Standard_Real zRotationThreshold) { sx = X; sy = Y; Standard_Real x,y; diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 778fb122b2..7f06a5a432 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -45,12 +45,6 @@ #include -#include -#include -#include -#include -#include -#include #include #include @@ -64,7 +58,6 @@ #include #include -#include #include #include #include @@ -206,9 +199,9 @@ public: //! Defines the background color of the view by the color definition type and the three corresponding values. Standard_EXPORT void SetBackgroundColor (const Quantity_TypeOfColor theType, - const Quantity_Parameter theV1, - const Quantity_Parameter theV2, - const Quantity_Parameter theV3); + const Standard_Real theV1, + const Standard_Real theV2, + const Standard_Real theV3); //! Defines the background color of the view. Standard_EXPORT void SetBackgroundColor (const Quantity_Color& theColor); @@ -238,7 +231,8 @@ public: //! its orientation . //! This will be the current axis for rotations and movements. //! Warning! raises BadValue from V3d if the vector normal is NULL. . - Standard_EXPORT void SetAxis (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz); + Standard_EXPORT void SetAxis (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, + const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz); //! Defines the shading model for the visualization. Various models are available. Standard_EXPORT void SetShadingModel (const V3d_TypeOfShadingModel theShadingModel); @@ -312,7 +306,7 @@ public: //! Warning! raises BadValue from V3d //! If the eye, the view point, or the high point are //! aligned or confused. - Standard_EXPORT void Rotate (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle Az, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Rotate (const Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, const Standard_Boolean Start = Standard_True); //! Rotates the eye about the coordinate system of //! reference of the screen @@ -321,108 +315,113 @@ public: //! the initial position expressed by Start = Standard_True //! If the eye, the view point, or the high point are //! aligned or confused. - Standard_EXPORT void Rotate (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle Az, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Rotate (const Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, + const Standard_Real X, const Standard_Real Y, const Standard_Real Z, + const Standard_Boolean Start = Standard_True); //! Rotates the eye about one of the coordinate axes of //! of the view for which the origin is the Gravity point{X,Y,Z} //! with an relative angular value in RADIANS with //! respect to the initial position expressed by //! Start = Standard_True - Standard_EXPORT void Rotate (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle Angle, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Rotate (const V3d_TypeOfAxe Axe, + const Standard_Real Angle, + const Standard_Real X, const Standard_Real Y, const Standard_Real Z, + const Standard_Boolean Start = Standard_True); //! Rotates the eye about one of the coordinate axes of //! of the view for which the origin is the view point of the //! projection with an relative angular value in RADIANS with //! respect to the initial position expressed by //! Start = Standard_True - Standard_EXPORT void Rotate (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle Angle, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Rotate (const V3d_TypeOfAxe Axe, const Standard_Real Angle, const Standard_Boolean Start = Standard_True); //! Rotates the eye around the current axis a relative //! angular value in RADIANS with respect to the initial //! position expressed by Start = Standard_True - Standard_EXPORT void Rotate (const Quantity_PlaneAngle Angle, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Rotate (const Standard_Real Angle, const Standard_Boolean Start = Standard_True); //! Movement of the eye parallel to the coordinate system //! of reference of the screen a distance relative to the //! initial position expressed by Start = Standard_True. - Standard_EXPORT void Move (const Quantity_Length Dx, const Quantity_Length Dy, const Quantity_Length Dz, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Move (const Standard_Real Dx, const Standard_Real Dy, const Standard_Real Dz, const Standard_Boolean Start = Standard_True); //! Movement of the eye parallel to one of the axes of the //! coordinate system of reference of the view a distance //! relative to the initial position expressed by //! Start = Standard_True. - Standard_EXPORT void Move (const V3d_TypeOfAxe Axe, const Quantity_Length Length, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Move (const V3d_TypeOfAxe Axe, const Standard_Real Length, const Standard_Boolean Start = Standard_True); //! Movement of the eye parllel to the current axis //! a distance relative to the initial position //! expressed by Start = Standard_True - Standard_EXPORT void Move (const Quantity_Length Length, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Move (const Standard_Real Length, const Standard_Boolean Start = Standard_True); //! Movement of the ye and the view point parallel to the //! frame of reference of the screen a distance relative //! to the initial position expressed by //! Start = Standard_True - Standard_EXPORT void Translate (const Quantity_Length Dx, const Quantity_Length Dy, const Quantity_Length Dz, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Translate (const Standard_Real Dx, const Standard_Real Dy, const Standard_Real Dz, const Standard_Boolean Start = Standard_True); //! Movement of the eye and the view point parallel to one //! of the axes of the fame of reference of the view a //! distance relative to the initial position //! expressed by Start = Standard_True - Standard_EXPORT void Translate (const V3d_TypeOfAxe Axe, const Quantity_Length Length, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Translate (const V3d_TypeOfAxe Axe, const Standard_Real Length, const Standard_Boolean Start = Standard_True); //! Movement of the eye and view point parallel to //! the current axis a distance relative to the initial //! position expressed by Start = Standard_True - Standard_EXPORT void Translate (const Quantity_Length Length, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Translate (const Standard_Real Length, const Standard_Boolean Start = Standard_True); //! places the point of the view corresponding //! at the pixel position x,y at the center of the window //! and updates the view. - Standard_EXPORT void Place (const Standard_Integer theXp, const Standard_Integer theYp, const Quantity_Factor theZoomFactor = 1); + Standard_EXPORT void Place (const Standard_Integer theXp, const Standard_Integer theYp, const Standard_Real theZoomFactor = 1); //! Rotation of the view point around the frame of reference //! of the screen for which the origin is the eye of the //! projection with a relative angular value in RADIANS //! with respect to the initial position expressed by //! Start = Standard_True - Standard_EXPORT void Turn (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle Az, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Turn (const Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, const Standard_Boolean Start = Standard_True); //! Rotation of the view point around one of the axes of the //! frame of reference of the view for which the origin is //! the eye of the projection with an angular value in //! RADIANS relative to the initial position expressed by //! Start = Standard_True - Standard_EXPORT void Turn (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle Angle, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Turn (const V3d_TypeOfAxe Axe, const Standard_Real Angle, const Standard_Boolean Start = Standard_True); //! Rotation of the view point around the current axis an //! angular value in RADIANS relative to the initial //! position expressed by Start = Standard_True - Standard_EXPORT void Turn (const Quantity_PlaneAngle Angle, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void Turn (const Standard_Real Angle, const Standard_Boolean Start = Standard_True); //! Defines the angular position of the high point of //! the reference frame of the view with respect to the //! Y screen axis with an absolute angular value in //! RADIANS. - Standard_EXPORT void SetTwist (const Quantity_PlaneAngle Angle); + Standard_EXPORT void SetTwist (const Standard_Real Angle); //! Defines the position of the eye.. - Standard_EXPORT void SetEye (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z); + Standard_EXPORT void SetEye (const Standard_Real X, const Standard_Real Y, const Standard_Real Z); //! Defines the Depth of the eye from the view point //! without update the projection . - Standard_EXPORT void SetDepth (const Quantity_Length Depth); + Standard_EXPORT void SetDepth (const Standard_Real Depth); //! Defines the orientation of the projection. - Standard_EXPORT void SetProj (const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz); + Standard_EXPORT void SetProj (const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz); //! Defines the orientation of the projection . Standard_EXPORT void SetProj (const V3d_TypeOfOrientation Orientation); //! Defines the position of the view point. - Standard_EXPORT void SetAt (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z); + Standard_EXPORT void SetAt (const Standard_Real X, const Standard_Real Y, const Standard_Real Z); //! Defines the orientation of the high point. - Standard_EXPORT void SetUp (const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz); + Standard_EXPORT void SetUp (const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz); //! Defines the orientation(SO) of the high point. Standard_EXPORT void SetUp (const V3d_TypeOfOrientation Orientation); @@ -446,7 +445,7 @@ public: //! state prior to panning for relative arguments. If panning is started, //! passing {0, 0} for {theDXv, theDYv} will return view to initial state. //! Performs update of view. - Standard_EXPORT void Panning (const Standard_Real theDXv, const Standard_Real theDYv, const Quantity_Factor theZoomFactor = 1, const Standard_Boolean theToStart = Standard_True); + Standard_EXPORT void Panning (const Standard_Real theDXv, const Standard_Real theDYv, const Standard_Real theZoomFactor = 1, const Standard_Boolean theToStart = Standard_True); //! Relocates center of screen to the point, determined by //! {Xp, Yp} pixel coordinates relative to the bottom-left corner of @@ -458,7 +457,7 @@ public: //! Defines the view projection size in its maximum dimension, //! keeping the inital height/width ratio unchanged. - Standard_EXPORT void SetSize (const Quantity_Length theSize); + Standard_EXPORT void SetSize (const Standard_Real theSize); //! Defines the Depth size of the view //! Front Plane will be set to Size/2. @@ -466,17 +465,17 @@ public: //! Any Object located Above the Front Plane or //! behind the Back Plane will be Clipped . //! NOTE than the XY Size of the View is NOT modified . - Standard_EXPORT void SetZSize (const Quantity_Length SetZSize); + Standard_EXPORT void SetZSize (const Standard_Real SetZSize); //! Zooms the view by a factor relative to the initial //! value expressed by Start = Standard_True //! Updates the view. - Standard_EXPORT void SetZoom (const Quantity_Factor Coef, const Standard_Boolean Start = Standard_True); + Standard_EXPORT void SetZoom (const Standard_Real Coef, const Standard_Boolean Start = Standard_True); //! Zooms the view by a factor relative to the value //! initialised by SetViewMappingDefault(). //! Updates the view. - Standard_EXPORT void SetScale (const Quantity_Factor Coef); + Standard_EXPORT void SetScale (const Standard_Real Coef); //! Sets anisotropic (axial) scale factors , , for view . //! Anisotropic scaling operation is performed through multiplying @@ -494,7 +493,7 @@ public: //! Updates the view. //! @param theMargin [in] the margin coefficient for view borders. //! @param theToUpdate [in] flag to perform view update. - Standard_EXPORT void FitAll (const Quantity_Coefficient theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True); + Standard_EXPORT void FitAll (const Standard_Real theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True); //! Adjust view parameters to fit the displayed scene, respecting height / width ratio //! according to the custom bounding box given. @@ -503,13 +502,13 @@ public: //! @param theBox [in] the custom bounding box to fit. //! @param theMargin [in] the margin coefficient for view borders. //! @param theToUpdate [in] flag to perform view update. - Standard_EXPORT void FitAll (const Bnd_Box& theBox, const Quantity_Coefficient theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True); + Standard_EXPORT void FitAll (const Bnd_Box& theBox, const Standard_Real theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True); //! Adjusts the viewing volume so as not to clip the displayed objects by front and back //! and back clipping planes. Also sets depth value automatically depending on the //! calculated Z size and Aspect parameter. //! NOTE than the original XY size of the view is NOT modified . - Standard_EXPORT void DepthFitAll (const Quantity_Coefficient Aspect = 0.01, const Quantity_Coefficient Margin = 0.01); + Standard_EXPORT void DepthFitAll (const Standard_Real Aspect = 0.01, const Standard_Real Margin = 0.01); //! Centers the defined projection window so that it occupies //! the maximum space while respecting the initial @@ -539,32 +538,37 @@ public: //! Converts the PIXEL value //! to a value in the projection plane. - Standard_EXPORT Quantity_Length Convert (const Standard_Integer Vp) const; + Standard_EXPORT Standard_Real Convert (const Standard_Integer Vp) const; //! Converts the point PIXEL into a point projected //! in the reference frame of the projection plane. - Standard_EXPORT void Convert (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate& Xv, V3d_Coordinate& Yv) const; + Standard_EXPORT void Convert (const Standard_Integer Xp, const Standard_Integer Yp, + Standard_Real& Xv, Standard_Real& Yv) const; //! Converts tha value of the projection plane into //! a PIXEL value. - Standard_EXPORT Standard_Integer Convert (const Quantity_Length Vv) const; + Standard_EXPORT Standard_Integer Convert (const Standard_Real Vv) const; //! Converts the point defined in the reference frame //! of the projection plane into a point PIXEL. - Standard_EXPORT void Convert (const V3d_Coordinate Xv, const V3d_Coordinate Yv, Standard_Integer& Xp, Standard_Integer& Yp) const; + Standard_EXPORT void Convert (const Standard_Real Xv, const Standard_Real Yv, + Standard_Integer& Xp, Standard_Integer& Yp) const; //! Converts the projected point into a point //! in the reference frame of the view corresponding //! to the intersection with the projection plane //! of the eye/view point vector. - Standard_EXPORT void Convert (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) const; + Standard_EXPORT void Convert (const Standard_Integer Xp, const Standard_Integer Yp, + Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; //! Converts the projected point into a point //! in the reference frame of the view corresponding //! to the intersection with the projection plane //! of the eye/view point vector and returns the //! projection ray for further computations. - Standard_EXPORT void ConvertWithProj (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z, Quantity_Parameter& Vx, Quantity_Parameter& Vy, Quantity_Parameter& Vz) const; + Standard_EXPORT void ConvertWithProj (const Standard_Integer Xp, const Standard_Integer Yp, + Standard_Real& X, Standard_Real& Y, Standard_Real& Z, + Standard_Real& Vx, Standard_Real& Vy, Standard_Real& Vz) const; //! Converts the projected point into the nearest grid point //! in the reference frame of the view corresponding @@ -585,15 +589,18 @@ public: //! myView->RedrawImmediate(); //! 2.4) Else this is the standard case //! } else myView->Convert(x,y,X,Y,Z); - Standard_EXPORT void ConvertToGrid (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate& Xg, V3d_Coordinate& Yg, V3d_Coordinate& Zg) const; + Standard_EXPORT void ConvertToGrid (const Standard_Integer Xp, const Standard_Integer Yp, + Standard_Real& Xg, Standard_Real& Yg, Standard_Real& Zg) const; //! Converts the point into the nearest grid point //! and display the grid marker. - Standard_EXPORT void ConvertToGrid (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, V3d_Coordinate& Xg, V3d_Coordinate& Yg, V3d_Coordinate& Zg) const; + Standard_EXPORT void ConvertToGrid (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, + Standard_Real& Xg, Standard_Real& Yg, Standard_Real& Zg) const; //! Projects the point defined in the reference frame of //! the view into the projected point in the associated window. - Standard_EXPORT void Convert (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, Standard_Integer& Xp, Standard_Integer& Yp) const; + Standard_EXPORT void Convert (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, + Standard_Integer& Xp, Standard_Integer& Yp) const; //! Converts the point defined in the user space of //! the view to the projection plane at the depth @@ -616,7 +623,7 @@ public: //! Returns the Background color values of the view //! depending of the color Type. - Standard_EXPORT void BackgroundColor (const Quantity_TypeOfColor Type, Quantity_Parameter& V1, Quantity_Parameter& V2, Quantity_Parameter& V3) const; + Standard_EXPORT void BackgroundColor (const Quantity_TypeOfColor Type, Standard_Real& V1, Standard_Real& V2, Standard_Real& V3) const; //! Returns the Background color object of the view. Standard_EXPORT Quantity_Color BackgroundColor() const; @@ -629,44 +636,46 @@ public: //! Returns the current value of the zoom expressed with //! respect to SetViewMappingDefault(). - Standard_EXPORT Quantity_Factor Scale() const; + Standard_EXPORT Standard_Real Scale() const; //! Returns the current values of the anisotropic (axial) scale factors. Standard_EXPORT void AxialScale (Standard_Real& Sx, Standard_Real& Sy, Standard_Real& Sz) const; //! Returns the height and width of the view. - Standard_EXPORT void Size (Quantity_Length& Width, Quantity_Length& Height) const; + Standard_EXPORT void Size (Standard_Real& Width, Standard_Real& Height) const; //! Returns the Depth of the view . Standard_EXPORT Standard_Real ZSize() const; //! Returns the position of the eye. - Standard_EXPORT void Eye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) const; + Standard_EXPORT void Eye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; //! Returns the position of point which emanating the //! projections. - Standard_EXPORT void FocalReferencePoint (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) const; + Standard_EXPORT void FocalReferencePoint (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; //! Returns the coordinate of the point (Xpix,Ypix) //! in the view (XP,YP,ZP), and the projection vector of the //! view passing by the point (for PerspectiveView). - Standard_EXPORT void ProjReferenceAxe (const Standard_Integer Xpix, const Standard_Integer Ypix, V3d_Coordinate& XP, V3d_Coordinate& YP, V3d_Coordinate& ZP, V3d_Coordinate& VX, V3d_Coordinate& VY, V3d_Coordinate& VZ) const; + Standard_EXPORT void ProjReferenceAxe (const Standard_Integer Xpix, const Standard_Integer Ypix, + Standard_Real& XP, Standard_Real& YP, Standard_Real& ZP, + Standard_Real& VX, Standard_Real& VY, Standard_Real& VZ) const; //! Returns the Distance between the Eye and View Point. - Standard_EXPORT Quantity_Length Depth() const; + Standard_EXPORT Standard_Real Depth() const; //! Returns the projection vector. - Standard_EXPORT void Proj (Quantity_Parameter& Vx, Quantity_Parameter& Vy, Quantity_Parameter& Vz) const; + Standard_EXPORT void Proj (Standard_Real& Vx, Standard_Real& Vy, Standard_Real& Vz) const; //! Returns the position of the view point. - Standard_EXPORT void At (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) const; + Standard_EXPORT void At (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; //! Returns the vector giving the position of the high point. - Standard_EXPORT void Up (Quantity_Parameter& Vx, Quantity_Parameter& Vy, Quantity_Parameter& Vz) const; + Standard_EXPORT void Up (Standard_Real& Vx, Standard_Real& Vy, Standard_Real& Vz) const; //! Returns in RADIANS the orientation of the view around //! the visual axis measured from the Y axis of the screen. - Standard_EXPORT Quantity_PlaneAngle Twist() const; + Standard_EXPORT Standard_Real Twist() const; //! Returns the current shading model. Standard_EXPORT V3d_TypeOfShadingModel ShadingModel() const; @@ -720,7 +729,7 @@ public: //! state prior to panning for relative arguments. Passing 0 for relative //! panning parameter should return view panning to initial state. //! Performs update of view. - Standard_EXPORT void Pan (const Standard_Integer theDXp, const Standard_Integer theDYp, const Quantity_Factor theZoomFactor = 1, const Standard_Boolean theToStart = Standard_True); + Standard_EXPORT void Pan (const Standard_Integer theDXp, const Standard_Integer theDYp, const Standard_Real theZoomFactor = 1, const Standard_Boolean theToStart = Standard_True); //! Zoom the view according to a zoom factor computed //! from the distance between the 2 mouse position. @@ -752,7 +761,7 @@ public: //! Generally a value of 0.4 is usable to rotate around XY screen axis //! inside the circular threshold area and to rotate around Z screen axis //! outside this area. - Standard_EXPORT void StartRotation (const Standard_Integer X, const Standard_Integer Y, const Quantity_Ratio zRotationThreshold = 0.0); + Standard_EXPORT void StartRotation (const Standard_Integer X, const Standard_Integer Y, const Standard_Real zRotationThreshold = 0.0); //! Continues the rotation of the view //! with an angle computed from the last and new mouse position . @@ -761,10 +770,10 @@ public: //! Change View Plane Distance for Perspective Views //! Warning! raises TypeMismatch from Standard if the view //! is not a perspective view. - Standard_EXPORT void SetFocale (const Quantity_Length Focale); + Standard_EXPORT void SetFocale (const Standard_Real Focale); //! Returns the View Plane Distance for Perspective Views - Standard_EXPORT Quantity_Length Focale() const; + Standard_EXPORT Standard_Real Focale() const; //! Returns the associated Graphic3d view. Standard_EXPORT Handle(Graphic3d_CView) View() const; @@ -980,15 +989,15 @@ private: //! Returns the objects number and the projection window //! of the objects contained in the view. - Standard_EXPORT Standard_Integer MinMax (V3d_Coordinate& Umin, V3d_Coordinate& Vmin, V3d_Coordinate& Umax, V3d_Coordinate& Vmax) const; + Standard_EXPORT Standard_Integer MinMax (Standard_Real& Umin, Standard_Real& Vmin, Standard_Real& Umax, Standard_Real& Vmax) const; //! Returns the objects number and the box encompassing //! the objects contained in the view - Standard_EXPORT Standard_Integer MinMax (V3d_Coordinate& Xmin, V3d_Coordinate& Ymin, V3d_Coordinate& Zmin, V3d_Coordinate& Xmax, V3d_Coordinate& Ymax, V3d_Coordinate& Zmax) const; + Standard_EXPORT Standard_Integer MinMax (Standard_Real& Xmin, Standard_Real& Ymin, Standard_Real& Zmin, Standard_Real& Xmax, Standard_Real& Ymax, Standard_Real& Zmax) const; //! Returns the Objects number and the gravity center //! of ALL viewable points in the view - Standard_EXPORT void Gravity (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z) const; + Standard_EXPORT void Gravity (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; Standard_EXPORT void Init(); diff --git a/src/V3d/V3d_View_3.cxx b/src/V3d/V3d_View_3.cxx index 0f5743412d..ae5b59e978 100644 --- a/src/V3d/V3d_View_3.cxx +++ b/src/V3d/V3d_View_3.cxx @@ -190,7 +190,7 @@ void V3d_View::Translate(const V3d_TypeOfAxe Axe, const Standard_Real Length,con //======================================================================= void V3d_View::Place (const Standard_Integer theXp, const Standard_Integer theYp, - const Quantity_Factor theZoomFactor) + const Standard_Real theZoomFactor) { Standard_Integer aWinWidth = 0; Standard_Integer aWinHeight = 0; diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index dfebeea0d1..ab3d5295ca 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -51,10 +51,6 @@ #include #include -#include -#include -#include -#include class Aspect_Grid; class Graphic3d_AspectMarker3d; @@ -329,7 +325,7 @@ public: //! @name privileged plane management Standard_EXPORT void SetPrivilegedPlane (const gp_Ax3& thePlane); - Standard_EXPORT void DisplayPrivilegedPlane (const Standard_Boolean theOnOff, const Quantity_Length theSize = 1); + Standard_EXPORT void DisplayPrivilegedPlane (const Standard_Boolean theOnOff, const Standard_Real theSize = 1); public: //! @name grid management @@ -368,42 +364,42 @@ public: //! @name grid management Standard_EXPORT Aspect_GridDrawMode GridDrawMode() const; //! Returns the definition of the rectangular grid. - Standard_EXPORT void RectangularGridValues (Quantity_Length& XOrigin, Quantity_Length& YOrigin, Quantity_Length& XStep, Quantity_Length& YStep, Quantity_PlaneAngle& RotationAngle) const; + Standard_EXPORT void RectangularGridValues (Standard_Real& XOrigin, Standard_Real& YOrigin, Standard_Real& XStep, Standard_Real& YStep, Standard_Real& RotationAngle) const; //! Sets the definition of the rectangular grid. //! , defines the origin of the grid. //! defines the interval between 2 vertical lines. //! defines the interval between 2 horizontal lines. //! defines the rotation angle of the grid. - Standard_EXPORT void SetRectangularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle RotationAngle); + Standard_EXPORT void SetRectangularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle); //! Returns the definition of the circular grid. - Standard_EXPORT void CircularGridValues (Quantity_Length& XOrigin, Quantity_Length& YOrigin, Quantity_Length& RadiusStep, Standard_Integer& DivisionNumber, Quantity_PlaneAngle& RotationAngle) const; + Standard_EXPORT void CircularGridValues (Standard_Real& XOrigin, Standard_Real& YOrigin, Standard_Real& RadiusStep, Standard_Integer& DivisionNumber, Standard_Real& RotationAngle) const; //! Sets the definition of the circular grid. //! , defines the origin of the grid. //! defines the interval between 2 circles. //! defines the section number of one half circle. //! defines the rotation angle of the grid. - Standard_EXPORT void SetCircularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle); + Standard_EXPORT void SetCircularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle); //! Returns the location and the size of the grid. - Standard_EXPORT void CircularGridGraphicValues (Quantity_Length& Radius, Quantity_Length& OffSet) const; + Standard_EXPORT void CircularGridGraphicValues (Standard_Real& Radius, Standard_Real& OffSet) const; //! Sets the location and the size of the grid. //! defines the width of the grid. //! defines the height of the grid. //! defines the displacement along the plane normal. - Standard_EXPORT void SetCircularGridGraphicValues (const Quantity_Length Radius, const Quantity_Length OffSet); + Standard_EXPORT void SetCircularGridGraphicValues (const Standard_Real Radius, const Standard_Real OffSet); //! Returns the location and the size of the grid. - Standard_EXPORT void RectangularGridGraphicValues (Quantity_Length& XSize, Quantity_Length& YSize, Quantity_Length& OffSet) const; + Standard_EXPORT void RectangularGridGraphicValues (Standard_Real& XSize, Standard_Real& YSize, Standard_Real& OffSet) const; //! Sets the location and the size of the grid. //! defines the width of the grid. //! defines the height of the grid. //! defines the displacement along the plane normal. - Standard_EXPORT void SetRectangularGridGraphicValues (const Quantity_Length XSize, const Quantity_Length YSize, const Quantity_Length OffSet); + Standard_EXPORT void SetRectangularGridGraphicValues (const Standard_Real XSize, const Standard_Real YSize, const Standard_Real OffSet); //! Display grid echo at requested point in the view. Standard_EXPORT void ShowGridEcho (const Handle(V3d_View)& theView, const Graphic3d_Vertex& thePoint); @@ -417,7 +413,7 @@ public: //! @name deprecated methods Standard_EXPORT V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver, const Standard_ExtString theName, const Standard_CString theDomain = "", - const Quantity_Length theViewSize = 1000.0, + const Standard_Real theViewSize = 1000.0, const V3d_TypeOfOrientation theViewProj = V3d_XposYnegZpos, const Quantity_Color& theViewBackground = Quantity_NOC_GRAY30, const V3d_TypeOfVisualization theVisualization = V3d_ZBUFFER, @@ -430,9 +426,9 @@ public: //! @name deprecated methods //! definition and the three component values. Standard_DEPRECATED("This method is deprecated - SetDefaultBackgroundColor() taking Quantity_Color should be used instead") void SetDefaultBackgroundColor (const Quantity_TypeOfColor theType, - const Quantity_Parameter theV1, - const Quantity_Parameter theV2, - const Quantity_Parameter theV3) + const Standard_Real theV1, + const Standard_Real theV2, + const Standard_Real theV3) { Standard_Real aV1 = theV1; Standard_Real aV2 = theV2; @@ -444,7 +440,7 @@ public: //! @name deprecated methods } Standard_DEPRECATED("This method is deprecated - DefaultBackgroundColor() without arguments should be used instead") - void DefaultBackgroundColor (const Quantity_TypeOfColor theType, Quantity_Parameter& theV1, Quantity_Parameter& theV2, Quantity_Parameter& theV3) const + void DefaultBackgroundColor (const Quantity_TypeOfColor theType, Standard_Real& theV1, Standard_Real& theV2, Standard_Real& theV3) const { Quantity_Color aColor = DefaultBackgroundColor(); aColor.Values (theV1, theV2, theV3, theType) ; @@ -496,7 +492,7 @@ private: gp_Ax3 myPrivilegedPlane; Handle(Graphic3d_Structure) myPlaneStructure; Standard_Boolean myDisplayPlane; - Quantity_Length myDisplayPlaneLength; + Standard_Real myDisplayPlaneLength; Handle(V3d_RectangularGrid) myRGrid; Handle(V3d_CircularGrid) myCGrid; diff --git a/src/V3d/V3d_Viewer_3.cxx b/src/V3d/V3d_Viewer_3.cxx index 924a404b3a..7d3805a31d 100644 --- a/src/V3d/V3d_Viewer_3.cxx +++ b/src/V3d/V3d_Viewer_3.cxx @@ -73,7 +73,7 @@ gp_Ax3 V3d_Viewer::PrivilegedPlane() const } /*----------------------------------------------------------------------*/ -void V3d_Viewer::DisplayPrivilegedPlane(const Standard_Boolean OnOff, const Quantity_Length aSize) +void V3d_Viewer::DisplayPrivilegedPlane(const Standard_Boolean OnOff, const Standard_Real aSize) { myDisplayPlane = OnOff; myDisplayPlaneLength = aSize; diff --git a/src/V3d/V3d_Viewer_4.cxx b/src/V3d/V3d_Viewer_4.cxx index 9fbafa2dee..c04bb715e7 100644 --- a/src/V3d/V3d_Viewer_4.cxx +++ b/src/V3d/V3d_Viewer_4.cxx @@ -115,11 +115,11 @@ Standard_Boolean V3d_Viewer::IsActive() const // function : RectangularGridValues // purpose : // ======================================================================= -void V3d_Viewer::RectangularGridValues (Quantity_Length& theXOrigin, - Quantity_Length& theYOrigin, - Quantity_Length& theXStep, - Quantity_Length& theYStep, - Quantity_PlaneAngle& theRotationAngle) const +void V3d_Viewer::RectangularGridValues (Standard_Real& theXOrigin, + Standard_Real& theYOrigin, + Standard_Real& theXStep, + Standard_Real& theYStep, + Standard_Real& theRotationAngle) const { theXOrigin = myRGrid->XOrigin(); theYOrigin = myRGrid->YOrigin(); @@ -132,11 +132,11 @@ void V3d_Viewer::RectangularGridValues (Quantity_Length& theXOrigin, // function : SetRectangularGridValues // purpose : // ======================================================================= -void V3d_Viewer::SetRectangularGridValues (const Quantity_Length theXOrigin, - const Quantity_Length theYOrigin, - const Quantity_Length theXStep, - const Quantity_Length theYStep, - const Quantity_PlaneAngle theRotationAngle) +void V3d_Viewer::SetRectangularGridValues (const Standard_Real theXOrigin, + const Standard_Real theYOrigin, + const Standard_Real theXStep, + const Standard_Real theYStep, + const Standard_Real theRotationAngle) { myRGrid->SetGridValues (theXOrigin, theYOrigin, theXStep, theYStep, theRotationAngle); for (V3d_ListOfView::Iterator anActiveViewIter (myActiveViews); anActiveViewIter.More(); anActiveViewIter.Next()) @@ -149,11 +149,11 @@ void V3d_Viewer::SetRectangularGridValues (const Quantity_Length theXOrigin, // function : CircularGridValues // purpose : // ======================================================================= -void V3d_Viewer::CircularGridValues (Quantity_Length& theXOrigin, - Quantity_Length& theYOrigin, - Quantity_Length& theRadiusStep, - Standard_Integer& theDivisionNumber, - Quantity_PlaneAngle& theRotationAngle) const +void V3d_Viewer::CircularGridValues (Standard_Real& theXOrigin, + Standard_Real& theYOrigin, + Standard_Real& theRadiusStep, + Standard_Integer& theDivisionNumber, + Standard_Real& theRotationAngle) const { theXOrigin = myCGrid->XOrigin(); theYOrigin = myCGrid->YOrigin(); @@ -166,11 +166,11 @@ void V3d_Viewer::CircularGridValues (Quantity_Length& theXOrigin, // function : SetCircularGridValues // purpose : // ======================================================================= -void V3d_Viewer::SetCircularGridValues (const Quantity_Length theXOrigin, - const Quantity_Length theYOrigin, - const Quantity_Length theRadiusStep, - const Standard_Integer theDivisionNumber, - const Quantity_PlaneAngle theRotationAngle) +void V3d_Viewer::SetCircularGridValues (const Standard_Real theXOrigin, + const Standard_Real theYOrigin, + const Standard_Real theRadiusStep, + const Standard_Integer theDivisionNumber, + const Standard_Real theRotationAngle) { myCGrid->SetGridValues (theXOrigin, theYOrigin, theRadiusStep, theDivisionNumber, theRotationAngle); @@ -184,9 +184,9 @@ void V3d_Viewer::SetCircularGridValues (const Quantity_Length theXOrigin, // function : RectangularGridGraphicValues // purpose : // ======================================================================= -void V3d_Viewer::RectangularGridGraphicValues (Quantity_Length& theXSize, - Quantity_Length& theYSize, - Quantity_Length& theOffSet) const +void V3d_Viewer::RectangularGridGraphicValues (Standard_Real& theXSize, + Standard_Real& theYSize, + Standard_Real& theOffSet) const { myRGrid->GraphicValues (theXSize, theYSize, theOffSet); } @@ -195,9 +195,9 @@ void V3d_Viewer::RectangularGridGraphicValues (Quantity_Length& theXSize, // function : SetRectangularGridGraphicValues // purpose : // ======================================================================= -void V3d_Viewer::SetRectangularGridGraphicValues (const Quantity_Length theXSize, - const Quantity_Length theYSize, - const Quantity_Length theOffSet) +void V3d_Viewer::SetRectangularGridGraphicValues (const Standard_Real theXSize, + const Standard_Real theYSize, + const Standard_Real theOffSet) { myRGrid->SetGraphicValues (theXSize, theYSize, theOffSet); } @@ -206,8 +206,8 @@ void V3d_Viewer::SetRectangularGridGraphicValues (const Quantity_Length theXSize // function : CircularGridGraphicValues // purpose : // ======================================================================= -void V3d_Viewer::CircularGridGraphicValues (Quantity_Length& theRadius, - Quantity_Length& theOffSet) const +void V3d_Viewer::CircularGridGraphicValues (Standard_Real& theRadius, + Standard_Real& theOffSet) const { myCGrid->GraphicValues (theRadius, theOffSet); } @@ -216,8 +216,8 @@ void V3d_Viewer::CircularGridGraphicValues (Quantity_Length& theRadius, // function : SetCircularGridGraphicValues // purpose : // ======================================================================= -void V3d_Viewer::SetCircularGridGraphicValues (const Quantity_Length theRadius, - const Quantity_Length theOffSet) +void V3d_Viewer::SetCircularGridGraphicValues (const Standard_Real theRadius, + const Standard_Real theOffSet) { myCGrid->SetGraphicValues (theRadius, theOffSet); } diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index d0cdf8863a..c90e5baf49 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -5006,11 +5006,11 @@ static Standard_Integer VShowFaceBoundary (Draw_Interpretor& /*di*/, TCollection_AsciiString aName (argv[1]); - Quantity_Parameter aRed = 0.0; - Quantity_Parameter aGreen = 0.0; - Quantity_Parameter aBlue = 0.0; - Standard_Real aWidth = 1.0; - Aspect_TypeOfLine aLineType = Aspect_TOL_SOLID; + Standard_Real aRed = 0.0; + Standard_Real aGreen = 0.0; + Standard_Real aBlue = 0.0; + Standard_Real aWidth = 1.0; + Aspect_TypeOfLine aLineType = Aspect_TOL_SOLID; // find object Handle(AIS_InteractiveObject) anInterObj; @@ -5724,9 +5724,9 @@ static int VSetEdgeType (Draw_Interpretor& theDI, return 1; } - Quantity_Parameter aR = Draw::Atof(theArgs[++anIt]); - Quantity_Parameter aG = Draw::Atof(theArgs[++anIt]); - Quantity_Parameter aB = Draw::Atof(theArgs[++anIt]); + Standard_Real aR = Draw::Atof(theArgs[++anIt]); + Standard_Real aG = Draw::Atof(theArgs[++anIt]); + Standard_Real aB = Draw::Atof(theArgs[++anIt]); Quantity_Color aColor = Quantity_Color (aR > 1 ? aR / 255.0 : aR, aG > 1 ? aG / 255.0 : aG, aB > 1 ? aB / 255.0 : aB, diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index e9245b4557..f8cea474c2 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -5039,11 +5039,10 @@ static int VGrid (Draw_Interpretor& /*theDI*/, return 1; } - Quantity_Length anOriginX, anOriginY; - Quantity_PlaneAngle aRotAngle; + Standard_Real anOriginX, anOriginY, aRotAngle; if (aType == Aspect_GT_Rectangular) { - Quantity_Length aRStepX, aRStepY; + Standard_Real aRStepX, aRStepY; aViewer->RectangularGridValues (anOriginX, anOriginY, aRStepX, aRStepY, aRotAngle); anOriginX = Draw::Atof (theArgVec[anIter++]); @@ -5059,7 +5058,7 @@ static int VGrid (Draw_Interpretor& /*theDI*/, } else if (aType == Aspect_GT_Circular) { - Quantity_Length aRadiusStep; + Standard_Real aRadiusStep; Standard_Integer aDivisionNumber; aViewer->CircularGridValues (anOriginX, anOriginY, aRadiusStep, aDivisionNumber, aRotAngle); @@ -5219,8 +5218,8 @@ static int VConvert (Draw_Interpretor& theDI, { switch (aMode) { - case View : theDI << "View Vv: " << aView->Convert ((Standard_Integer) aCoord (1)); return 0; - case Window : theDI << "Window Vp: " << aView->Convert ((Quantity_Length) aCoord (1)); return 0; + case View : theDI << "View Vv: " << aView->Convert ((Standard_Integer)aCoord (1)); return 0; + case Window : theDI << "Window Vp: " << aView->Convert (aCoord (1)); return 0; default: std::cerr << "Error: wrong arguments! See usage:\n"; theDI.PrintHelp (theArgVec[0]); @@ -5244,7 +5243,7 @@ static int VConvert (Draw_Interpretor& theDI, return 0; case Window : - aView->Convert ((V3d_Coordinate) aCoord (1), (V3d_Coordinate) aCoord (2), aXYp[0], aXYp[1]); + aView->Convert (aCoord (1), aCoord (2), aXYp[0], aXYp[1]); theDI << "Window Xp,Yp: " << aXYp[0] << " " << aXYp[1] << "\n"; return 0; @@ -5849,7 +5848,7 @@ static int VReadPixel (Draw_Interpretor& theDI, return 1; } - Quantity_Parameter anAlpha; + Standard_Real anAlpha; Quantity_Color aColor = anImage.PixelColor (anX, anY, anAlpha); if (toShowName) { @@ -6192,8 +6191,8 @@ static int VViewParams (Draw_Interpretor& theDi, Standard_Integer theArgsNb, con Standard_Boolean toSetScale = Standard_False; Standard_Boolean toSetSize = Standard_False; Standard_Boolean toSetCenter2d = Standard_False; - Quantity_Factor aViewScale = aView->Scale(); - Quantity_Length aViewSize = 1.0; + Standard_Real aViewScale = aView->Scale(); + Standard_Real aViewSize = 1.0; Graphic3d_Vec2i aCenter2d; gp_XYZ aViewProj, aViewUp, aViewAt, aViewEye; aView->Proj (aViewProj.ChangeCoord (1), aViewProj.ChangeCoord (2), aViewProj.ChangeCoord (3)); @@ -8579,8 +8578,8 @@ static int VLight (Draw_Interpretor& theDi, return 1; } - Standard_Real anXYZ[3]; - Quantity_Coefficient anAtten[2]; + Standard_Real anXYZ[3] = {}; + Standard_Real anAtten[2] = {}; if (theArgsNb < 2) { // print lights info diff --git a/src/WNT/WNT_Window.cxx b/src/WNT/WNT_Window.cxx index 4fad84e1aa..4e71b6d29f 100644 --- a/src/WNT/WNT_Window.cxx +++ b/src/WNT/WNT_Window.cxx @@ -270,16 +270,16 @@ Aspect_TypeOfResize WNT_Window::DoResize() const // function : Ratio // purpose : // ======================================================================= -Quantity_Ratio WNT_Window::Ratio() const +Standard_Real WNT_Window::Ratio() const { if (IsVirtual()) { - return Quantity_Ratio(aXRight - aXLeft)/ Quantity_Ratio(aYBottom - aYTop); + return Standard_Real(aXRight - aXLeft)/ Standard_Real(aYBottom - aYTop); } RECT aRect; GetClientRect ((HWND )myHWindow, &aRect); - return Quantity_Ratio(aRect.right - aRect.left) / Quantity_Ratio(aRect.bottom - aRect.top); + return Standard_Real(aRect.right - aRect.left) / Standard_Real(aRect.bottom - aRect.top); } // ======================================================================= diff --git a/src/WNT/WNT_Window.hxx b/src/WNT/WNT_Window.hxx index 6e0b78b4c0..7de5c41eef 100644 --- a/src/WNT/WNT_Window.hxx +++ b/src/WNT/WNT_Window.hxx @@ -31,7 +31,6 @@ #include #include #include -#include #include class WNT_WClass; class Aspect_WindowDefinitionError; @@ -93,7 +92,7 @@ public: //! Returns The Window RATIO equal to the physical //! WIDTH/HEIGHT dimensions. - Standard_EXPORT virtual Quantity_Ratio Ratio() const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Ratio() const Standard_OVERRIDE; //! Returns The Window POSITION in PIXEL Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const Standard_OVERRIDE; diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index f95eaad918..c70cbfb3aa 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -991,11 +991,11 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di, const Handle(Prs3d_Drawer)& aDrawer = anInteractive->Attributes (); // default attributes - Quantity_Parameter aRed = 0.0; - Quantity_Parameter aGreen = 0.0; - Quantity_Parameter aBlue = 0.0; - Standard_Real aWidth = 1.0; - Aspect_TypeOfLine aLineType = Aspect_TOL_SOLID; + Standard_Real aRed = 0.0; + Standard_Real aGreen = 0.0; + Standard_Real aBlue = 0.0; + Standard_Real aWidth = 1.0; + Aspect_TypeOfLine aLineType = Aspect_TOL_SOLID; // turn boundaries on/off Standard_Boolean isBoundaryDraw = (Draw::Atoi (argv[3]) == 1); diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx index b75698141d..c4bd6d3f73 100644 --- a/src/Xw/Xw_Window.cxx +++ b/src/Xw/Xw_Window.cxx @@ -360,7 +360,7 @@ Standard_Boolean Xw_Window::DoMapping() const // function : Ratio // purpose : // ======================================================================= -Quantity_Ratio Xw_Window::Ratio() const +Standard_Real Xw_Window::Ratio() const { if (myXWindow == 0) { @@ -370,7 +370,7 @@ Quantity_Ratio Xw_Window::Ratio() const XFlush (myDisplay->GetDisplay()); XWindowAttributes aWinAttr; XGetWindowAttributes (myDisplay->GetDisplay(), myXWindow, &aWinAttr); - return Quantity_Ratio(aWinAttr.width) / Quantity_Ratio(aWinAttr.height); + return Standard_Real(aWinAttr.width) / Standard_Real(aWinAttr.height); } // ======================================================================= diff --git a/src/Xw/Xw_Window.hxx b/src/Xw/Xw_Window.hxx index bf1828189b..0de3457f74 100644 --- a/src/Xw/Xw_Window.hxx +++ b/src/Xw/Xw_Window.hxx @@ -28,8 +28,6 @@ #include #include #include -#include -#include class Aspect_WindowDefinitionError; class Aspect_WindowError; @@ -77,7 +75,7 @@ public: Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE; //! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions - Standard_EXPORT virtual Quantity_Ratio Ratio() const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Ratio() const Standard_OVERRIDE; //! Returns The Window POSITION in PIXEL Standard_EXPORT virtual void Position (Standard_Integer& X1,