Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:30

0001 // Created on: 1998-07-16
0002 // Created by: CAL
0003 // Copyright (c) 1998-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 _V3d_CircularGrid_HeaderFile
0018 #define _V3d_CircularGrid_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <gp_Ax3.hxx>
0023 #include <V3d_ViewerPointer.hxx>
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <Aspect_CircularGrid.hxx>
0028 class Graphic3d_Structure;
0029 class Graphic3d_Group;
0030 
0031 class V3d_CircularGrid : public Aspect_CircularGrid
0032 {
0033   DEFINE_STANDARD_RTTIEXT(V3d_CircularGrid, Aspect_CircularGrid)
0034 public:
0035 
0036   Standard_EXPORT V3d_CircularGrid(const V3d_ViewerPointer& aViewer, const Quantity_Color& aColor, const Quantity_Color& aTenthColor);
0037 
0038   Standard_EXPORT virtual ~V3d_CircularGrid();
0039 
0040   Standard_EXPORT void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor) Standard_OVERRIDE;
0041   
0042   Standard_EXPORT void Display() Standard_OVERRIDE;
0043   
0044   Standard_EXPORT void Erase() const Standard_OVERRIDE;
0045   
0046   Standard_EXPORT Standard_Boolean IsDisplayed() const Standard_OVERRIDE;
0047   
0048   Standard_EXPORT void GraphicValues (Standard_Real& Radius, Standard_Real& OffSet) const;
0049   
0050   Standard_EXPORT void SetGraphicValues (const Standard_Real Radius, const Standard_Real OffSet);
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 protected:
0056 
0057   Standard_EXPORT void UpdateDisplay() Standard_OVERRIDE;
0058 
0059 private:
0060 
0061   Standard_EXPORT void DefineLines();
0062   
0063   Standard_EXPORT void DefinePoints();
0064 
0065 private:
0066 
0067   //! Custom Graphic3d_Structure implementation.
0068   class CircularGridStructure;
0069 
0070 private:
0071 
0072   Handle(Graphic3d_Structure) myStructure;
0073   Handle(Graphic3d_Group) myGroup;
0074   gp_Ax3 myCurViewPlane;
0075   V3d_ViewerPointer myViewer;
0076   Standard_Boolean myCurAreDefined;
0077   Standard_Boolean myToComputePrs;
0078   Aspect_GridDrawMode myCurDrawMode;
0079   Standard_Real myCurXo;
0080   Standard_Real myCurYo;
0081   Standard_Real myCurAngle;
0082   Standard_Real myCurStep;
0083   Standard_Integer myCurDivi;
0084   Standard_Real myRadius;
0085   Standard_Real myOffSet;
0086 
0087 };
0088 
0089 DEFINE_STANDARD_HANDLE(V3d_CircularGrid, Aspect_CircularGrid)
0090 
0091 #endif // _V3d_CircularGrid_HeaderFile