File indexing completed on 2025-01-18 10:02:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Aspect_RectangularGrid_HeaderFile
0018 #define _Aspect_RectangularGrid_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <Aspect_Grid.hxx>
0023
0024 class Aspect_RectangularGrid : public Aspect_Grid
0025 {
0026 DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid, Aspect_Grid)
0027 public:
0028
0029
0030
0031
0032
0033 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);
0034
0035
0036 Standard_EXPORT void SetXStep (const Standard_Real aStep);
0037
0038
0039 Standard_EXPORT void SetYStep (const Standard_Real aStep);
0040
0041
0042
0043
0044 Standard_EXPORT void SetAngle (const Standard_Real anAngle1, const Standard_Real anAngle2);
0045
0046 Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle);
0047
0048
0049 Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE;
0050
0051
0052 Standard_EXPORT Standard_Real XStep() const;
0053
0054
0055 Standard_EXPORT Standard_Real YStep() const;
0056
0057
0058 Standard_EXPORT Standard_Real FirstAngle() const;
0059
0060
0061 Standard_EXPORT Standard_Real SecondAngle() const;
0062
0063 Standard_EXPORT virtual void Init() Standard_OVERRIDE;
0064
0065
0066 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0067
0068 private:
0069
0070 Standard_EXPORT Standard_Boolean CheckAngle (const Standard_Real alpha, const Standard_Real beta) const;
0071
0072 private:
0073
0074 Standard_Real myXStep;
0075 Standard_Real myYStep;
0076 Standard_Real myFirstAngle;
0077 Standard_Real mySecondAngle;
0078 Standard_Real a1;
0079 Standard_Real b1;
0080 Standard_Real c1;
0081 Standard_Real a2;
0082 Standard_Real b2;
0083 Standard_Real c2;
0084
0085 };
0086
0087 DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid)
0088
0089 #endif