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_RectangularGrid_HeaderFile
0018 #define _V3d_RectangularGrid_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 <Aspect_RectangularGrid.hxx>
0027 class Graphic3d_Structure;
0028 class Graphic3d_Group;
0029 
0030 class V3d_RectangularGrid : public Aspect_RectangularGrid
0031 {
0032   DEFINE_STANDARD_RTTIEXT(V3d_RectangularGrid, Aspect_RectangularGrid)
0033 public:
0034 
0035   Standard_EXPORT V3d_RectangularGrid(const V3d_ViewerPointer& aViewer, const Quantity_Color& aColor, const Quantity_Color& aTenthColor);
0036 
0037   Standard_EXPORT virtual ~V3d_RectangularGrid();
0038   
0039   Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor) Standard_OVERRIDE;
0040   
0041   Standard_EXPORT virtual void Display() Standard_OVERRIDE;
0042   
0043   Standard_EXPORT virtual void Erase() const Standard_OVERRIDE;
0044   
0045   Standard_EXPORT virtual Standard_Boolean IsDisplayed() const Standard_OVERRIDE;
0046   
0047   Standard_EXPORT void GraphicValues (Standard_Real& XSize, Standard_Real& YSize, Standard_Real& OffSet) const;
0048   
0049   Standard_EXPORT void SetGraphicValues (const Standard_Real XSize, const Standard_Real YSize, const Standard_Real OffSet);
0050   
0051   //! Dumps the content of me into the stream
0052   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0053 
0054 protected:
0055   
0056   Standard_EXPORT virtual void UpdateDisplay() Standard_OVERRIDE;
0057 
0058 private:
0059 
0060   Standard_EXPORT void DefineLines();
0061   
0062   Standard_EXPORT void DefinePoints();
0063 
0064 private:
0065 
0066   //! Custom Graphic3d_Structure implementation.
0067   class RectangularGridStructure;
0068 
0069 private:
0070 
0071   Handle(Graphic3d_Structure) myStructure;
0072   Handle(Graphic3d_Group) myGroup;
0073   gp_Ax3 myCurViewPlane;
0074   V3d_ViewerPointer myViewer;
0075   Standard_Boolean myCurAreDefined;
0076   Standard_Boolean myToComputePrs;
0077   Aspect_GridDrawMode myCurDrawMode;
0078   Standard_Real myCurXo;
0079   Standard_Real myCurYo;
0080   Standard_Real myCurAngle;
0081   Standard_Real myCurXStep;
0082   Standard_Real myCurYStep;
0083   Standard_Real myXSize;
0084   Standard_Real myYSize;
0085   Standard_Real myOffSet;
0086 
0087 };
0088 
0089 DEFINE_STANDARD_HANDLE(V3d_RectangularGrid, Aspect_RectangularGrid)
0090 
0091 #endif // _V3d_RectangularGrid_HeaderFile