1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

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.
This commit is contained in:
kgv
2017-05-30 13:43:59 +03:00
committed by bugmaster
parent 3f5aa017e7
commit ee2be2a881
130 changed files with 891 additions and 1218 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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; }

View File

@@ -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);
}

View File

@@ -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;