1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +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

@ -164,7 +164,7 @@ public:
/// <param name="theZoomFactor">Current zoom</param> /// <param name="theZoomFactor">Current zoom</param>
void Place(int theX, int theY, float theZoomFactor) void Place(int theX, int theY, float theZoomFactor)
{ {
Quantity_Factor aZoomFactor = theZoomFactor; Standard_Real aZoomFactor = theZoomFactor;
if (!myView().IsNull()) if (!myView().IsNull())
{ {
myView()->Place(theX, theY, aZoomFactor); myView()->Place(theX, theY, aZoomFactor);
@ -537,7 +537,7 @@ public:
{ {
Quantity_Color anObjCol; Quantity_Color anObjCol;
myAISContext()->Color (aCurrent, anObjCol); myAISContext()->Color (aCurrent, anObjCol);
Quantity_Parameter r1, r2, r3; Standard_Real r1, r2, r3;
anObjCol.Values(r1, r2, r3, Quantity_TOC_RGB); anObjCol.Values(r1, r2, r3, Quantity_TOC_RGB);
theRed=(int)r1*255; theRed=(int)r1*255;
theGreen=(int)r2*255; theGreen=(int)r2*255;

View File

@ -180,7 +180,7 @@ public:
/// <param name="theZoomFactor">Current zoom</param> /// <param name="theZoomFactor">Current zoom</param>
void Place (int theX, int theY, float theZoomFactor) void Place (int theX, int theY, float theZoomFactor)
{ {
Quantity_Factor aZoomFactor = theZoomFactor; Standard_Real aZoomFactor = theZoomFactor;
if (!myView().IsNull()) if (!myView().IsNull())
{ {
myView()->Place (theX, theY, aZoomFactor); myView()->Place (theX, theY, aZoomFactor);

View File

@ -71,7 +71,7 @@ namespace IE_WPF_D3D
public bool IsMaterialEnabled { get; private set; } public bool IsMaterialEnabled { get; private set; }
public bool IsDeleteEnabled { get; private set; } public bool IsDeleteEnabled { get; private set; }
private float myCurZoom;// ~ Quantity_Factor private float myCurZoom;
private int myXmin; private int myXmin;
private int myYmin; private int myYmin;
private int myXmax; private int myXmax;

View File

@ -70,7 +70,7 @@ namespace IE_WPF_WinForms
public bool IsMaterialEnabled { get; private set; } public bool IsMaterialEnabled { get; private set; }
public bool IsDeleteEnabled { get; private set; } public bool IsDeleteEnabled { get; private set; }
private float myCurZoom;// ~ Quantity_Factor private float myCurZoom;
private int myXmin; private int myXmin;
private int myYmin; private int myYmin;
private int myXmax; private int myXmax;

View File

@ -286,7 +286,7 @@ namespace IE_WinForms
protected CurrentAction3d myCurrentMode; protected CurrentAction3d myCurrentMode;
protected CurrentPressedKey myCurrentPressedKey; protected CurrentPressedKey myCurrentPressedKey;
protected float myCurZoom;// ~ Quantity_Factor protected float myCurZoom;
protected bool myDegenerateModeIsOn; protected bool myDegenerateModeIsOn;
protected int myXmin; protected int myXmin;
protected int myYmin; protected int myYmin;

View File

@ -53,7 +53,7 @@ public:
virtual Standard_Boolean IsMapped() const Standard_OVERRIDE { return Standard_True; } virtual Standard_Boolean IsMapped() const Standard_OVERRIDE { return Standard_True; }
//! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions //! 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 //! Returns The Window POSITION in PIXEL
virtual void Position (Standard_Integer& theX1, virtual void Position (Standard_Integer& theX1,

View File

@ -257,7 +257,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
return aGraphicShape; 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -265,7 +265,7 @@ void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc)
pView->GetViewCenter(Xc,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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -273,7 +273,7 @@ void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc)
pView->SetViewCenter(Xc,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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); pView->SetViewEye(X,Y,Z);
} }
Quantity_Factor OCCDemo_Presentation::GetViewScale() Standard_Real OCCDemo_Presentation::GetViewScale()
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -297,7 +297,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale()
return pView->GetViewScale(); return pView->GetViewScale();
} }
void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) void OCCDemo_Presentation::SetViewScale(Standard_Real Coef)
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();

View File

@ -48,12 +48,12 @@ public:
void NextSample() {myIndex++;} void NextSample() {myIndex++;}
void PrevSample() {myIndex--;} void PrevSample() {myIndex--;}
virtual void DoSample() = 0; virtual void DoSample() = 0;
static void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc);
static void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc);
static void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
static void SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z);
static Quantity_Factor GetViewScale(); static Standard_Real GetViewScale();
static void SetViewScale(Quantity_Factor Coef); static void SetViewScale(Standard_Real Coef);
static void ResetView(); static void ResetView();

View File

@ -9,7 +9,6 @@
#include "OCCDemoView.h" #include "OCCDemoView.h"
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>
#include <V3d_Coordinate.hxx>
#ifdef _DEBUG #ifdef _DEBUG
#undef THIS_FILE #undef THIS_FILE

View File

@ -8,7 +8,6 @@
#include "OCCDemoView.h" #include "OCCDemoView.h"
#include <Graphic3d_GraphicDriver.hxx> #include <Graphic3d_GraphicDriver.hxx>
#include <V3d_Coordinate.hxx>
#define ValZWMin 1 #define ValZWMin 1
@ -548,32 +547,32 @@ void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI)
pCmdUI->Enable (myVisMode != VIS_HLR); 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); 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); 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); 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); myView->SetEye(X,Y,Z);
} }
Quantity_Factor COCCDemoView::GetViewScale() Standard_Real COCCDemoView::GetViewScale()
{ {
return myView->Scale(); return myView->Scale();
} }
void COCCDemoView::SetViewScale(Quantity_Factor Coef) void COCCDemoView::SetViewScale(Standard_Real Coef)
{ {
myView->SetScale(Coef); myView->SetScale(Coef);
} }

View File

@ -33,12 +33,12 @@ public:
void InitButtons(); void InitButtons();
void Reset(); void Reset();
void FitAll() { myView->FitAll(); myView->ZFitAll(); }; void FitAll() { myView->FitAll(); myView->ZFitAll(); };
void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc);
void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc);
void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
void SetViewEye(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); void SetViewEye(const Standard_Real X,const Standard_Real Y,const Standard_Real Z);
Quantity_Factor GetViewScale(); Standard_Real GetViewScale();
void SetViewScale(const Quantity_Factor Coef); void SetViewScale(const Standard_Real Coef);
// Overrides // Overrides
@ -111,7 +111,7 @@ private:
Standard_Integer myYmin; Standard_Integer myYmin;
Standard_Integer myXmax; Standard_Integer myXmax;
Standard_Integer myYmax; Standard_Integer myYmax;
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
private: private:
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };

View File

@ -18,8 +18,6 @@
#include <GeomLProp_CLProps.hxx> #include <GeomLProp_CLProps.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx> #include <GeomAPI_ProjectPointOnCurve.hxx>
#include <V3d_Coordinate.hxx>
#ifdef WNT #ifdef WNT
#define EOL "\r\n" #define EOL "\r\n"
#else #else

View File

@ -56,7 +56,7 @@ void GeomSources::PreProcess(CGeometryDoc* aDoc,DisplayType aDisplayType)
} }
void GeomSources::PostProcess (CGeometryDoc* aDoc, UINT anID, 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(); Standard_CString aString = theString.ToCString();
if (UpdateViewer) if (UpdateViewer)
@ -3808,7 +3808,7 @@ void GeomSources::gpTest47(CGeometryDoc* aDoc)
GeomAPI_PointsToBSplineSurface(array3).Surface(); GeomAPI_PointsToBSplineSurface(array3).Surface();
GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2);
//Quantity_Length dist = ESS.LowerDistance(); //Standard_Real dist = ESS.LowerDistance();
gp_Pnt P1,P2; gp_Pnt P1,P2;
ESS.NearestPoints(P1,P2); ESS.NearestPoints(P1,P2);
@ -3833,7 +3833,7 @@ Handle(Geom_BSplineSurface) aSurf2 = \n\
GeomAPI_PointsToBSplineSurface(array3).Surface(); \n\ GeomAPI_PointsToBSplineSurface(array3).Surface(); \n\
\n\ \n\
GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); \n\ GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); \n\
Quantity_Length dist = ESS.LowerDistance(); \n\ Standard_Real dist = ESS.LowerDistance(); \n\
gp_Pnt P1,P2; \n\ gp_Pnt P1,P2; \n\
ESS.NearestPoints(P1,P2); \n\ ESS.NearestPoints(P1,P2); \n\
\n"); \n");

View File

@ -82,7 +82,7 @@ private:
DisplayType aDisplayType, DisplayType aDisplayType,
const TCollection_AsciiString& aString, const TCollection_AsciiString& aString,
Standard_Boolean UpdateViewer = Standard_True, Standard_Boolean UpdateViewer = Standard_True,
Quantity_Coefficient Coef = -1); Standard_Real Coef = -1);
static void DisplayPoint(CGeometryDoc* aDoc, static void DisplayPoint(CGeometryDoc* aDoc,
const gp_Pnt2d& aPoint, const gp_Pnt2d& aPoint,
const char* aText, const char* aText,

View File

@ -256,7 +256,7 @@ void CGeometryDoc::MoveEvent2D(const Standard_Integer x,
{ {
if(aView->Viewer()->Grid()->IsActive()) 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); aView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ);
//View is not updated automatically in ConvertToGrid //View is not updated automatically in ConvertToGrid
aView->Update(); aView->Update();
@ -470,7 +470,7 @@ void CGeometryDoc::Minimize3D()
//----------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------
// //
//----------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------
void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef) void CGeometryDoc::Fit3DViews(Standard_Real Coef)
{ {
POSITION position = GetFirstViewPosition(); POSITION position = GetFirstViewPosition();
while (position != (POSITION)NULL) 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(); POSITION position = GetFirstViewPosition();
while (position != (POSITION)NULL) while (position != (POSITION)NULL)

View File

@ -20,8 +20,8 @@ public:
void Put2DOnTop(bool isMax = true); void Put2DOnTop(bool isMax = true);
void Put3DOnTop(bool isMax = true); void Put3DOnTop(bool isMax = true);
void Fit2DViews(); void Fit2DViews();
void Set3DViewsZoom(const Quantity_Factor& Coef ); void Set3DViewsZoom(const Standard_Real& Coef );
void Fit3DViews(Quantity_Coefficient Coef); void Fit3DViews(Standard_Real Coef);
void simplify(const TopoDS_Shape& aShape); void simplify(const TopoDS_Shape& aShape);

View File

@ -34,7 +34,7 @@ public:
// Implementation // Implementation
public: public:
virtual ~CGeometryView(); virtual ~CGeometryView();
void FitAll(Quantity_Coefficient Coef) void FitAll(Standard_Real Coef)
{ {
if (Coef != -1) if (Coef != -1)
myView->FitAll(Coef); myView->FitAll(Coef);

View File

@ -4,8 +4,6 @@
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <Quantity_Length.hxx>
#include <Aspect_TypeOfline.hxx> #include <Aspect_TypeOfline.hxx>
#include <Aspect_WidthOfline.hxx> #include <Aspect_WidthOfline.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>

View File

@ -40,7 +40,7 @@ private:
gp_Pnt myPnt; gp_Pnt myPnt;
gp_Dir myDir; gp_Dir myDir;
Standard_Real myLength; Standard_Real myLength;
Quantity_Length myArrowLength; Standard_Real myArrowLength;
}; };
#endif // !defined(AFX_ISession_Direction_H__767C0DB3_A3B0_11D1_8DA3_0800369C8A03__INCLUDED_) #endif // !defined(AFX_ISession_Direction_H__767C0DB3_A3B0_11D1_8DA3_0800369C8A03__INCLUDED_)

View File

@ -3,7 +3,7 @@
gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) 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->Eye(XEye,YEye,ZEye);
aView->At(XAt,YAt,ZAt); aView->At(XAt,YAt,ZAt);
gp_Pnt EyePoint(XEye,YEye,ZEye); gp_Pnt EyePoint(XEye,YEye,ZEye);

View File

@ -257,7 +257,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
return aGraphicShape; 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -265,7 +265,7 @@ void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY
pView->GetViewAt (theX, theY, theZ); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); pView->SetViewEye(X,Y,Z);
} }
Quantity_Factor OCCDemo_Presentation::GetViewScale() Standard_Real OCCDemo_Presentation::GetViewScale()
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -297,7 +297,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale()
return pView->GetViewScale(); return pView->GetViewScale();
} }
void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) void OCCDemo_Presentation::SetViewScale(Standard_Real Coef)
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();

View File

@ -50,12 +50,12 @@ public:
void NextSample() {myIndex++;} void NextSample() {myIndex++;}
void PrevSample() {myIndex--;} void PrevSample() {myIndex--;}
virtual void DoSample() = 0; virtual void DoSample() = 0;
static void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ); static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ);
static void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ);
static void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
static void SetViewEye (V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z);
static Quantity_Factor GetViewScale(); static Standard_Real GetViewScale();
static void SetViewScale(Quantity_Factor Coef); static void SetViewScale(Standard_Real Coef);
static void ResetView(); static void ResetView();
CViewer3dDoc* getDocument() { return myDoc; } 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) 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->Eye(XEye,YEye,ZEye);
aView->At(XAt,YAt,ZAt); aView->At(XAt,YAt,ZAt);
gp_Pnt EyePoint(XEye,YEye,ZEye); 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); 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); 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); 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); myView->SetEye(X,Y,Z);
} }
Quantity_Factor CViewer3dView::GetViewScale() Standard_Real CViewer3dView::GetViewScale()
{ {
return myView->Scale(); return myView->Scale();
} }
void CViewer3dView::SetViewScale(Quantity_Factor Coef) void CViewer3dView::SetViewScale(Standard_Real Coef)
{ {
myView->SetScale(Coef); myView->SetScale(Coef);
} }

View File

@ -44,12 +44,12 @@ public:
void Redraw() { myView->Redraw(); }; void Redraw() { myView->Redraw(); };
void InitButtons(); void InitButtons();
void Reset(); void Reset();
void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const; void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const;
void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ);
void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
void SetViewEye (const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z);
Quantity_Factor GetViewScale(); Standard_Real GetViewScale();
void SetViewScale (const Quantity_Factor Coef); void SetViewScale (const Standard_Real Coef);
void FitAll() { myView->FitAll(); myView->ZFitAll(); }; void FitAll() { myView->FitAll(); myView->ZFitAll(); };
@ -138,7 +138,7 @@ private:
Standard_Integer NbActiveLights; Standard_Integer NbActiveLights;
Standard_Boolean myHlrModeIsOn; Standard_Boolean myHlrModeIsOn;
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
Handle(V3d_AmbientLight) myCurrent_AmbientLight; Handle(V3d_AmbientLight) myCurrent_AmbientLight;
Handle(V3d_SpotLight) myCurrent_SpotLight; Handle(V3d_SpotLight) myCurrent_SpotLight;
Handle(V3d_PositionalLight) myCurrent_PositionalLight; Handle(V3d_PositionalLight) myCurrent_PositionalLight;

View File

@ -258,7 +258,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
return aGraphicShape; 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -266,7 +266,7 @@ void OCCDemo_Presentation::GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc)
pView->GetViewCenter(Xc,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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -274,7 +274,7 @@ void OCCDemo_Presentation::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc)
pView->SetViewCenter(Xc,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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); pView->SetViewEye(X,Y,Z);
} }
Quantity_Factor OCCDemo_Presentation::GetViewScale() Standard_Real OCCDemo_Presentation::GetViewScale()
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -298,7 +298,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale()
return pView->GetViewScale(); return pView->GetViewScale();
} }
void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) void OCCDemo_Presentation::SetViewScale(Standard_Real Coef)
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();

View File

@ -53,12 +53,12 @@ public:
void PrevSample() {myIndex--;} void PrevSample() {myIndex--;}
virtual void DoSample() = 0; virtual void DoSample() = 0;
/* /*
static void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc); static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc);
static void SetViewCenter(const V3d_Coordinate Xc, const V3d_Coordinate Yc); static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc);
static void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
static void SetViewEye(V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z);
static Quantity_Factor GetViewScale(); static Standard_Real GetViewScale();
static void SetViewScale(Quantity_Factor Coef); static void SetViewScale(Standard_Real Coef);
static void ResetView(); static void ResetView();
*/ */

View File

@ -261,13 +261,13 @@ void CSelectionDialog::Apply()
void CSelectionDialog::UpdateProjector() 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->Proj(DX,DY,DZ);
myActiveView->At(XAt,YAt,ZAt); myActiveView->At(XAt,YAt,ZAt);
myActiveView->Up( Vx,Vy,Vz ); myActiveView->Up( Vx,Vy,Vz );
OnDisplay(false); OnDisplay(false);
Standard_Boolean IsPerspective = (myActiveView->Type() == V3d_PERSPECTIVE); 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); Prs3d_Projector aPrs3dProjector(IsPerspective,aFocus,DX,DY,DZ,XAt,YAt,ZAt,Vx,Vy,Vz);
HLRAlgo_Projector aProjector = aPrs3dProjector.Projector(); HLRAlgo_Projector aProjector = aPrs3dProjector.Projector();

View File

@ -135,7 +135,7 @@ private:
Standard_Integer myYmin; Standard_Integer myYmin;
Standard_Integer myXmax; Standard_Integer myXmax;
Standard_Integer myYmax; Standard_Integer myYmax;
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
Standard_Boolean myHlrModeIsOn; Standard_Boolean myHlrModeIsOn;
View3D_CurrentAction myCurrentMode; View3D_CurrentAction myCurrentMode;

View File

@ -259,7 +259,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
return aGraphicShape; 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -267,7 +267,7 @@ void OCCDemo_Presentation::GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY
pView->GetViewAt (theX, theY, theZ); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); 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); pView->SetViewEye(X,Y,Z);
} }
Quantity_Factor OCCDemo_Presentation::GetViewScale() Standard_Real OCCDemo_Presentation::GetViewScale()
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -299,7 +299,7 @@ Quantity_Factor OCCDemo_Presentation::GetViewScale()
return pView->GetViewScale(); return pView->GetViewScale();
} }
void OCCDemo_Presentation::SetViewScale(Quantity_Factor Coef) void OCCDemo_Presentation::SetViewScale(Standard_Real Coef)
{ {
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
@ -315,7 +315,7 @@ void OCCDemo_Presentation::ResetView()
pView->Reset(); 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; CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();

View File

@ -50,14 +50,14 @@ public:
void NextSample() {myIndex++;} void NextSample() {myIndex++;}
void PrevSample() {myIndex--;} void PrevSample() {myIndex--;}
virtual void DoSample() = 0; virtual void DoSample() = 0;
static void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ); static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ);
static void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ);
static void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
static void SetViewEye (V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z); static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z);
static Quantity_Factor GetViewScale(); static Standard_Real GetViewScale();
static void SetViewScale(Quantity_Factor Coef); static void SetViewScale(Standard_Real Coef);
static void ResetView(); 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 // place one-time initialization code in this function
virtual void Init() {} virtual void Init() {}

View File

@ -546,32 +546,32 @@ void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI)
pCmdUI->Enable (myVisMode != VIS_HLR); 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); 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); 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); 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); myView->SetEye(X,Y,Z);
} }
Quantity_Factor COCCDemoView::GetViewScale() Standard_Real COCCDemoView::GetViewScale()
{ {
return myView->Scale(); return myView->Scale();
} }
void COCCDemoView::SetViewScale(Quantity_Factor Coef) void COCCDemoView::SetViewScale(Standard_Real Coef)
{ {
myView->SetScale(Coef); myView->SetScale(Coef);
} }

View File

@ -32,13 +32,13 @@ public:
myView->FitAll(); myView->FitAll();
myView->ZFitAll(); myView->ZFitAll();
}; };
void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const; void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const;
void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ); void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ);
void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z); void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
void SetViewEye (const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z); void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z);
Quantity_Factor GetViewScale(); Standard_Real GetViewScale();
void SetViewScale(const Quantity_Factor Coef); void SetViewScale(const Standard_Real Coef);
void Translate (const V3d_Coordinate theX, const V3d_Coordinate theY); void Translate (const Standard_Real theX, const Standard_Real theY);
// Operations // Operations
@ -116,7 +116,7 @@ private:
Standard_Integer myYmin; Standard_Integer myYmin;
Standard_Integer myXmax; Standard_Integer myXmax;
Standard_Integer myYmax; Standard_Integer myYmax;
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
private: private:
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };

View File

@ -607,7 +607,7 @@ void OCC_2dView::MoveEvent2D(const Standard_Integer x,
{ {
if(myV2dView->Viewer()->Grid()->IsActive()) 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); myV2dView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ);
//View is not updated automatically in ConvertToGrid //View is not updated automatically in ConvertToGrid
myV2dView->Update(); myV2dView->Update();

View File

@ -34,7 +34,7 @@ public:
void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); }; void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
void Redraw() { if ( !myView.IsNull() ) myView->Redraw(); }; 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; } Handle(V3d_View)& GetView() { return myView; }
// Overrides // Overrides

View File

@ -36,7 +36,7 @@ protected:
protected: protected:
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
Standard_Integer myXmin; Standard_Integer myXmin;
Standard_Integer myYmin; Standard_Integer myYmin;
Standard_Integer myXmax; Standard_Integer myXmax;

View File

@ -5,9 +5,9 @@
IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape) IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape)
Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName, Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName,
const Quantity_Length X, const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Factor aScale) const Standard_Real aScale)
:AIS_TexturedShape(TopoDS_Shape()) :AIS_TexturedShape(TopoDS_Shape())
{ {
myFilename = aFileName; myFilename = aFileName;

View File

@ -4,8 +4,6 @@
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <OSD_File.hxx> #include <OSD_File.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_Factor.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
@ -19,13 +17,13 @@ class Sample2D_Image : public AIS_TexturedShape {
public: public:
Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName, Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName,
const Quantity_Length X = 0.0, const Standard_Real X = 0.0,
const Quantity_Length Y = 0.0, const Standard_Real Y = 0.0,
const Quantity_Factor aScale = 1.0); const Standard_Real aScale = 1.0);
Standard_EXPORT inline virtual void GetCoord(Quantity_Length& X,Quantity_Length& Y) const; Standard_EXPORT inline virtual void GetCoord(Standard_Real& X,Standard_Real& Y) const;
Standard_EXPORT inline virtual void SetCoord(const Quantity_Length X,const Quantity_Length Y) ; Standard_EXPORT inline virtual void SetCoord(const Standard_Real X,const Standard_Real Y) ;
Standard_EXPORT inline Quantity_Factor GetScale() const; Standard_EXPORT inline Standard_Real GetScale() const;
Standard_EXPORT inline void SetScale(const Quantity_Factor aNewScale) ; Standard_EXPORT inline void SetScale(const Standard_Real aNewScale) ;
Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ;
DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape) DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape)
@ -34,33 +32,33 @@ private:
protected: protected:
TopoDS_Face myFace; TopoDS_Face myFace;
TCollection_AsciiString myFilename; TCollection_AsciiString myFilename;
Quantity_Length myX; Standard_Real myX;
Quantity_Length myY; Standard_Real myY;
Quantity_Factor myScale; Standard_Real myScale;
}; };
// other inline functions and methods (like "C++: function call" methods) // 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; X = myX;
Y = myY; 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; myX = X;
myY = Y; myY = Y;
} }
inline Quantity_Factor Sample2D_Image::GetScale() const inline Standard_Real Sample2D_Image::GetScale() const
{ {
return myScale; return myScale;
} }
inline void Sample2D_Image::SetScale(const Quantity_Factor aNewScale) inline void Sample2D_Image::SetScale(const Standard_Real aNewScale)
{ {
myScale = aNewScale; myScale = aNewScale;
} }

View File

@ -5,8 +5,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject)
// generic marker // generic marker
Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
const Quantity_Length theYPosition , const Standard_Real theYPosition,
const Aspect_TypeOfMarker theMarkerType, const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor, const Quantity_Color theColor,
const Standard_Real theScaleOrId) const Standard_Real theScaleOrId)
@ -19,8 +19,8 @@ Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition ,
myIndex = theScaleOrId; myIndex = theScaleOrId;
} }
Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
const Quantity_Length theYPosition , const Standard_Real theYPosition,
const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints,
const Aspect_TypeOfMarker theMarkerType, const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor, const Quantity_Color theColor,

View File

@ -18,15 +18,15 @@ Sample2D_CTOM_Ellips
public: public:
// Generic marker // Generic marker
Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition,
const Quantity_Length theYPosition , const Standard_Real theYPosition,
const Aspect_TypeOfMarker theMarkerType, const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor, const Quantity_Color theColor,
const Standard_Real theScaleOrId=5.0); const Standard_Real theScaleOrId=5.0);
// Polyline marker // Polyline marker
Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition,
const Quantity_Length theYPosition , const Standard_Real theYPosition,
const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints,
const Aspect_TypeOfMarker theMarkerType, const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor, const Quantity_Color theColor,
@ -50,13 +50,13 @@ Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /*
Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker; Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker;
Quantity_Length myXPosition ; Standard_Real myXPosition;
Quantity_Length myYPosition ; Standard_Real myYPosition;
Aspect_TypeOfMarker myMarkerType; Aspect_TypeOfMarker myMarkerType;
Quantity_Color myColor; Quantity_Color myColor;
Quantity_Length myWidth ; Standard_Real myWidth;
Quantity_Length myHeight ; Standard_Real myHeight;
Standard_Real myIndex ;//myScaleOrId Standard_Real myIndex;//myScaleOrId
// specific polyline marker // specific polyline marker
Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints; Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints;
}; };

View File

@ -60,9 +60,9 @@ void CCircularGrid::UpdateDialogData()
{ {
UpdateData(TRUE); UpdateData(TRUE);
ASSERT(!myViewer.IsNull()); ASSERT(!myViewer.IsNull());
Quantity_Length XOrigin,YOrigin,RadiusStep; Standard_Real XOrigin,YOrigin,RadiusStep;
Standard_Integer DivisionNumber; Standard_Integer DivisionNumber;
Quantity_PlaneAngle RotationAngle ; Standard_Real RotationAngle;
XOrigin = m_XOrigin ; XOrigin = m_XOrigin ;
YOrigin = m_YOrigin ; YOrigin = m_YOrigin ;
@ -101,9 +101,9 @@ void CCircularGrid::OnUpdateCirctGridRadiusStep()
void CCircularGrid::UpdateValues() void CCircularGrid::UpdateValues()
{ {
Quantity_Length XOrigin,YOrigin,RadiusStep; Standard_Real XOrigin,YOrigin,RadiusStep;
Standard_Integer DivisionNumber; Standard_Integer DivisionNumber;
Quantity_PlaneAngle RotationAngle ; Standard_Real RotationAngle;
myViewer->CircularGridValues(XOrigin, YOrigin, RadiusStep, DivisionNumber, RotationAngle ); myViewer->CircularGridValues(XOrigin, YOrigin, RadiusStep, DivisionNumber, RotationAngle );
m_XOrigin = SavedXOrigin = XOrigin; m_XOrigin = SavedXOrigin = XOrigin;
m_YOrigin = SavedYOrigin = YOrigin; m_YOrigin = SavedYOrigin = YOrigin;

View File

@ -57,9 +57,9 @@ protected:
private : private :
Handle(V3d_Viewer) myViewer; Handle(V3d_Viewer) myViewer;
Quantity_Length SavedXOrigin,SavedYOrigin,SavedRadiusStep; Standard_Real SavedXOrigin,SavedYOrigin,SavedRadiusStep;
Standard_Integer SavedDivisionNumber; Standard_Integer SavedDivisionNumber;
Quantity_PlaneAngle SavedRotationAngle ; Standard_Real SavedRotationAngle;
}; };

View File

@ -52,8 +52,8 @@ void CRectangularGrid::UpdateDialogData()
{ {
UpdateData(TRUE); UpdateData(TRUE);
ASSERT(!myViewer.IsNull()); ASSERT(!myViewer.IsNull());
Quantity_Length XOrigin,YOrigin , XStep, YStep; Standard_Real XOrigin,YOrigin , XStep, YStep;
Quantity_PlaneAngle RotationAngle ; Standard_Real RotationAngle;
XOrigin = m_XOrigin ; XOrigin = m_XOrigin ;
YOrigin = m_YOrigin ; YOrigin = m_YOrigin ;
XStep = m_XStep ; XStep = m_XStep ;
@ -97,8 +97,8 @@ void CRectangularGrid::OnCancel()
void CRectangularGrid::UpdateValues() void CRectangularGrid::UpdateValues()
{ {
Quantity_Length XOrigin,YOrigin , XStep, YStep; Standard_Real XOrigin, YOrigin, XStep, YStep;
Quantity_PlaneAngle RotationAngle ; Standard_Real RotationAngle;
myViewer->RectangularGridValues(XOrigin, YOrigin, XStep, YStep, RotationAngle ); myViewer->RectangularGridValues(XOrigin, YOrigin, XStep, YStep, RotationAngle );
m_XOrigin = SavedXOrigin = XOrigin; m_XOrigin = SavedXOrigin = XOrigin;
m_YOrigin = SavedYOrigin = YOrigin; m_YOrigin = SavedYOrigin = YOrigin;

View File

@ -58,8 +58,8 @@ protected:
private : private :
Handle(V3d_Viewer) myViewer; Handle(V3d_Viewer) myViewer;
Quantity_Length SavedXOrigin,SavedYOrigin , SavedXStep, SavedYStep; Standard_Real SavedXOrigin, SavedYOrigin, SavedXStep, SavedYStep;
Quantity_PlaneAngle SavedRotationAngle ; Standard_Real SavedRotationAngle;
}; };
//{{AFX_INSERT_LOCATION}} //{{AFX_INSERT_LOCATION}}

View File

@ -52,7 +52,7 @@ public:
virtual Standard_Boolean IsMapped() const { return Standard_True; } virtual Standard_Boolean IsMapped() const { return Standard_True; }
//! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions //! 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 //! Returns The Window POSITION in PIXEL
virtual void Position (Standard_Integer& theX1, virtual void Position (Standard_Integer& theX1,

View File

@ -139,10 +139,10 @@ Aspect_TypeOfResize OcctWindow::DoResize() const
// function : Ratio // function : Ratio
// purpose : // purpose :
// ======================================================================= // =======================================================================
Quantity_Ratio OcctWindow::Ratio() const Standard_Real OcctWindow::Ratio() const
{ {
QRect aRect = myWidget->rect(); 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() );
} }
// ======================================================================= // =======================================================================

View File

@ -69,7 +69,7 @@ public:
//! Returns The Window RATIO equal to the physical //! Returns The Window RATIO equal to the physical
//! WIDTH/HEIGHT dimensions. //! WIDTH/HEIGHT dimensions.
virtual Quantity_Ratio Ratio() const; virtual Standard_Real Ratio() const;
virtual void Size( Standard_Integer& theWidth, Standard_Integer& theHeight ) const; virtual void Size( Standard_Integer& theWidth, Standard_Integer& theHeight ) const;

View File

@ -137,7 +137,7 @@ private:
Standard_Integer myYmin; Standard_Integer myYmin;
Standard_Integer myXmax; Standard_Integer myXmax;
Standard_Integer myYmax; Standard_Integer myYmax;
Quantity_Factor myCurZoom; Standard_Real myCurZoom;
Standard_Boolean myHlrModeIsOn; Standard_Boolean myHlrModeIsOn;
QList<QAction*>* myViewActions; QList<QAction*>* myViewActions;
QList<QAction*>* myRaytraceActions; QList<QAction*>* myRaytraceActions;

View File

@ -1132,7 +1132,7 @@ Standard_Boolean AIS::InitAngleBetweenCurvilinearFaces (const TopoDS_Face&
{ {
return Standard_False; return Standard_False;
} }
Quantity_Parameter anU, aV; Standard_Real anU, aV;
aProjector.LowerDistanceParameters (anU, aV); aProjector.LowerDistanceParameters (anU, aV);
theSecondAttach = aSecondSurf->Value (anU, aV); theSecondAttach = aSecondSurf->Value (anU, aV);
} }
@ -1158,7 +1158,7 @@ void AIS::InitLengthBetweenCurvilinearFaces (const TopoDS_Face& theFirstFace,
gp_Dir& theDirOnPlane) gp_Dir& theDirOnPlane)
{ {
GeomAPI_ProjectPointOnSurf aProjector; GeomAPI_ProjectPointOnSurf aProjector;
Quantity_Parameter aPU, aPV; Standard_Real aPU, aPV;
TopExp_Explorer anExplorer (theFirstFace, TopAbs_VERTEX); TopExp_Explorer anExplorer (theFirstFace, TopAbs_VERTEX);
@ -1189,7 +1189,7 @@ void AIS::InitLengthBetweenCurvilinearFaces (const TopoDS_Face& theFirstFace,
aProjector.Init (theFirstAttach, theSecondSurf); aProjector.Init (theFirstAttach, theSecondSurf);
Standard_Integer aBestPointIndex = 0; Standard_Integer aBestPointIndex = 0;
Quantity_Length aMinDist = RealLast(); Standard_Real aMinDist = RealLast();
gp_Dir aLocalDir; gp_Dir aLocalDir;
for (Standard_Integer aPointIt = 1; aPointIt <= aProjector.NbPoints(); aPointIt++) for (Standard_Integer aPointIt = 1; aPointIt <= aProjector.NbPoints(); aPointIt++)

View File

@ -641,7 +641,7 @@ void AIS_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect()); 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 // prepare label string and compute its geometrical width
Standard_Real aLabelWidth; Standard_Real aLabelWidth;
@ -1414,7 +1414,7 @@ void AIS_AngleDimension::FitTextAlignment (const Prs3d_DimensionTextHorizontalPo
{ {
Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); 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 // Prepare label string and compute its geometrical width
Standard_Real aLabelWidth; Standard_Real aLabelWidth;

View File

@ -266,7 +266,7 @@ void AIS_Axis::ComputeFields()
const gp_Dir& oX = anAxis.XDirection(); const gp_Dir& oX = anAxis.XDirection();
const gp_Dir& oY = anAxis.YDirection(); const gp_Dir& oY = anAxis.YDirection();
const gp_Dir& oZ = anAxis.Direction(); 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); Orig.Coord(xo,yo,zo);
myPfirst.SetCoord(xo,yo,zo); myPfirst.SetCoord(xo,yo,zo);

View File

@ -376,8 +376,8 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation
{ {
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation); Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
Quantity_Length aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); Standard_Real aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
if (myDrawer->DimensionAspect()->IsArrows3d()) if (myDrawer->DimensionAspect()->IsArrows3d())
{ {
@ -662,8 +662,8 @@ void AIS_Dimension::DrawLinearDimension (const Handle(Prs3d_Presentation)& thePr
Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
// For extensions we need to know arrow size, text size and extension size: get it from aspect // 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();
Standard_Real anExtensionSize = aDimensionAspect->ExtensionSize(); Standard_Real anExtensionSize = aDimensionAspect->ExtensionSize();
// prepare label string and compute its geometrical width // prepare label string and compute its geometrical width
Standard_Real aLabelWidth; Standard_Real aLabelWidth;
TCollection_ExtendedString aLabelString = GetValueString (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)); aGroupOfSensitives->Add (new Select3D_SensitiveCurve (aSensitiveOwner, aSensitivePnts));
} }
Quantity_Length anArrowLength = myDrawer->DimensionAspect()->ArrowAspect()->Length(); Standard_Real anArrowLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
Standard_Real anArrowAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle(); Standard_Real anArrowAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
// sensitives for arrows // sensitives for arrows
SelectionGeometry::SeqOfArrows::Iterator anArrowIt (mySelectionGeom.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(); Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
// For extensions we need to know arrow size, text size and extension size: get it from aspect // 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 // prepare label string and compute its geometrical width
Standard_Real aLabelWidth; Standard_Real aLabelWidth;

View File

@ -547,7 +547,7 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t
mySecondPoint = AIS::ProjectPointOnPlane (myFirstPoint, aSecondPlane); mySecondPoint = AIS::ProjectPointOnPlane (myFirstPoint, aSecondPlane);
Quantity_Parameter anU, aV; Standard_Real anU, aV;
ElSLib::Parameters (aSecondPlane, mySecondPoint, anU, aV); ElSLib::Parameters (aSecondPlane, mySecondPoint, anU, aV);
BRepTopAdaptor_FClass2d aClassifier (aSecondFace, Precision::Confusion()); BRepTopAdaptor_FClass2d aClassifier (aSecondFace, Precision::Confusion());

View File

@ -162,7 +162,7 @@ void AIS_PlaneTrihedron::Compute(const Handle(PrsMgr_PresentationManager3d)&,
gp_Dir xDir = myPlane->Position().Ax2().XDirection(); gp_Dir xDir = myPlane->Position().Ax2().XDirection();
gp_Pnt orig = myPlane->Position().Ax2().Location(); 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 ); orig.Coord( xo, yo, zo );
xDir.Coord( x, y, z ); xDir.Coord( x, y, z );
first.SetCoord( xo, yo, zo ); first.SetCoord( xo, yo, zo );

View File

@ -23,11 +23,11 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid) IMPLEMENT_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid)
Aspect_CircularGrid::Aspect_CircularGrid Aspect_CircularGrid::Aspect_CircularGrid
(const Quantity_Length aRadiusStep, (const Standard_Real aRadiusStep,
const Standard_Integer aDivisionNumber, const Standard_Integer aDivisionNumber,
const Quantity_Length anXOrigin, const Standard_Real anXOrigin,
const Quantity_Length anYOrigin, const Standard_Real anYOrigin,
const Quantity_PlaneAngle aRotationAngle) const Standard_Real aRotationAngle)
:Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myRadiusStep(aRadiusStep), :Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myRadiusStep(aRadiusStep),
myDivisionNumber(aDivisionNumber) { myDivisionNumber(aDivisionNumber) {
} }
@ -47,11 +47,11 @@ void Aspect_CircularGrid::SetDivisionNumber(const Standard_Integer aNumber) {
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_CircularGrid::SetGridValues void Aspect_CircularGrid::SetGridValues
(const Quantity_Length theXOrigin, (const Standard_Real theXOrigin,
const Quantity_Length theYOrigin, const Standard_Real theYOrigin,
const Quantity_Length theRadiusStep, const Standard_Real theRadiusStep,
const Standard_Integer theDivisionNumber, const Standard_Integer theDivisionNumber,
const Quantity_PlaneAngle theRotationAngle) { const Standard_Real theRotationAngle) {
myXOrigin = theXOrigin; myXOrigin = theXOrigin;
myYOrigin = theYOrigin; myYOrigin = theYOrigin;
Standard_NegativeValue_Raise_if(theRadiusStep < 0., "invalid radius step"); Standard_NegativeValue_Raise_if(theRadiusStep < 0., "invalid radius step");
@ -64,10 +64,10 @@ void Aspect_CircularGrid::SetGridValues
Init(); Init();
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_CircularGrid::Compute(const Quantity_Length X, void Aspect_CircularGrid::Compute(const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
Quantity_Length& gridX, Standard_Real& gridX,
Quantity_Length& gridY) const { Standard_Real& gridY) const {
Standard_Real xo = XOrigin(); Standard_Real xo = XOrigin();
Standard_Real yo = YOrigin(); Standard_Real yo = YOrigin();
@ -131,7 +131,7 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X,
gridY = yo + sn * radius; gridY = yo + sn * radius;
} }
Quantity_Length Aspect_CircularGrid::RadiusStep() const { Standard_Real Aspect_CircularGrid::RadiusStep() const {
return myRadiusStep; return myRadiusStep;
} }

View File

@ -20,75 +20,55 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Aspect_Grid.hxx> #include <Aspect_Grid.hxx>
#include <Quantity_PlaneAngle.hxx>
class Standard_NegativeValue; class Standard_NegativeValue;
class Standard_NullValue; class Standard_NullValue;
class Standard_NumericError; class Standard_NumericError;
class Aspect_CircularGrid; class Aspect_CircularGrid;
DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid) DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid)
class Aspect_CircularGrid : public Aspect_Grid class Aspect_CircularGrid : public Aspect_Grid
{ {
public: public:
//! creates a new grid. By default this grid is not //! creates a new grid. By default this grid is not
//! active. //! 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. //! 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. //! defines the step of the grid.
Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber); 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 //! 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. //! 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. //! returns the x step of the grid.
Standard_EXPORT Standard_Integer DivisionNumber() const; Standard_EXPORT Standard_Integer DivisionNumber() const;
Standard_EXPORT void Init() Standard_OVERRIDE; Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid) DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid)
protected:
private: private:
Standard_Real myRadiusStep;
Quantity_Length myRadiusStep;
Standard_Integer myDivisionNumber; Standard_Integer myDivisionNumber;
Standard_Real myAlpha; Standard_Real myAlpha;
Standard_Real myA1; Standard_Real myA1;
Standard_Real myB1; Standard_Real myB1;
}; };
#endif // _Aspect_CircularGrid_HeaderFile #endif // _Aspect_CircularGrid_HeaderFile

View File

@ -15,7 +15,7 @@
#define _Aspect_Convert_HeaderFile #define _Aspect_Convert_HeaderFile
#include <Standard.hxx> #include <Standard.hxx>
#include <Quantity_Parameter.hxx> #include <Standard_Real.hxx>
//! Auxiliary functions for DCU <-> Pixels conversions. //! Auxiliary functions for DCU <-> Pixels conversions.
namespace Aspect_Convert namespace Aspect_Convert
@ -27,16 +27,16 @@ namespace Aspect_Convert
} }
inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY,
const Quantity_Parameter theQCenterX, const Quantity_Parameter theQCenterY, const Standard_Real theQCenterX, const Standard_Real theQCenterY,
const Quantity_Parameter theQSizeX, const Quantity_Parameter theQSizeY, const Standard_Real theQSizeX, const Standard_Real theQSizeY,
Standard_Integer& thePxLeft, Standard_Integer& thePxTop, Standard_Integer& thePxLeft, Standard_Integer& thePxTop,
Standard_Integer& thePxSizeX, Standard_Integer& thePxSizeY) Standard_Integer& thePxSizeX, Standard_Integer& thePxSizeY)
{ {
Quantity_Parameter theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); Standard_Real theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY);
thePxSizeX = Round (theQSizeX * theParentSizeMin); thePxSizeX = Round (theQSizeX * theParentSizeMin);
thePxSizeY = Round (theQSizeY * theParentSizeMin); thePxSizeY = Round (theQSizeY * theParentSizeMin);
Standard_Integer thePxCenterX = Round(theQCenterX * Quantity_Parameter (theParentPxSizeX)); Standard_Integer thePxCenterX = Round(theQCenterX * Standard_Real (theParentPxSizeX));
Standard_Integer thePxCenterY = Round((1.0 - theQCenterY) * Quantity_Parameter (theParentPxSizeY)); Standard_Integer thePxCenterY = Round((1.0 - theQCenterY) * Standard_Real (theParentPxSizeY));
thePxLeft = thePxCenterX - thePxSizeX / 2; thePxLeft = thePxCenterX - thePxSizeX / 2;
thePxTop = thePxCenterY - thePxSizeY / 2; thePxTop = thePxCenterY - thePxSizeY / 2;
} }
@ -44,16 +44,16 @@ namespace Aspect_Convert
inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, inline void ConvertCoordinates (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY,
const Standard_Integer thePxLeft, const Standard_Integer thePxTop, const Standard_Integer thePxLeft, const Standard_Integer thePxTop,
const Standard_Integer thePxSizeX, const Standard_Integer thePxSizeY, const Standard_Integer thePxSizeX, const Standard_Integer thePxSizeY,
Quantity_Parameter& theQCenterX, Quantity_Parameter& theQCenterY, Standard_Real& theQCenterX, Standard_Real& theQCenterY,
Quantity_Parameter& theQSizeX, Quantity_Parameter& theQSizeY) Standard_Real& theQSizeX, Standard_Real& theQSizeY)
{ {
Quantity_Parameter theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY); Standard_Real theParentSizeMin = Min (theParentPxSizeX, theParentPxSizeY);
theQSizeX = Quantity_Parameter(thePxSizeX) / theParentSizeMin; theQSizeX = Standard_Real(thePxSizeX) / theParentSizeMin;
theQSizeY = Quantity_Parameter(thePxSizeY) / theParentSizeMin; theQSizeY = Standard_Real(thePxSizeY) / theParentSizeMin;
Standard_Integer thePxCenterX = thePxLeft + thePxSizeX / 2; Standard_Integer thePxCenterX = thePxLeft + thePxSizeX / 2;
Standard_Integer thePxCenterY = thePxTop + thePxSizeY / 2; Standard_Integer thePxCenterY = thePxTop + thePxSizeY / 2;
theQCenterX = Quantity_Parameter (thePxCenterX) / Quantity_Parameter (theParentPxSizeX); theQCenterX = Standard_Real (thePxCenterX) / Standard_Real (theParentPxSizeX);
theQCenterY = 1.0 - Quantity_Parameter (thePxCenterY) / Quantity_Parameter (theParentPxSizeY); theQCenterY = 1.0 - Standard_Real (thePxCenterY) / Standard_Real (theParentPxSizeY);
} }
inline void FitIn (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY, inline void FitIn (const Standard_Integer theParentPxSizeX, const Standard_Integer theParentPxSizeY,

View File

@ -19,9 +19,9 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared)
Aspect_Grid::Aspect_Grid( Aspect_Grid::Aspect_Grid(
const Quantity_Length anXOrigin, const Standard_Real anXOrigin,
const Quantity_Length anYOrigin, const Standard_Real anYOrigin,
const Quantity_PlaneAngle anAngle, const Standard_Real anAngle,
const Quantity_Color& aColor, const Quantity_Color& aColor,
const Quantity_Color& aTenthColor) const Quantity_Color& aTenthColor)
: myRotationAngle(anAngle), : 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; myXOrigin = anOrigin;
Init(); Init();
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_Grid::SetYOrigin(const Quantity_Length anOrigin) { void Aspect_Grid::SetYOrigin(const Standard_Real anOrigin) {
myYOrigin = anOrigin; myYOrigin = anOrigin;
Init(); Init();
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_Grid::SetRotationAngle(const Quantity_Length anAngle){ void Aspect_Grid::SetRotationAngle(const Standard_Real anAngle){
myRotationAngle = anAngle; myRotationAngle = anAngle;
Init(); Init();
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_Grid::Rotate(const Quantity_PlaneAngle anAngle) { void Aspect_Grid::Rotate(const Standard_Real anAngle) {
myRotationAngle += anAngle; myRotationAngle += anAngle;
Init(); Init();
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_Grid::Translate(const Quantity_Length aDx, void Aspect_Grid::Translate(const Standard_Real aDx,
const Quantity_Length aDy) { const Standard_Real aDy) {
myXOrigin += aDx; myXOrigin += aDx;
myYOrigin += aDy; myYOrigin += aDy;
Init(); Init();
@ -80,10 +80,10 @@ void Aspect_Grid::Colors(Quantity_Color& aColor,
aTenthColor = myTenthColor; aTenthColor = myTenthColor;
} }
void Aspect_Grid::Hit(const Quantity_Length X, void Aspect_Grid::Hit(const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
Quantity_Length& gridX, Standard_Real& gridX,
Quantity_Length& gridY) const { Standard_Real& gridY) const {
if (myIsActive) { if (myIsActive) {
Compute(X,Y,gridX,gridY);} Compute(X,Y,gridX,gridY);}
else{ else{
@ -99,15 +99,15 @@ void Aspect_Grid::Deactivate () {
myIsActive = Standard_False; myIsActive = Standard_False;
} }
Quantity_Length Aspect_Grid::XOrigin() const { Standard_Real Aspect_Grid::XOrigin() const {
return myXOrigin; return myXOrigin;
} }
Quantity_Length Aspect_Grid::YOrigin() const { Standard_Real Aspect_Grid::YOrigin() const {
return myYOrigin; return myYOrigin;
} }
Quantity_Length Aspect_Grid::RotationAngle() const { Standard_Real Aspect_Grid::RotationAngle() const {
return myRotationAngle; return myRotationAngle;
} }

View File

@ -20,39 +20,33 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Aspect_GridDrawMode.hxx> #include <Aspect_GridDrawMode.hxx>
#include <MMgt_TShared.hxx> #include <MMgt_TShared.hxx>
class Quantity_Color;
class Aspect_Grid; class Aspect_Grid;
DEFINE_STANDARD_HANDLE(Aspect_Grid, MMgt_TShared) DEFINE_STANDARD_HANDLE(Aspect_Grid, MMgt_TShared)
class Aspect_Grid : public MMgt_TShared class Aspect_Grid : public MMgt_TShared
{ {
public: public:
//! defines the x Origin of the grid. //! 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. //! 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. //! 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. //! 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. //! 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 //! Change the colors of the grid
Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor); 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 //! 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 //! if the grid is active. If the grid is not active returns
//! X,Y. //! 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 //! 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 //! activates the grid. The Hit method will return
//! gridx and gridx computed according to the steps //! gridx and gridx computed according to the steps
@ -75,13 +69,13 @@ public:
Standard_EXPORT void Deactivate(); Standard_EXPORT void Deactivate();
//! returns the x Origin of the grid. //! 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. //! 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. //! 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. //! Returns TRUE when the grid is active.
Standard_EXPORT Standard_Boolean IsActive() const; Standard_EXPORT Standard_Boolean IsActive() const;
@ -106,41 +100,28 @@ public:
Standard_EXPORT virtual void Init() = 0; Standard_EXPORT virtual void Init() = 0;
DEFINE_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared) DEFINE_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared)
protected: protected:
//! creates a new grid. By default this grid is not //! creates a new grid. By default this grid is not
//! active. //! 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. //! Updates the grid parameters.
Standard_EXPORT virtual void UpdateDisplay(); Standard_EXPORT virtual void UpdateDisplay();
Quantity_PlaneAngle myRotationAngle; Standard_Real myRotationAngle;
Quantity_Length myXOrigin; Standard_Real myXOrigin;
Quantity_Length myYOrigin; Standard_Real myYOrigin;
Quantity_Color myColor; Quantity_Color myColor;
Quantity_Color myTenthColor; Quantity_Color myTenthColor;
private: private:
Standard_Boolean myIsActive; Standard_Boolean myIsActive;
Aspect_GridDrawMode myDrawMode; Aspect_GridDrawMode myDrawMode;
}; };
#endif // _Aspect_Grid_HeaderFile #endif // _Aspect_Grid_HeaderFile

View File

@ -65,10 +65,10 @@ public:
virtual Standard_Boolean DoMapping() const Standard_OVERRIDE { return Standard_True; } virtual Standard_Boolean DoMapping() const Standard_OVERRIDE { return Standard_True; }
//! Returns window ratio equal to the physical width/height dimensions. //! 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) return (myWidth != 0 && myHeight != 0)
? Quantity_Ratio(myWidth) / Quantity_Ratio(myHeight) ? Standard_Real(myWidth) / Standard_Real(myHeight)
: 1.0; : 1.0;
} }

View File

@ -22,13 +22,13 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid) IMPLEMENT_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid)
Aspect_RectangularGrid::Aspect_RectangularGrid( Aspect_RectangularGrid::Aspect_RectangularGrid(
const Quantity_Length aXStep, const Standard_Real aXStep,
const Quantity_Length aYStep, const Standard_Real aYStep,
const Quantity_Length anXOrigin, const Standard_Real anXOrigin,
const Quantity_Length anYOrigin, const Standard_Real anYOrigin,
const Quantity_PlaneAngle aFirstAngle, const Standard_Real aFirstAngle,
const Quantity_PlaneAngle aSecondAngle, const Standard_Real aSecondAngle,
const Quantity_PlaneAngle aRotationAngle) const Standard_Real aRotationAngle)
:Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myXStep(aXStep),myYStep(aYStep),myFirstAngle(aFirstAngle),mySecondAngle(aSecondAngle) :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_NegativeValue_Raise_if(aStep < 0. , "invalid x step");
Standard_NullValue_Raise_if(aStep == 0. , "invalid y step"); Standard_NullValue_Raise_if(aStep == 0. , "invalid y step");
myXStep = aStep; myXStep = aStep;
@ -51,7 +51,7 @@ void Aspect_RectangularGrid::SetXStep(const Quantity_Length aStep) {
UpdateDisplay(); 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_NegativeValue_Raise_if(aStep < 0. , "invalid x step");
Standard_NullValue_Raise_if(aStep == 0. , "invalid y step"); Standard_NullValue_Raise_if(aStep == 0. , "invalid y step");
myYStep = aStep; myYStep = aStep;
@ -59,9 +59,9 @@ void Aspect_RectangularGrid::SetYStep(const Quantity_Length aStep) {
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_RectangularGrid::SetAngle(const Quantity_PlaneAngle anAngle1, void Aspect_RectangularGrid::SetAngle (const Standard_Real anAngle1,
const Quantity_PlaneAngle anAngle2){ const Standard_Real anAngle2)
{
Standard_NumericError_Raise_if(!CheckAngle (anAngle1,anAngle2 ), Standard_NumericError_Raise_if(!CheckAngle (anAngle1,anAngle2 ),
"axis are parallel"); "axis are parallel");
myFirstAngle = anAngle1; myFirstAngle = anAngle1;
@ -71,11 +71,11 @@ void Aspect_RectangularGrid::SetAngle(const Quantity_PlaneAngle anAngle1,
} }
void Aspect_RectangularGrid::SetGridValues( void Aspect_RectangularGrid::SetGridValues(
const Quantity_Length theXOrigin, const Standard_Real theXOrigin,
const Quantity_Length theYOrigin, const Standard_Real theYOrigin,
const Quantity_Length theXStep, const Standard_Real theXStep,
const Quantity_Length theYStep, const Standard_Real theYStep,
const Quantity_PlaneAngle theRotationAngle) { const Standard_Real theRotationAngle) {
myXOrigin = theXOrigin; myXOrigin = theXOrigin;
myYOrigin = theYOrigin; myYOrigin = theYOrigin;
@ -90,10 +90,10 @@ void Aspect_RectangularGrid::SetGridValues(
UpdateDisplay(); UpdateDisplay();
} }
void Aspect_RectangularGrid::Compute(const Quantity_Length X, void Aspect_RectangularGrid::Compute(const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
Quantity_Length& gridX, Standard_Real& gridX,
Quantity_Length& gridY) const { Standard_Real& gridY) const {
Standard_Real D1 = b1 * X - a1 * Y - c1; Standard_Real D1 = b1 * X - a1 * Y - c1;
Standard_Real D2 = b2 * X - a2 * Y - c2; Standard_Real D2 = b2 * X - a2 * Y - c2;
Standard_Integer n1 = Standard_Integer ( Abs(D1)/myXStep + 0.5); 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; gridY = ( offset2*b1 - offset1*b2) /Delta;
} }
Quantity_Length Aspect_RectangularGrid::XStep() const { Standard_Real Aspect_RectangularGrid::XStep() const {
return myXStep; return myXStep;
} }
Quantity_Length Aspect_RectangularGrid::YStep() const { Standard_Real Aspect_RectangularGrid::YStep() const {
return myYStep; return myYStep;
} }
Quantity_Length Aspect_RectangularGrid::FirstAngle() const { Standard_Real Aspect_RectangularGrid::FirstAngle() const {
return myFirstAngle; return myFirstAngle;
} }
Quantity_Length Aspect_RectangularGrid::SecondAngle() const { Standard_Real Aspect_RectangularGrid::SecondAngle() const {
return mySecondAngle; return mySecondAngle;
} }

View File

@ -20,8 +20,6 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Aspect_Grid.hxx> #include <Aspect_Grid.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
@ -29,11 +27,9 @@ class Standard_NegativeValue;
class Standard_NullValue; class Standard_NullValue;
class Standard_NumericError; class Standard_NumericError;
class Aspect_RectangularGrid; class Aspect_RectangularGrid;
DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid) DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid)
class Aspect_RectangularGrid : public Aspect_Grid class Aspect_RectangularGrid : public Aspect_Grid
{ {
@ -44,57 +40,48 @@ public:
//! active. //! active.
//! The first angle is given relatively to the horizontal. //! The first angle is given relatively to the horizontal.
//! The second angle is given relatively to the vertical. //! 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. //! 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. //! 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 //! defines the angle of the second network
//! the fist angle is given relatively to the horizontal. //! the fist angle is given relatively to the horizontal.
//! the second angle is given relatively to the vertical. //! 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 //! 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. //! 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. //! 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. //! 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. //! 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; Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid) DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid)
protected:
private: private:
Standard_EXPORT Standard_Boolean CheckAngle (const Standard_Real alpha, const Standard_Real beta) const;
Standard_EXPORT Standard_Boolean CheckAngle (const Quantity_PlaneAngle alpha, const Quantity_PlaneAngle beta) const; Standard_Real myXStep;
Standard_Real myYStep;
Quantity_Length myXStep; Standard_Real myFirstAngle;
Quantity_Length myYStep; Standard_Real mySecondAngle;
Quantity_PlaneAngle myFirstAngle;
Quantity_PlaneAngle mySecondAngle;
Standard_Real a1; Standard_Real a1;
Standard_Real b1; Standard_Real b1;
Standard_Real c1; Standard_Real c1;
@ -102,13 +89,6 @@ private:
Standard_Real b2; Standard_Real b2;
Standard_Real c2; Standard_Real c2;
}; };
#endif // _Aspect_RectangularGrid_HeaderFile #endif // _Aspect_RectangularGrid_HeaderFile

View File

@ -28,7 +28,6 @@
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Aspect_GradientFillMethod.hxx> #include <Aspect_GradientFillMethod.hxx>
#include <Aspect_TypeOfResize.hxx> #include <Aspect_TypeOfResize.hxx>
#include <Quantity_Ratio.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <Aspect_Drawable.hxx> #include <Aspect_Drawable.hxx>
class Aspect_WindowDefinitionError; class Aspect_WindowDefinitionError;
@ -91,7 +90,7 @@ public:
//! Returns The Window RATIO equal to the physical //! Returns The Window RATIO equal to the physical
//! WIDTH/HEIGHT dimensions //! 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 //! 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; Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const = 0;

View File

@ -48,8 +48,6 @@
#include <Aspect_Handle.hxx> #include <Aspect_Handle.hxx>
#include <Aspect_TypeOfResize.hxx> #include <Aspect_TypeOfResize.hxx>
#include <Quantity_NameOfColor.hxx> #include <Quantity_NameOfColor.hxx>
#include <Quantity_Parameter.hxx>
#include <Quantity_Ratio.hxx>
class Aspect_WindowDefinitionError; class Aspect_WindowDefinitionError;
class Aspect_WindowError; class Aspect_WindowError;
@ -97,7 +95,7 @@ public:
Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE;
//! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions //! 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 //! Returns The Window POSITION in PIXEL
Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_EXPORT virtual void Position (Standard_Integer& X1,

View File

@ -311,7 +311,7 @@ Standard_Boolean Cocoa_Window::DoMapping() const
// function : Ratio // function : Ratio
// purpose : // purpose :
// ======================================================================= // =======================================================================
Quantity_Ratio Cocoa_Window::Ratio() const Standard_Real Cocoa_Window::Ratio() const
{ {
if (myHView == NULL) if (myHView == NULL)
{ {
@ -323,7 +323,7 @@ Quantity_Ratio Cocoa_Window::Ratio() const
#else #else
NSRect aBounds = [myHView bounds]; NSRect aBounds = [myHView bounds];
#endif #endif
return Quantity_Ratio (aBounds.size.width / aBounds.size.height); return Standard_Real (aBounds.size.width / aBounds.size.height);
} }
// ======================================================================= // =======================================================================

View File

@ -234,14 +234,14 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs
{ {
GeomAPI_ProjectPointOnSurf ProjectorOnSurface; GeomAPI_ProjectPointOnSurf ProjectorOnSurface;
GeomAPI_ProjectPointOnCurve ProjectorOnCurve; GeomAPI_ProjectPointOnCurve ProjectorOnCurve;
Quantity_Parameter U1, V1, U2, V2; Standard_Real U1, V1, U2, V2;
Standard_Real LastU, LastV; Standard_Real LastU, LastV;
Standard_Real SquareTolerance = Precision::SquareConfusion(); Standard_Real SquareTolerance = Precision::SquareConfusion();
ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf ); ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf );
Standard_Integer Index(1); Standard_Integer Index(1);
Quantity_Length MinDist = RealLast(); Standard_Real MinDist = RealLast();
Quantity_Parameter LocalU, LocalV; Standard_Real LocalU, LocalV;
gp_Vec D1U, D1V; gp_Vec D1U, D1V;
gp_Dir LocalDir; gp_Dir LocalDir;
for (Standard_Integer i = 1; i <= ProjectorOnSurface.NbPoints(); i++) for (Standard_Integer i = 1; i <= ProjectorOnSurface.NbPoints(); i++)

View File

@ -34,7 +34,6 @@
#include <Prs3d_Arrow.hxx> #include <Prs3d_Arrow.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Quantity_Length.hxx>
#include <TColgp_Array1OfPnt2d.hxx> #include <TColgp_Array1OfPnt2d.hxx>
#include <TopAbs_Orientation.hxx> #include <TopAbs_Orientation.hxx>
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
@ -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]); 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]); 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 // mei 19/09/96 extrusion infinie -> taille fixe
if (leng >= 20000.) leng = 50; if (leng >= 20000.) leng = 50;

View File

@ -119,7 +119,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
gp_Pnt PointMin = ElCLib::Value(parmin,L3); gp_Pnt PointMin = ElCLib::Value(parmin,L3);
gp_Pnt PointMax = ElCLib::Value(parmax,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); Standard_Real D1(aAxis.Distance(AttachmentPoint1)),coeff(.5);
gp_Pnt pint,Pj_P1,P1Previous = P1; gp_Pnt pint,Pj_P1,P1Previous = P1;

View File

@ -375,7 +375,7 @@ void Graphic3d_Group::Marker (const Graphic3d_Vertex& thePoint,
void Graphic3d_Group::Text (const Standard_CString /*theText*/, void Graphic3d_Group::Text (const Standard_CString /*theText*/,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real /*theHeight*/, const Standard_Real /*theHeight*/,
const Quantity_PlaneAngle /*theAngle*/, const Standard_Real /*theAngle*/,
const Graphic3d_TextPath /*theTp*/, const Graphic3d_TextPath /*theTp*/,
const Graphic3d_HorizontalTextAlignment /*theHta*/, const Graphic3d_HorizontalTextAlignment /*theHta*/,
const Graphic3d_VerticalTextAlignment /*theVta*/, const Graphic3d_VerticalTextAlignment /*theVta*/,
@ -419,7 +419,7 @@ void Graphic3d_Group::Text (const Standard_CString theText,
void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, void Graphic3d_Group::Text (const TCollection_ExtendedString& theText,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_HorizontalTextAlignment theHta,
const Graphic3d_VerticalTextAlignment theVta, const Graphic3d_VerticalTextAlignment theVta,
@ -437,7 +437,7 @@ void Graphic3d_Group::Text (const TCollection_ExtendedString& theText,
void Graphic3d_Group::Text (const TCollection_ExtendedString& theText, void Graphic3d_Group::Text (const TCollection_ExtendedString& theText,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTP, const Graphic3d_TextPath theTP,
const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_HorizontalTextAlignment theHTA,
const Graphic3d_VerticalTextAlignment theVTA, const Graphic3d_VerticalTextAlignment theVTA,
@ -463,7 +463,7 @@ void Graphic3d_Group::Text (const TCollection_ExtendedString& theText,
void Graphic3d_Group::Text (const Standard_CString /*theText*/, void Graphic3d_Group::Text (const Standard_CString /*theText*/,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real /*theHeight*/, const Standard_Real /*theHeight*/,
const Quantity_PlaneAngle /*theAngle*/, const Standard_Real /*theAngle*/,
const Graphic3d_TextPath /*theTp*/, const Graphic3d_TextPath /*theTp*/,
const Graphic3d_HorizontalTextAlignment /*theHta*/, const Graphic3d_HorizontalTextAlignment /*theHta*/,
const Graphic3d_VerticalTextAlignment /*theVta*/, const Graphic3d_VerticalTextAlignment /*theVta*/,

View File

@ -30,7 +30,6 @@
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#include <Graphic3d_Vertex.hxx> #include <Graphic3d_Vertex.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Graphic3d_TextPath.hxx> #include <Graphic3d_TextPath.hxx>
#include <Graphic3d_HorizontalTextAlignment.hxx> #include <Graphic3d_HorizontalTextAlignment.hxx>
#include <Graphic3d_VerticalTextAlignment.hxx> #include <Graphic3d_VerticalTextAlignment.hxx>
@ -177,7 +176,7 @@ public:
//! Coordinates (NPC) Space). //! Coordinates (NPC) Space).
//! AAngle : Orientation of the text //! AAngle : Orientation of the text
//! (with respect to the horizontal). //! (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 <AText> at position <APoint>. //! Creates the string <AText> at position <APoint>.
//! The 3D point of attachment is projected. The text is //! The 3D point of attachment is projected. The text is
@ -204,7 +203,7 @@ public:
//! Coordinates (NPC) Space). //! Coordinates (NPC) Space).
//! AAngle : Orientation of the text //! AAngle : Orientation of the text
//! (with respect to the horizontal). //! (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 <AText> at position <APoint>. //! Creates the string <AText> at position <APoint>.
//! The 3D point of attachment is projected. The text is //! The 3D point of attachment is projected. The text is
@ -225,7 +224,7 @@ public:
Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, Standard_EXPORT virtual void Text (const Standard_CString theTextUtf,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_HorizontalTextAlignment theHTA,
const Graphic3d_VerticalTextAlignment theVTA, const Graphic3d_VerticalTextAlignment theVTA,
@ -236,7 +235,7 @@ public:
Standard_EXPORT virtual void Text (const TCollection_ExtendedString& theText, Standard_EXPORT virtual void Text (const TCollection_ExtendedString& theText,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_HorizontalTextAlignment theHTA,
const Graphic3d_VerticalTextAlignment theVTA, const Graphic3d_VerticalTextAlignment theVTA,

View File

@ -90,7 +90,7 @@ Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray (const Stand
{ {
for (Standard_Integer aColumn = 0; aColumn < aWidth; aColumn++) for (Standard_Integer aColumn = 0; aColumn < aWidth; aColumn++)
{ {
Quantity_Parameter anAlphaValue; Standard_Real anAlphaValue;
Quantity_Color aColor = myImage->PixelColor (aColumn, aRow, anAlphaValue); Quantity_Color aColor = myImage->PixelColor (aColumn, aRow, anAlphaValue);
Standard_Boolean aBitOn = Standard_False; Standard_Boolean aBitOn = Standard_False;
@ -179,7 +179,7 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha()
myImageAlpha = new Image_PixMap(); myImageAlpha = new Image_PixMap();
myImageAlpha->InitZero (Image_Format_Alpha, myImage->Width(), myImage->Height()); myImageAlpha->InitZero (Image_Format_Alpha, myImage->Width(), myImage->Height());
myImageAlpha->SetTopDown (Standard_False); myImageAlpha->SetTopDown (Standard_False);
Quantity_Parameter anAlpha; Standard_Real anAlpha;
for (Standard_Size aRowIter = 0; aRowIter < myImage->Height(); aRowIter++) for (Standard_Size aRowIter = 0; aRowIter < myImage->Height(); aRowIter++)
{ {
Standard_Byte* anImageRow = myImageAlpha->ChangeRow (aRowIter); Standard_Byte* anImageRow = myImageAlpha->ChangeRow (aRowIter);

View File

@ -17,7 +17,6 @@
#define _Graphic3d_MarkerImage_H__ #define _Graphic3d_MarkerImage_H__
#include <TColStd_HArray1OfByte.hxx> #include <TColStd_HArray1OfByte.hxx>
#include <Quantity_Parameter.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
class Image_PixMap; class Image_PixMap;

View File

@ -38,7 +38,6 @@
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d.hxx> #include <Prs3d.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Quantity_Length.hxx>
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>
#include <TColgp_SequenceOfPnt2d.hxx> #include <TColgp_SequenceOfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx> #include <TColStd_Array1OfReal.hxx>
@ -456,12 +455,12 @@ static void FindLimits (const Adaptor3d_Curve& theCurve,
//! @param [in] theU2 maximal curve parameter value //! @param [in] theU2 maximal curve parameter value
//! @param [out] thePoints the container for generated polyline //! @param [out] thePoints the container for generated polyline
//================================================================ //================================================================
static void DrawCurve (Adaptor3d_Curve& theCurve, static void DrawCurve (Adaptor3d_Curve& theCurve,
const Quantity_Length theDeflection, const Standard_Real theDeflection,
const Standard_Real theAngle, const Standard_Real theAngle,
const Standard_Real theU1, const Standard_Real theU1,
const Standard_Real theU2, const Standard_Real theU2,
IVtk_Polyline& thePoints) IVtk_Polyline& thePoints)
{ {
switch (theCurve.GetType()) switch (theCurve.GetType())
{ {

View File

@ -350,7 +350,7 @@ bool Image_AlienPixMap::savePPM (const TCollection_AsciiString& theFileName) con
// Write pixel data // Write pixel data
Quantity_Color aColor; Quantity_Color aColor;
Quantity_Parameter aDummy; Standard_Real aDummy;
Standard_Byte aByte; Standard_Byte aByte;
for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow)
{ {

View File

@ -193,7 +193,7 @@ void Image_PixMap::Clear()
// ======================================================================= // =======================================================================
Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX, Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX,
const Standard_Integer theY, const Standard_Integer theY,
Quantity_Parameter& theAlpha) const Standard_Real& theAlpha) const
{ {
if (IsEmpty() if (IsEmpty()
|| theX < 0 || (Standard_Size )theX >= SizeX() || theX < 0 || (Standard_Size )theX >= SizeX()
@ -209,10 +209,7 @@ Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX,
{ {
const Standard_ShortReal& aPixel = Value<Standard_ShortReal> (theY, theX); const Standard_ShortReal& aPixel = Value<Standard_ShortReal> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel)), return Quantity_Color (aPixel, aPixel, aPixel, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel)),
Quantity_Parameter (Standard_Real (aPixel)),
Quantity_TOC_RGB);
} }
case Image_Format_AlphaF: case Image_Format_AlphaF:
{ {
@ -224,100 +221,67 @@ Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX,
{ {
const Image_ColorRGBAF& aPixel = Value<Image_ColorRGBAF> (theY, theX); const Image_ColorRGBAF& aPixel = Value<Image_ColorRGBAF> (theY, theX);
theAlpha = aPixel.a(); theAlpha = aPixel.a();
return Quantity_Color (Quantity_Parameter (aPixel.r()), return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB);
Quantity_Parameter (aPixel.g()),
Quantity_Parameter (aPixel.b()),
Quantity_TOC_RGB);
} }
case Image_Format_BGRAF: case Image_Format_BGRAF:
{ {
const Image_ColorBGRAF& aPixel = Value<Image_ColorBGRAF> (theY, theX); const Image_ColorBGRAF& aPixel = Value<Image_ColorBGRAF> (theY, theX);
theAlpha = aPixel.a(); theAlpha = aPixel.a();
return Quantity_Color (Quantity_Parameter (aPixel.r()), return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB);
Quantity_Parameter (aPixel.g()),
Quantity_Parameter (aPixel.b()),
Quantity_TOC_RGB);
} }
case Image_Format_RGBF: case Image_Format_RGBF:
{ {
const Image_ColorRGBF& aPixel = Value<Image_ColorRGBF> (theY, theX); const Image_ColorRGBF& aPixel = Value<Image_ColorRGBF> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (aPixel.r()), return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB);
Quantity_Parameter (aPixel.g()),
Quantity_Parameter (aPixel.b()),
Quantity_TOC_RGB);
} }
case Image_Format_BGRF: case Image_Format_BGRF:
{ {
const Image_ColorBGRF& aPixel = Value<Image_ColorBGRF> (theY, theX); const Image_ColorBGRF& aPixel = Value<Image_ColorBGRF> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (aPixel.r()), return Quantity_Color (aPixel.r(), aPixel.g(), aPixel.b(), Quantity_TOC_RGB);
Quantity_Parameter (aPixel.g()),
Quantity_Parameter (aPixel.b()),
Quantity_TOC_RGB);
} }
case Image_Format_RGBA: case Image_Format_RGBA:
{ {
const Image_ColorRGBA& aPixel = Value<Image_ColorRGBA> (theY, theX); const Image_ColorRGBA& aPixel = Value<Image_ColorRGBA> (theY, theX);
theAlpha = Standard_Real (aPixel.a()) / 255.0; theAlpha = Standard_Real (aPixel.a()) / 255.0;
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_BGRA: case Image_Format_BGRA:
{ {
const Image_ColorBGRA& aPixel = Value<Image_ColorBGRA> (theY, theX); const Image_ColorBGRA& aPixel = Value<Image_ColorBGRA> (theY, theX);
theAlpha = Standard_Real (aPixel.a()) / 255.0; theAlpha = Standard_Real (aPixel.a()) / 255.0;
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b() / 255.0), Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_RGB32: case Image_Format_RGB32:
{ {
const Image_ColorRGB32& aPixel = Value<Image_ColorRGB32> (theY, theX); const Image_ColorRGB32& aPixel = Value<Image_ColorRGB32> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_BGR32: case Image_Format_BGR32:
{ {
const Image_ColorBGR32& aPixel = Value<Image_ColorBGR32> (theY, theX); const Image_ColorBGR32& aPixel = Value<Image_ColorBGR32> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_RGB: case Image_Format_RGB:
{ {
const Image_ColorRGB& aPixel = Value<Image_ColorRGB> (theY, theX); const Image_ColorRGB& aPixel = Value<Image_ColorRGB> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_BGR: case Image_Format_BGR:
{ {
const Image_ColorBGR& aPixel = Value<Image_ColorBGR> (theY, theX); const Image_ColorBGR& aPixel = Value<Image_ColorBGR> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0), return Quantity_Color (Standard_Real (aPixel.r()) / 255.0, Standard_Real (aPixel.g()) / 255.0, Standard_Real (aPixel.b()) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_Gray: case Image_Format_Gray:
{ {
const Standard_Byte& aPixel = Value<Standard_Byte> (theY, theX); const Standard_Byte& aPixel = Value<Standard_Byte> (theY, theX);
theAlpha = 1.0; // opaque theAlpha = 1.0; // opaque
return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel) / 255.0), return Quantity_Color (Standard_Real (aPixel) / 255.0, Standard_Real (aPixel) / 255.0, Standard_Real (aPixel) / 255.0, Quantity_TOC_RGB);
Quantity_Parameter (Standard_Real (aPixel) / 255.0),
Quantity_Parameter (Standard_Real (aPixel) / 255.0),
Quantity_TOC_RGB);
} }
case Image_Format_Alpha: case Image_Format_Alpha:
{ {

View File

@ -105,7 +105,7 @@ public: // high-level API
inline Quantity_Color PixelColor (const Standard_Integer theX, inline Quantity_Color PixelColor (const Standard_Integer theX,
const Standard_Integer theY) const const Standard_Integer theY) const
{ {
Quantity_Parameter aDummy; Standard_Real aDummy;
return PixelColor (theX, theY, 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(). //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
Standard_EXPORT Quantity_Color PixelColor (const Standard_Integer theX, Standard_EXPORT Quantity_Color PixelColor (const Standard_Integer theX,
const Standard_Integer theY, const Standard_Integer theY,
Quantity_Parameter& theAlpha) const; Standard_Real& theAlpha) const;
//! Sets the pixel color. This function is relatively slow. //! Sets the pixel color. This function is relatively slow.
//! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().

View File

@ -39,7 +39,6 @@
#include <NCollection_DataMap.hxx> #include <NCollection_DataMap.hxx>
#include <OpenGl_Context.hxx> #include <OpenGl_Context.hxx>
#include <OpenGl_MapOfZLayerSettings.hxx> #include <OpenGl_MapOfZLayerSettings.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_NameOfColor.hxx> #include <Quantity_NameOfColor.hxx>
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#include <TColStd_Array1OfInteger.hxx> #include <TColStd_Array1OfInteger.hxx>

View File

@ -274,7 +274,7 @@ void OpenGl_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theTy
void OpenGl_Group::Text (const Standard_CString theTextUtf, void OpenGl_Group::Text (const Standard_CString theTextUtf,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_HorizontalTextAlignment theHta,
const Graphic3d_VerticalTextAlignment theVta, const Graphic3d_VerticalTextAlignment theVta,
@ -304,7 +304,7 @@ void OpenGl_Group::Text (const Standard_CString theTextUtf,
void OpenGl_Group::Text (const Standard_CString theTextUtf, void OpenGl_Group::Text (const Standard_CString theTextUtf,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_HorizontalTextAlignment theHTA,
const Graphic3d_VerticalTextAlignment theVTA, const Graphic3d_VerticalTextAlignment theVTA,

View File

@ -114,7 +114,7 @@ public:
Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, Standard_EXPORT virtual void Text (const Standard_CString theTextUtf,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_HorizontalTextAlignment theHta,
const Graphic3d_VerticalTextAlignment theVta, const Graphic3d_VerticalTextAlignment theVta,
@ -124,7 +124,7 @@ public:
Standard_EXPORT virtual void Text (const Standard_CString theTextUtf, Standard_EXPORT virtual void Text (const Standard_CString theTextUtf,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Graphic3d_TextPath theTp, const Graphic3d_TextPath theTp,
const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_HorizontalTextAlignment theHTA,
const Graphic3d_VerticalTextAlignment theVTA, const Graphic3d_VerticalTextAlignment theVTA,

View File

@ -31,13 +31,13 @@
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Prs3d::MatchSegment Standard_Boolean Prs3d::MatchSegment
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const gp_Pnt& P1, const gp_Pnt& P1,
const gp_Pnt& P2, const gp_Pnt& P2,
Quantity_Length& dist) Standard_Real& dist)
{ {
Standard_Real X1,Y1,Z1,X2,Y2,Z2; Standard_Real X1,Y1,Z1,X2,Y2,Z2;
P1.Coord(X1,Y1,Z1); P2.Coord(X2,Y2,Z2); P1.Coord(X1,Y1,Z1); P2.Coord(X2,Y2,Z2);

View File

@ -22,7 +22,6 @@
#include <Standard_DefineAlloc.hxx> #include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Quantity_Length.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_NListOfSequenceOfPnt.hxx> #include <Prs3d_NListOfSequenceOfPnt.hxx>
@ -51,7 +50,7 @@ public:
//! draws an arrow at a given location, with respect //! draws an arrow at a given location, with respect
//! to a given direction. //! 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 //! Computes the absolute deflection value depending on
//! the type of deflection in theDrawer: //! the type of deflection in theDrawer:

View File

@ -33,8 +33,8 @@
void Prs3d_Arrow::Draw(const Handle(Graphic3d_Group)& theGroup, void Prs3d_Arrow::Draw(const Handle(Graphic3d_Group)& theGroup,
const gp_Pnt& theLocation, const gp_Pnt& theLocation,
const gp_Dir& theDirection, const gp_Dir& theDirection,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Quantity_Length theLength) const Standard_Real theLength)
{ {
Handle(Graphic3d_ArrayOfSegments) aPrimitives = Prs3d_Arrow::DrawSegments(theLocation, Handle(Graphic3d_ArrayOfSegments) aPrimitives = Prs3d_Arrow::DrawSegments(theLocation,
theDirection, theAngle, theLength, 15); 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, Handle(Graphic3d_ArrayOfSegments) Prs3d_Arrow::DrawSegments (const gp_Pnt& theLocation,
const gp_Dir& theDir, const gp_Dir& theDir,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Quantity_Length theLength, const Standard_Real theLength,
const Standard_Integer theNbSegments) const Standard_Integer theNbSegments)
{ {
Handle(Graphic3d_ArrayOfSegments) aSegments = new Graphic3d_ArrayOfSegments (theNbSegments + 1, 2 * (2 * theNbSegments)); Handle(Graphic3d_ArrayOfSegments) aSegments = new Graphic3d_ArrayOfSegments (theNbSegments + 1, 2 * (2 * theNbSegments));

View File

@ -21,8 +21,6 @@
#include <Graphic3d_ArrayOfTriangles.hxx> #include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_ArrayOfSegments.hxx> #include <Graphic3d_ArrayOfSegments.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
class gp_Ax1; class gp_Ax1;
class gp_Pnt; class gp_Pnt;
@ -55,8 +53,8 @@ public:
//! @param theNbSegments count of points on polyline where location is connected //! @param theNbSegments count of points on polyline where location is connected
Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation, Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation,
const gp_Dir& theDir, const gp_Dir& theDir,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Quantity_Length theLength, const Standard_Real theLength,
const Standard_Integer theNbSegments); const Standard_Integer theNbSegments);
//! Defines the representation of the arrow. //! Defines the representation of the arrow.
@ -69,16 +67,16 @@ public:
Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup, Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
const gp_Pnt& theLocation, const gp_Pnt& theLocation,
const gp_Dir& theDirection, const gp_Dir& theDirection,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Quantity_Length theLength); const Standard_Real theLength);
//! Alias to another method Draw() for backward compatibility. //! Alias to another method Draw() for backward compatibility.
Standard_DEPRECATED("Prs3d_Arrow::Draw() taking Graphic3d_Group should be used instead") Standard_DEPRECATED("Prs3d_Arrow::Draw() taking Graphic3d_Group should be used instead")
static void Draw (const Handle(Prs3d_Presentation)& thePrs, static void Draw (const Handle(Prs3d_Presentation)& thePrs,
const gp_Pnt& theLocation, const gp_Pnt& theLocation,
const gp_Dir& theDirection, const gp_Dir& theDirection,
const Quantity_PlaneAngle theAngle, const Standard_Real theAngle,
const Quantity_Length theLength) const Standard_Real theLength)
{ {
Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength); Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
} }

View File

@ -34,8 +34,8 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect()
// function : Prs3d_ArrowAspect // function : Prs3d_ArrowAspect
// purpose : // purpose :
// ======================================================================= // =======================================================================
Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Quantity_PlaneAngle theAngle, Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Standard_Real theAngle,
const Quantity_Length theLength) const Standard_Real theLength)
: myArrowAspect (new Graphic3d_AspectLine3d (Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0)), : myArrowAspect (new Graphic3d_AspectLine3d (Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0)),
myAngle (theAngle), myAngle (theAngle),
myLength(theLength) myLength(theLength)
@ -59,7 +59,7 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Handle(Graphic3d_AspectLine3d)& theA
// function : SetAngle // function : SetAngle
// purpose : // purpose :
// ======================================================================= // =======================================================================
void Prs3d_ArrowAspect::SetAngle (const Quantity_PlaneAngle theAngle) void Prs3d_ArrowAspect::SetAngle (const Standard_Real theAngle)
{ {
Prs3d_InvalidAngle_Raise_if (theAngle <= 0.0 Prs3d_InvalidAngle_Raise_if (theAngle <= 0.0
|| theAngle >= M_PI / 2.0, "Prs3d_ArrowAspect::SetAngle() - angle out of range"); || theAngle >= M_PI / 2.0, "Prs3d_ArrowAspect::SetAngle() - angle out of range");

View File

@ -19,8 +19,6 @@
#include <Graphic3d_AspectLine3d.hxx> #include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_BasicAspect.hxx> #include <Prs3d_BasicAspect.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
//! A framework for displaying arrows in representations of dimensions and relations. //! A framework for displaying arrows in representations of dimensions and relations.
class Prs3d_ArrowAspect : public Prs3d_BasicAspect class Prs3d_ArrowAspect : public Prs3d_BasicAspect
@ -37,21 +35,21 @@ public:
//! Constructs a framework to display an arrow with a //! Constructs a framework to display an arrow with a
//! shaft of the length aLength and having a head with //! shaft of the length aLength and having a head with
//! sides at the angle anAngle from each other. //! 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); Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect);
//! defines the angle of the arrows. //! 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. //! 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. //! 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. //! 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); } void SetColor (const Quantity_Color& theColor) { myArrowAspect->SetColor (theColor); }
@ -62,8 +60,8 @@ public:
protected: protected:
Handle(Graphic3d_AspectLine3d) myArrowAspect; Handle(Graphic3d_AspectLine3d) myArrowAspect;
Quantity_PlaneAngle myAngle; Standard_Real myAngle;
Quantity_Length myLength; Standard_Real myLength;
}; };

View File

@ -118,7 +118,7 @@ void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfD
// purpose : // purpose :
// ======================================================================= // =======================================================================
void Prs3d_Drawer::SetMaximalChordialDeviation (const Quantity_Length theChordialDeviation) void Prs3d_Drawer::SetMaximalChordialDeviation (const Standard_Real theChordialDeviation)
{ {
myHasOwnChordialDeviation = Standard_True; myHasOwnChordialDeviation = Standard_True;
myChordialDeviation = theChordialDeviation; myChordialDeviation = theChordialDeviation;

View File

@ -20,7 +20,6 @@
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Quantity_Length.hxx>
#include <Aspect_TypeOfDeflection.hxx> #include <Aspect_TypeOfDeflection.hxx>
#include <Graphic3d_GroupAspect.hxx> #include <Graphic3d_GroupAspect.hxx>
#include <Graphic3d_PresentationAttributes.hxx> #include <Graphic3d_PresentationAttributes.hxx>
@ -76,11 +75,11 @@ public:
//! Prs3d_DeflectionCurve //! Prs3d_DeflectionCurve
//! Prs3d_WFDeflectionSurface //! Prs3d_WFDeflectionSurface
//! Prs3d_WFDeflectionRestrictedFace //! 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. //! 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. //! 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() return HasOwnMaximalChordialDeviation() || myLink.IsNull()
? myChordialDeviation ? myChordialDeviation
@ -855,7 +854,7 @@ protected:
Standard_Boolean myHasOwnNbPoints; Standard_Boolean myHasOwnNbPoints;
Standard_Real myMaximalParameterValue; Standard_Real myMaximalParameterValue;
Standard_Boolean myHasOwnMaximalParameterValue; Standard_Boolean myHasOwnMaximalParameterValue;
Quantity_Length myChordialDeviation; Standard_Real myChordialDeviation;
Standard_Boolean myHasOwnChordialDeviation; Standard_Boolean myHasOwnChordialDeviation;
Aspect_TypeOfDeflection myTypeOfDeflection; Aspect_TypeOfDeflection myTypeOfDeflection;
Standard_Boolean myHasOwnTypeOfDeflection; Standard_Boolean myHasOwnTypeOfDeflection;

View File

@ -17,8 +17,6 @@
#ifndef _Prs3d_PlaneAspect_HeaderFile #ifndef _Prs3d_PlaneAspect_HeaderFile
#define _Prs3d_PlaneAspect_HeaderFile #define _Prs3d_PlaneAspect_HeaderFile
#include <Quantity_Length.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
//! A framework to define the display of planes. //! A framework to define the display of planes.
@ -39,24 +37,24 @@ public:
//! Returns the settings for displaying an arrow. //! Returns the settings for displaying an arrow.
const Handle(Prs3d_LineAspect)& ArrowAspect() const { return myArrowAspect; } 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. //! 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. //! 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. //! 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 //! Sets the angle of the arrowhead used in the display
//! of arrows involved in the presentation of planes. //! 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 //! Returns the angle of the arrowhead used in the
//! display of arrows involved in the presentation of planes. //! 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. //! Sets the display attributes defined in DisplayCenterArrow to active.
void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; } void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; }
@ -80,35 +78,35 @@ public:
//! Returns true if the display of isoparameters is allowed. //! Returns true if the display of isoparameters is allowed.
Standard_Boolean DisplayIso() const { return myDrawIso; } 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; myPlaneXLength = theLX;
myPlaneYLength = theLY; myPlaneYLength = theLY;
} }
//! Returns the length of the x axis used in the display of planes. //! 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. //! 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. //! 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. //! Returns the distance between isoparameters used in the display of planes.
Quantity_Length IsoDistance() const { return myIsoDistance; } Standard_Real IsoDistance() const { return myIsoDistance; }
protected: protected:
Handle(Prs3d_LineAspect) myEdgesAspect; Handle(Prs3d_LineAspect) myEdgesAspect;
Handle(Prs3d_LineAspect) myIsoAspect; Handle(Prs3d_LineAspect) myIsoAspect;
Handle(Prs3d_LineAspect) myArrowAspect; Handle(Prs3d_LineAspect) myArrowAspect;
Quantity_Length myArrowsLength; Standard_Real myArrowsLength;
Quantity_Length myArrowsSize; Standard_Real myArrowsSize;
Quantity_PlaneAngle myArrowsAngle; Standard_Real myArrowsAngle;
Quantity_Length myPlaneXLength; Standard_Real myPlaneXLength;
Quantity_Length myPlaneYLength; Standard_Real myPlaneYLength;
Quantity_Length myIsoDistance; Standard_Real myIsoDistance;
Standard_Boolean myDrawCenterArrow; Standard_Boolean myDrawCenterArrow;
Standard_Boolean myDrawEdgesArrows; Standard_Boolean myDrawEdgesArrows;
Standard_Boolean myDrawEdges; Standard_Boolean myDrawEdges;

View File

@ -14,14 +14,12 @@
#ifndef _Prs3d_Point_H__ #ifndef _Prs3d_Point_H__
#define _Prs3d_Point_H__ #define _Prs3d_Point_H__
#include <Graphic3d_ArrayOfPoints.hxx> #include <Graphic3d_ArrayOfPoints.hxx>
#include <Graphic3d_Vertex.hxx> #include <Graphic3d_Vertex.hxx>
#include <Graphic3d_Group.hxx> #include <Graphic3d_Group.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_PointAspect.hxx> #include <Prs3d_PointAspect.hxx>
#include <Prs3d_Root.hxx> #include <Prs3d_Root.hxx>
#include <Quantity_Length.hxx>
template <class AnyPoint, class PointTool> template <class AnyPoint, class PointTool>
class Prs3d_Point : Prs3d_Root class Prs3d_Point : Prs3d_Root
@ -34,7 +32,7 @@ private:
(const AnyPoint& thePoint, (const AnyPoint& thePoint,
const Handle(Graphic3d_Group) theGroup) const Handle(Graphic3d_Group) theGroup)
{ {
Quantity_Length aX,aY,aZ; Standard_Real aX,aY,aZ;
PointTool::Coord(thePoint,aX,aY,aZ); PointTool::Coord(thePoint,aX,aY,aZ);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1); Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (aX, aY, aZ); anArrayOfPoints->AddVertex (aX, aY, aZ);
@ -54,15 +52,16 @@ public:
Standard_EXPORT static Standard_Boolean Match Standard_EXPORT static Standard_Boolean Match
(const AnyPoint& thePoint, (const AnyPoint& thePoint,
const Quantity_Length theX, const Standard_Real theX,
const Quantity_Length theY, const Standard_Real theY,
const Quantity_Length theZ, const Standard_Real theZ,
const Quantity_Length theDistance) const Standard_Real theDistance)
{ {
Quantity_Length aX,aY,aZ; Standard_Real aX,aY,aZ;
PointTool::Coord(thePoint, aX, aY, aZ); PointTool::Coord(thePoint, aX, aY, aZ);
return Sqrt((theX - aX)*(theX - aX) + (theY - aY)*(theY - aY) return Sqrt((theX - aX)*(theX - aX) + (theY - aY)*(theY - aY)
+ (theZ - aZ)*(theZ - aZ)) <= theDistance; + (theZ - aZ)*(theZ - aZ)) <= theDistance;
} }
}; };
#endif #endif

View File

@ -22,7 +22,7 @@
#include <Graphic3d_Structure.hxx> #include <Graphic3d_Structure.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Quantity_Length.hxx>
class Prs3d_Root; class Prs3d_Root;
class Graphic3d_StructureManager; class Graphic3d_StructureManager;
class Graphic3d_Structure; class Graphic3d_Structure;
@ -30,7 +30,6 @@ class Graphic3d_DataStructureManager;
class Geom_Transformation; class Geom_Transformation;
class Graphic3d_Group; class Graphic3d_Group;
class Prs3d_Presentation; class Prs3d_Presentation;
DEFINE_STANDARD_HANDLE(Prs3d_Presentation, Graphic3d_Structure) DEFINE_STANDARD_HANDLE(Prs3d_Presentation, Graphic3d_Structure)

View File

@ -29,16 +29,16 @@ Prs3d_Projector::Prs3d_Projector (const HLRAlgo_Projector& HLPr): MyProjector(HL
Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers, Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers,
const Quantity_Length Focus, const Standard_Real Focus,
const Quantity_Length DX, const Standard_Real DX,
const Quantity_Length DY, const Standard_Real DY,
const Quantity_Length DZ, const Standard_Real DZ,
const Quantity_Length XAt, const Standard_Real XAt,
const Quantity_Length YAt, const Standard_Real YAt,
const Quantity_Length ZAt, const Standard_Real ZAt,
const Quantity_Length XUp, const Standard_Real XUp,
const Quantity_Length YUp, const Standard_Real YUp,
const Quantity_Length ZUp) const Standard_Real ZUp)
{ {
gp_Pnt At (XAt,YAt,ZAt); gp_Pnt At (XAt,YAt,ZAt);
gp_Dir Zpers (DX,DY,DZ); gp_Dir Zpers (DX,DY,DZ);

View File

@ -23,9 +23,6 @@
#include <HLRAlgo_Projector.hxx> #include <HLRAlgo_Projector.hxx>
#include <MMgt_TShared.hxx> #include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Quantity_Length.hxx>
class HLRAlgo_Projector;
class Prs3d_Projector; class Prs3d_Projector;
DEFINE_STANDARD_HANDLE(Prs3d_Projector, MMgt_TShared) DEFINE_STANDARD_HANDLE(Prs3d_Projector, MMgt_TShared)
@ -51,33 +48,17 @@ public:
//! - XAt, YAt and ZAt are the coordinates of the view point; //! - XAt, YAt and ZAt are the coordinates of the view point;
//! - XUp, YUp and ZUp are the coordinates of the //! - XUp, YUp and ZUp are the coordinates of the
//! vertical direction vector. //! 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. //! Returns a projector object for use in a hidden line removal algorithm.
Standard_EXPORT HLRAlgo_Projector Projector() const; Standard_EXPORT HLRAlgo_Projector Projector() const;
DEFINE_STANDARD_RTTIEXT(Prs3d_Projector,MMgt_TShared) DEFINE_STANDARD_RTTIEXT(Prs3d_Projector,MMgt_TShared)
protected:
private: private:
HLRAlgo_Projector MyProjector; HLRAlgo_Projector MyProjector;
}; };
#endif // _Prs3d_Projector_HeaderFile #endif // _Prs3d_Projector_HeaderFile

View File

@ -22,8 +22,6 @@
#include <Graphic3d_HorizontalTextAlignment.hxx> #include <Graphic3d_HorizontalTextAlignment.hxx>
#include <Graphic3d_VerticalTextAlignment.hxx> #include <Graphic3d_VerticalTextAlignment.hxx>
#include <Prs3d_BasicAspect.hxx> #include <Prs3d_BasicAspect.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_PlaneAngle.hxx>
//! Defines the attributes when displaying a text. //! Defines the attributes when displaying a text.
class Prs3d_TextAspect : public Prs3d_BasicAspect class Prs3d_TextAspect : public Prs3d_BasicAspect
@ -46,19 +44,19 @@ public:
void SetHeightWidthRatio (const Standard_Real theRatio) { myTextAspect->SetExpansionFactor (theRatio); } void SetHeightWidthRatio (const Standard_Real theRatio) { myTextAspect->SetExpansionFactor (theRatio); }
//! Sets the length of the box which text will occupy. //! 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. //! Sets the height of the text.
void SetHeight (const Standard_Real theHeight) { myHeight = theHeight; } void SetHeight (const Standard_Real theHeight) { myHeight = theHeight; }
//! Sets the angle //! 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. //! Returns the height of the text box.
Standard_Real Height() const { return myHeight; } Standard_Real Height() const { return myHeight; }
//! Returns the angle //! Returns the angle
Quantity_PlaneAngle Angle() const { return myAngle; } Standard_Real Angle() const { return myAngle; }
//! Sets horizontal alignment of text. //! Sets horizontal alignment of text.
void SetHorizontalJustification (const Graphic3d_HorizontalTextAlignment theJustification) { myHorizontalJustification = theJustification; } void SetHorizontalJustification (const Graphic3d_HorizontalTextAlignment theJustification) { myHorizontalJustification = theJustification; }
@ -108,7 +106,7 @@ public:
protected: protected:
Handle(Graphic3d_AspectText3d) myTextAspect; Handle(Graphic3d_AspectText3d) myTextAspect;
Quantity_PlaneAngle myAngle; Standard_Real myAngle;
Standard_Real myHeight; Standard_Real myHeight;
Graphic3d_HorizontalTextAlignment myHorizontalJustification; Graphic3d_HorizontalTextAlignment myHorizontalJustification;
Graphic3d_VerticalTextAlignment myVerticalJustification; Graphic3d_VerticalTextAlignment myVerticalJustification;

View File

@ -24,7 +24,6 @@
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Aspect_TypeOfHighlightMethod.hxx> #include <Aspect_TypeOfHighlightMethod.hxx>
#include <Quantity_Length.hxx>
class PrsMgr_PresentationManager; class PrsMgr_PresentationManager;
class PrsMgr_Prs; class PrsMgr_Prs;

View File

@ -103,7 +103,7 @@ static Standard_Integer OCC281bug (Draw_Interpretor& di, Standard_Integer argc,
if (aViewer->IsActive()) { if (aViewer->IsActive()) {
if (aViewer->GridEcho()) { if (aViewer->GridEcho()) {
V3d_Coordinate X,Y,Z; Standard_Real X,Y,Z;
aView->ConvertToGrid(x,y,X,Y,Z); aView->ConvertToGrid(x,y,X,Y,Z);
} else { } else {
di << "NOT aViewer->GridEcho()\n"; di << "NOT aViewer->GridEcho()\n";

View File

@ -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 #define RGBHLS_H_UNDEFINED -1.0
static Quantity_Parameter TheEpsilon = 0.0001; static Standard_Real TheEpsilon = 0.0001;
// -- les composantes RGB // -- les composantes RGB
// MyRed : Standard_ShortReal; // MyRed : Standard_ShortReal;
@ -78,7 +78,7 @@ Quantity_Color::Quantity_Color (const Quantity_NameOfColor AName) {
(AName, Quantity_TOC_RGB, MyRed, MyGreen, MyBlue); (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) { 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) { 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; Standard_ShortReal MyHue, MyLight, MySaturation;
Quantity_Color::rgbhls Quantity_Color::rgbhls
(MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation); (MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation);
DC = Quantity_Parameter (MySaturation - AColor.Saturation ()); DC = Standard_Real (MySaturation - AColor.Saturation ());
DI = Quantity_Parameter (MyLight - AColor.Light ()); DI = Standard_Real (MyLight - AColor.Light ());
} }
@ -292,19 +292,18 @@ Standard_Integer Begin, End, Current;
} }
Quantity_Parameter Quantity_Color::Epsilon () { Standard_Real Quantity_Color::Epsilon()
{
return (TheEpsilon); return TheEpsilon;
} }
void Quantity_Color::SetEpsilon (const Quantity_Parameter AnEpsilon) { void Quantity_Color::SetEpsilon (const Standard_Real AnEpsilon) {
TheEpsilon = 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. || if ( R < 0. || R > 1. ||
G < 0. || G > 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)); return (Standard_Real (MyRed));
} }
Quantity_Parameter Quantity_Color::Green () const { Standard_Real Quantity_Color::Green () const {
return (Standard_Real (MyGreen)); return (Standard_Real (MyGreen));
} }
Quantity_Parameter Quantity_Color::Blue () const { Standard_Real Quantity_Color::Blue () const {
return (Standard_Real (MyBlue)); return (Standard_Real (MyBlue));
} }
Quantity_Parameter Quantity_Color::Hue () const { Standard_Real Quantity_Color::Hue () const {
Standard_ShortReal MyHue, MyLight, MySaturation; 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; 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; 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) { switch (AType) {
case Quantity_TOC_RGB : case Quantity_TOC_RGB :
R1 = Quantity_Parameter (MyRed); R1 = Standard_Real (MyRed);
R2 = Quantity_Parameter (MyGreen); R2 = Standard_Real (MyGreen);
R3 = Quantity_Parameter (MyBlue); R3 = Standard_Real (MyBlue);
break; break;
case Quantity_TOC_HLS : case Quantity_TOC_HLS :
@ -385,16 +384,16 @@ void Quantity_Color::Values (Quantity_Parameter& R1, Quantity_Parameter& R2, Qua
Quantity_Color::rgbhls Quantity_Color::rgbhls
(MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation); (MyRed, MyGreen, MyBlue, MyHue, MyLight, MySaturation);
R1 = Quantity_Parameter (MyHue); R1 = Standard_Real (MyHue);
R2 = Quantity_Parameter (MyLight); R2 = Standard_Real (MyLight);
R3 = Quantity_Parameter (MySaturation); R3 = Standard_Real (MySaturation);
} }
break; 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; Standard_ShortReal HH, LL, SS;
@ -403,13 +402,13 @@ Standard_ShortReal HH, LL, SS;
Standard_ShortReal (B), Standard_ShortReal (B),
HH, LL, SS); HH, LL, SS);
H = Quantity_Parameter (HH); H = Standard_Real (HH);
L = Quantity_Parameter (LL); L = Standard_Real (LL);
S = Quantity_Parameter (SS); 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; Standard_ShortReal RR, GG, BB;
@ -418,9 +417,9 @@ Standard_ShortReal RR, GG, BB;
Standard_ShortReal (S), Standard_ShortReal (S),
RR, GG, BB); RR, GG, BB);
R = Quantity_Parameter (RR); R = Standard_Real (RR);
G = Quantity_Parameter (GG); G = Standard_Real (GG);
B = Quantity_Parameter (BB); B = Standard_Real (BB);
} }
@ -462,10 +461,10 @@ void Quantity_Color::Color2argb (const Quantity_Color& theColor,
void Quantity_Color::Argb2color (const Standard_Integer theARGB, void Quantity_Color::Argb2color (const Standard_Integer theARGB,
Quantity_Color& theColor) Quantity_Color& theColor)
{ {
const Quantity_Parameter aColor[3] = { const Standard_Real aColor[3] = {
static_cast <Quantity_Parameter> ((theARGB & 0xff0000) >> 16), static_cast <Standard_Real> ((theARGB & 0xff0000) >> 16),
static_cast <Quantity_Parameter> ((theARGB & 0x00ff00) >> 8), static_cast <Standard_Real> ((theARGB & 0x00ff00) >> 8),
static_cast <Quantity_Parameter> ((theARGB & 0x0000ff)) static_cast <Standard_Real> ((theARGB & 0x0000ff))
}; };
theColor.SetValues(aColor[0] / 255.0, aColor[1] / 255.0, aColor[2] / 255.0, theColor.SetValues(aColor[0] / 255.0, aColor[1] / 255.0, aColor[2] / 255.0,
Quantity_TOC_RGB); Quantity_TOC_RGB);
@ -3626,9 +3625,9 @@ void TestOfColor ();
void TestOfColor () { void TestOfColor () {
Quantity_Parameter H, L, S; Standard_Real H, L, S;
Quantity_Parameter R, G, B; Standard_Real R, G, B;
Quantity_Parameter DC, DI; Standard_Real DC, DI;
Standard_Integer i; Standard_Integer i;
cout << "definition color tests\n----------------------\n"; cout << "definition color tests\n----------------------\n";
@ -3643,7 +3642,7 @@ const char *const cyan = "YELLOW";
const char *const blue = "ROYALBLUE2"; const char *const blue = "ROYALBLUE2";
const char *const brown = "SANDYBROWN"; const char *const brown = "SANDYBROWN";
Quantity_Parameter RR, GG, BB; Standard_Real RR, GG, BB;
const Standard_Real DELTA = 1.0e-4; const Standard_Real DELTA = 1.0e-4;

View File

@ -22,7 +22,6 @@
#include <Standard_ShortReal.hxx> #include <Standard_ShortReal.hxx>
#include <Quantity_NameOfColor.hxx> #include <Quantity_NameOfColor.hxx>
#include <Quantity_Parameter.hxx>
#include <Quantity_TypeOfColor.hxx> #include <Quantity_TypeOfColor.hxx>
#include <Quantity_Rate.hxx> #include <Quantity_Rate.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
@ -71,9 +70,9 @@ public:
//! Value -1.0 is a special value reserved for grayscale color (S should be 0.0). //! 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] //! - theR2 is the Lightness (L) within range [0.0; 1.0]
//! - theR3 is the Saturation (S) 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, Standard_EXPORT Quantity_Color (const Standard_Real theR1,
const Quantity_Parameter theR2, const Standard_Real theR2,
const Quantity_Parameter theR3, const Standard_Real theR3,
const Quantity_TypeOfColor theType); const Quantity_TypeOfColor theType);
//! Define color from RGB values. //! 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). //! -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] //! - theR2 is the Lightness (L) within range [0.0; 1.0]
//! - theR3 is the Saturation (S) 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, Standard_EXPORT void SetValues (const Standard_Real theR1,
const Quantity_Parameter theR2, const Standard_Real theR2,
const Quantity_Parameter theR3, const Standard_Real theR3,
const Quantity_TypeOfColor theType); const Quantity_TypeOfColor theType);
//! Returns the percentage change of contrast and intensity //! Returns the percentage change of contrast and intensity
@ -121,7 +120,7 @@ public:
//! The calculation is with respect to the current value of <me> //! The calculation is with respect to the current value of <me>
//! If <DC> is positive then <me> is more contrasty. //! If <DC> is positive then <me> is more contrasty.
//! If <DI> is positive then <me> is more intense. //! If <DI> is positive then <me> 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 //! Returns the distance between two colours. It's a
//! value between 0 and the square root of 3 //! value between 0 and the square root of 3
@ -132,15 +131,15 @@ public:
Standard_EXPORT Standard_Real SquareDistance (const Quantity_Color& AColor) const; 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]. //! 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]. //! 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 //! Returns the Hue component (hue angle) of the color
//! in degrees within range [0.0; 360.0], 0.0 being Red. //! 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) //! -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 <me> and //! Returns Standard_True if the distance between <me> and
//! <Other> is greater than Epsilon (). //! <Other> 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]. //! 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 //! Returns the name of the color defined by its
//! quantities of red R, green G and blue B; more //! 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; Standard_EXPORT Quantity_NameOfColor Name() const;
//! Returns the Red component (quantity of red) of the color within range [0.0; 1.0]. //! 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]. //! 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. //! Return the color as vector of 3 float elements.
operator const NCollection_Vec3<float>&() const { return *(const NCollection_Vec3<float>* )this; } operator const NCollection_Vec3<float>&() const { return *(const NCollection_Vec3<float>* )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). //! -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] //! - theR2 is the Lightness (L) within range [0.0; 1.0]
//! - theR3 is the Saturation (S) within range [0.0; 1.0] //! - theR3 is the Saturation (S) within range [0.0; 1.0]
Standard_EXPORT void Values (Quantity_Parameter& theR1, Standard_EXPORT void Values (Standard_Real& theR1,
Quantity_Parameter& theR2, Standard_Real& theR2,
Quantity_Parameter& theR3, Standard_Real& theR3,
const Quantity_TypeOfColor theType) const; const Quantity_TypeOfColor theType) const;
//! Sets the specified value used to compare <me> and //! Sets the specified value used to compare <me> and
//! an other color in IsDifferent and in IsEqual methods. //! an other color in IsDifferent and in IsEqual methods.
//! Warning: The default value is 0.0001 //! 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 <me> and //! Returns the specified value used to compare <me> and
//! an other color in IsDifferent and in IsEqual methods. //! 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 //! Returns the name of the colour for which the RGB components
//! are nearest to <R>, <G> and <B>. //! are nearest to <R>, <G> and <B>.
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 //! Returns the name of the color identified by
//! AName in the Quantity_NameOfColor enumeration. //! 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); Standard_EXPORT static Standard_Boolean ColorFromName (const Standard_CString theName, Quantity_NameOfColor& theColor);
//! Converts HLS components into RGB ones. //! 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. //! 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. //! Convert the Color value to ARGB integer value.
//! theARGB has Alpha equal to zero, so the output is //! theARGB has Alpha equal to zero, so the output is
@ -242,18 +241,8 @@ Standard_Boolean operator == (const Quantity_Color& Other) const
//! Internal test //! Internal test
Standard_EXPORT static void Test(); Standard_EXPORT static void Test();
protected:
private: private:
//! Converts HLS components into RGB ones. //! 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); 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 MyGreen;
Standard_ShortReal MyBlue; Standard_ShortReal MyBlue;
}; };
#endif // _Quantity_Color_HeaderFile #endif // _Quantity_Color_HeaderFile

View File

@ -145,17 +145,17 @@ static void DrawCurve (const Adaptor3d_Curve& aCurve,
// purpose: // purpose:
//================================================================== //==================================================================
static Standard_Boolean MatchCurve ( static Standard_Boolean MatchCurve (
const Quantity_Length X, const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Quantity_Length TheDeflection, const Standard_Real TheDeflection,
const Standard_Integer NbP, const Standard_Integer NbP,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2) const Standard_Real U2)
{ {
Quantity_Length retdist; Standard_Real retdist;
switch (aCurve.GetType()) switch (aCurve.GetType())
{ {
case GeomAbs_Line: case GeomAbs_Line:
@ -310,10 +310,10 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_Curve::Match Standard_Boolean StdPrs_Curve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Handle (Prs3d_Drawer)& aDrawer) const Handle (Prs3d_Drawer)& aDrawer)
{ {
@ -332,12 +332,12 @@ Standard_Boolean StdPrs_Curve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_Curve::Match Standard_Boolean StdPrs_Curve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Quantity_Length aDeflection, const Standard_Real aDeflection,
const Standard_Real aLimit, const Standard_Real aLimit,
const Standard_Integer NbPoints) const Standard_Integer NbPoints)
{ {
@ -354,10 +354,10 @@ Standard_Boolean StdPrs_Curve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_Curve::Match Standard_Boolean StdPrs_Curve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
@ -380,14 +380,14 @@ Standard_Boolean StdPrs_Curve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_Curve::Match Standard_Boolean StdPrs_Curve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
const Quantity_Length aDeflection, const Standard_Real aDeflection,
const Standard_Integer aNbPoints) const Standard_Integer aNbPoints)
{ {
return MatchCurve(X,Y,Z,aDistance,aCurve,aDeflection,aNbPoints,U1,U2); return MatchCurve(X,Y,Z,aDistance,aCurve,aDeflection,aNbPoints,U1,U2);

View File

@ -25,7 +25,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Quantity_Length.hxx>
#include <TColgp_SequenceOfPnt.hxx> #include <TColgp_SequenceOfPnt.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
class Prs3d_Presentation; class Prs3d_Presentation;
@ -80,45 +79,24 @@ public:
//! returns true if the distance between the point (X,Y,Z) and the //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve is less than aDistance. //! 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 //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve is less than aDistance. //! 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 //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve aCurve is less than aDistance. //! drawing of the curve aCurve is less than aDistance.
//! The drawing is considered between the points //! The drawing is considered between the points
//! of parameter U1 and U2; //! 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 //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve aCurve is less than aDistance. //! drawing of the curve aCurve is less than aDistance.
//! The drawing is considered between the points //! The drawing is considered between the points
//! of parameter U1 and U2; //! 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); 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);
protected:
private:
}; };
#endif // _StdPrs_Curve_HeaderFile #endif // _StdPrs_Curve_HeaderFile

View File

@ -131,7 +131,7 @@ static Standard_Boolean FindLimits(const Adaptor3d_Curve& aCurve,
//================================================================== //==================================================================
static void drawCurve (Adaptor3d_Curve& aCurve, static void drawCurve (Adaptor3d_Curve& aCurve,
const Handle(Graphic3d_Group)& aGroup, const Handle(Graphic3d_Group)& aGroup,
const Quantity_Length TheDeflection, const Standard_Real TheDeflection,
const Standard_Real anAngle, const Standard_Real anAngle,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
@ -206,17 +206,17 @@ static void drawCurve (Adaptor3d_Curve& aCurve,
// purpose: // purpose:
//================================================================== //==================================================================
static Standard_Boolean MatchCurve ( static Standard_Boolean MatchCurve (
const Quantity_Length X, const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Quantity_Length TheDeflection, const Standard_Real TheDeflection,
const Standard_Real anAngle, const Standard_Real anAngle,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2) const Standard_Real U2)
{ {
Quantity_Length retdist; Standard_Real retdist;
switch (aCurve.GetType()) switch (aCurve.GetType())
{ {
case GeomAbs_Line: case GeomAbs_Line:
@ -444,10 +444,10 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_DeflectionCurve::Match Standard_Boolean StdPrs_DeflectionCurve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Handle (Prs3d_Drawer)& aDrawer) const Handle (Prs3d_Drawer)& aDrawer)
{ {
@ -467,10 +467,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_DeflectionCurve::Match Standard_Boolean StdPrs_DeflectionCurve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
@ -492,10 +492,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_DeflectionCurve::Match Standard_Boolean StdPrs_DeflectionCurve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
@ -510,10 +510,10 @@ Standard_Boolean StdPrs_DeflectionCurve::Match
// purpose: // purpose:
//================================================================== //==================================================================
Standard_Boolean StdPrs_DeflectionCurve::Match Standard_Boolean StdPrs_DeflectionCurve::Match
(const Quantity_Length X, (const Standard_Real X,
const Quantity_Length Y, const Standard_Real Y,
const Quantity_Length Z, const Standard_Real Z,
const Quantity_Length aDistance, const Standard_Real aDistance,
const Adaptor3d_Curve& aCurve, const Adaptor3d_Curve& aCurve,
const Standard_Real aDeflection, const Standard_Real aDeflection,
const Standard_Real aLimit, const Standard_Real aLimit,

View File

@ -26,7 +26,7 @@
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <TColgp_SequenceOfPnt.hxx> #include <TColgp_SequenceOfPnt.hxx>
#include <Quantity_Length.hxx>
class Prs3d_Presentation; class Prs3d_Presentation;
class Adaptor3d_Curve; class Adaptor3d_Curve;
@ -90,25 +90,25 @@ public:
//! returns true if the distance between the point (X,Y,Z) and the //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve aCurve with respect of the maximal //! drawing of the curve aCurve with respect of the maximal
//! chordial deviation defined by the drawer aDrawer is less then aDistance. //! 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 //! returns true if the distance between the point (X,Y,Z) and the
//! drawing of the curve aCurve with respect of the maximal //! drawing of the curve aCurve with respect of the maximal
//! chordial deviation defined by the drawer aDrawer is less //! chordial deviation defined by the drawer aDrawer is less
//! then aDistance. The drawing is considered between the points //! then aDistance. The drawing is considered between the points
//! of parameter U1 and U2; //! 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) //! 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. //! 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 Adaptor3d_Curve& theCurve,
const Standard_Real theDeflection, const Standard_Real theLimit, const Standard_Real theAngle); const Standard_Real theDeflection, const Standard_Real theLimit, const Standard_Real theAngle);
//! Returns true if the distance between the point (theX, theY, theZ) //! 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. //! 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. //! 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 Adaptor3d_Curve& theCurve, const Standard_Real theU1, const Standard_Real theU2,
const Standard_Real theDeflection, const Standard_Real theAngle); const Standard_Real theDeflection, const Standard_Real theAngle);

Some files were not shown because too many files have changed in this diff Show More