Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:58

0001 // Created on: 1995-03-17
0002 // Created by: Mister rmi
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Aspect_CircularGrid_HeaderFile
0018 #define _Aspect_CircularGrid_HeaderFile
0019 
0020 #include <Standard_Integer.hxx>
0021 #include <Aspect_Grid.hxx>
0022 
0023 
0024 class Aspect_CircularGrid : public Aspect_Grid
0025 {
0026   DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid, Aspect_Grid)
0027 public:
0028 
0029   //! creates a new grid. By default this grid is not
0030   //! active.
0031   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);
0032   
0033   //! defines the x step of the grid.
0034   Standard_EXPORT void SetRadiusStep (const Standard_Real aStep);
0035   
0036   //! defines the step of the grid.
0037   Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber);
0038   
0039   Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle);
0040   
0041   //! returns the point of the grid the closest to the point X,Y
0042   Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE;
0043   
0044   //! returns the x step of the grid.
0045   Standard_EXPORT Standard_Real RadiusStep() const;
0046   
0047   //! returns the x step of the grid.
0048   Standard_EXPORT Standard_Integer DivisionNumber() const;
0049   
0050   Standard_EXPORT virtual void Init() Standard_OVERRIDE;
0051   
0052   //! Dumps the content of me into the stream
0053   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0054 
0055 private:
0056 
0057   Standard_Real myRadiusStep;
0058   Standard_Integer myDivisionNumber;
0059   Standard_Real myAlpha;
0060   Standard_Real myA1;
0061   Standard_Real myB1;
0062 
0063 };
0064 
0065 DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid)
0066 
0067 #endif // _Aspect_CircularGrid_HeaderFile