1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

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

View File

@@ -20,75 +20,55 @@
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Aspect_Grid.hxx>
#include <Quantity_PlaneAngle.hxx>
class Standard_NegativeValue;
class Standard_NullValue;
class Standard_NumericError;
class Aspect_CircularGrid;
DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid)
class Aspect_CircularGrid : public Aspect_Grid
{
public:
//! creates a new grid. By default this grid is not
//! active.
Standard_EXPORT Aspect_CircularGrid(const Quantity_Length aRadiusStep, const Standard_Integer aDivisionNumber, const Quantity_Length XOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aRotationAngle = 0);
Standard_EXPORT Aspect_CircularGrid(const Standard_Real aRadiusStep, const Standard_Integer aDivisionNumber, const Standard_Real XOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aRotationAngle = 0);
//! defines the x step of the grid.
Standard_EXPORT void SetRadiusStep (const Quantity_Length aStep);
Standard_EXPORT void SetRadiusStep (const Standard_Real aStep);
//! defines the step of the grid.
Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber);
Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle);
Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle);
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const Standard_OVERRIDE;
Standard_EXPORT void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length RadiusStep() const;
Standard_EXPORT Standard_Real RadiusStep() const;
//! returns the x step of the grid.
Standard_EXPORT Standard_Integer DivisionNumber() const;
Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid,Aspect_Grid)
protected:
private:
Quantity_Length myRadiusStep;
Standard_Real myRadiusStep;
Standard_Integer myDivisionNumber;
Standard_Real myAlpha;
Standard_Real myA1;
Standard_Real myB1;
};
#endif // _Aspect_CircularGrid_HeaderFile

View File

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

View File

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

View File

@@ -20,39 +20,33 @@
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Boolean.hxx>
#include <Aspect_GridDrawMode.hxx>
#include <MMgt_TShared.hxx>
class Quantity_Color;
class Aspect_Grid;
DEFINE_STANDARD_HANDLE(Aspect_Grid, MMgt_TShared)
class Aspect_Grid : public MMgt_TShared
{
public:
//! defines the x Origin of the grid.
Standard_EXPORT void SetXOrigin (const Quantity_Length anOrigin);
Standard_EXPORT void SetXOrigin (const Standard_Real anOrigin);
//! defines the y Origin of the grid.
Standard_EXPORT void SetYOrigin (const Quantity_Length anOrigin);
Standard_EXPORT void SetYOrigin (const Standard_Real anOrigin);
//! defines the orientation of the the grid.
Standard_EXPORT void SetRotationAngle (const Quantity_PlaneAngle anAngle);
Standard_EXPORT void SetRotationAngle (const Standard_Real anAngle);
//! Rotate the grid from a relative angle.
Standard_EXPORT void Rotate (const Quantity_PlaneAngle anAngle);
Standard_EXPORT void Rotate (const Standard_Real anAngle);
//! Translate the grid from a relative distance.
Standard_EXPORT void Translate (const Quantity_Length aDx, const Quantity_Length aDy);
Standard_EXPORT void Translate (const Standard_Real aDx, const Standard_Real aDy);
//! Change the colors of the grid
Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor);
@@ -60,10 +54,10 @@ public:
//! returns the point of the grid the closest to the point X,Y
//! if the grid is active. If the grid is not active returns
//! X,Y.
Standard_EXPORT void Hit (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const;
Standard_EXPORT void Hit (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const;
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT virtual void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const = 0;
Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const = 0;
//! activates the grid. The Hit method will return
//! gridx and gridx computed according to the steps
@@ -75,13 +69,13 @@ public:
Standard_EXPORT void Deactivate();
//! returns the x Origin of the grid.
Standard_EXPORT Quantity_Length XOrigin() const;
Standard_EXPORT Standard_Real XOrigin() const;
//! returns the x Origin of the grid.
Standard_EXPORT Quantity_Length YOrigin() const;
Standard_EXPORT Standard_Real YOrigin() const;
//! returns the x Angle of the grid.
Standard_EXPORT Quantity_PlaneAngle RotationAngle() const;
Standard_EXPORT Standard_Real RotationAngle() const;
//! Returns TRUE when the grid is active.
Standard_EXPORT Standard_Boolean IsActive() const;
@@ -106,41 +100,28 @@ public:
Standard_EXPORT virtual void Init() = 0;
DEFINE_STANDARD_RTTIEXT(Aspect_Grid,MMgt_TShared)
protected:
//! creates a new grid. By default this grid is not
//! active.
Standard_EXPORT Aspect_Grid(const Quantity_Length anXOrigin = 0.0, const Quantity_Length anYOrigin = 0.0, const Quantity_PlaneAngle aRotationAngle = 0, const Quantity_Color& aColor = Quantity_NOC_GRAY50, const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70);
Standard_EXPORT Aspect_Grid(const Standard_Real anXOrigin = 0.0, const Standard_Real anYOrigin = 0.0, const Standard_Real aRotationAngle = 0, const Quantity_Color& aColor = Quantity_NOC_GRAY50, const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70);
//! Updates the grid parameters.
Standard_EXPORT virtual void UpdateDisplay();
Quantity_PlaneAngle myRotationAngle;
Quantity_Length myXOrigin;
Quantity_Length myYOrigin;
Standard_Real myRotationAngle;
Standard_Real myXOrigin;
Standard_Real myYOrigin;
Quantity_Color myColor;
Quantity_Color myTenthColor;
private:
Standard_Boolean myIsActive;
Aspect_GridDrawMode myDrawMode;
};
#endif // _Aspect_Grid_HeaderFile

View File

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

View File

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

View File

@@ -20,8 +20,6 @@
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Standard_Real.hxx>
#include <Aspect_Grid.hxx>
#include <Standard_Boolean.hxx>
@@ -29,11 +27,9 @@ class Standard_NegativeValue;
class Standard_NullValue;
class Standard_NumericError;
class Aspect_RectangularGrid;
DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid)
class Aspect_RectangularGrid : public Aspect_Grid
{
@@ -44,57 +40,48 @@ public:
//! active.
//! The first angle is given relatively to the horizontal.
//! The second angle is given relatively to the vertical.
Standard_EXPORT Aspect_RectangularGrid(const Quantity_Length aXStep, const Quantity_Length aYStep, const Quantity_Length anXOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aFirstAngle = 0, const Quantity_PlaneAngle aSecondAngle = 0, const Quantity_PlaneAngle aRotationAngle = 0);
Standard_EXPORT Aspect_RectangularGrid(const Standard_Real aXStep, const Standard_Real aYStep, const Standard_Real anXOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aFirstAngle = 0, const Standard_Real aSecondAngle = 0, const Standard_Real aRotationAngle = 0);
//! defines the x step of the grid.
Standard_EXPORT void SetXStep (const Quantity_Length aStep);
Standard_EXPORT void SetXStep (const Standard_Real aStep);
//! defines the y step of the grid.
Standard_EXPORT void SetYStep (const Quantity_Length aStep);
Standard_EXPORT void SetYStep (const Standard_Real aStep);
//! defines the angle of the second network
//! the fist angle is given relatively to the horizontal.
//! the second angle is given relatively to the vertical.
Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle1, const Quantity_PlaneAngle anAngle2);
Standard_EXPORT void SetAngle (const Standard_Real anAngle1, const Standard_Real anAngle2);
Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle RotationAngle);
Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle);
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const Standard_OVERRIDE;
Standard_EXPORT void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length XStep() const;
Standard_EXPORT Standard_Real XStep() const;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length YStep() const;
Standard_EXPORT Standard_Real YStep() const;
//! returns the x Angle of the grid, relatively to the horizontal.
Standard_EXPORT Quantity_PlaneAngle FirstAngle() const;
Standard_EXPORT Standard_Real FirstAngle() const;
//! returns the y Angle of the grid, relatively to the vertical.
Standard_EXPORT Quantity_PlaneAngle SecondAngle() const;
Standard_EXPORT Standard_Real SecondAngle() const;
Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid,Aspect_Grid)
protected:
private:
Standard_EXPORT Standard_Boolean CheckAngle (const Quantity_PlaneAngle alpha, const Quantity_PlaneAngle beta) const;
Standard_EXPORT Standard_Boolean CheckAngle (const Standard_Real alpha, const Standard_Real beta) const;
Quantity_Length myXStep;
Quantity_Length myYStep;
Quantity_PlaneAngle myFirstAngle;
Quantity_PlaneAngle mySecondAngle;
Standard_Real myXStep;
Standard_Real myYStep;
Standard_Real myFirstAngle;
Standard_Real mySecondAngle;
Standard_Real a1;
Standard_Real b1;
Standard_Real c1;
@@ -102,13 +89,6 @@ private:
Standard_Real b2;
Standard_Real c2;
};
#endif // _Aspect_RectangularGrid_HeaderFile

View File

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