Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:13

0001 // Copyright (c) 2013 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BRepMesh_Circle_HeaderFile
0015 #define _BRepMesh_Circle_HeaderFile
0016 
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <gp_XY.hxx>
0020 
0021 //! Describes a 2d circle with a size of only 3 Standard_Real 
0022 //! numbers instead of gp who needs 7 Standard_Real numbers.
0023 class BRepMesh_Circle
0024 {
0025 public:
0026 
0027   DEFINE_STANDARD_ALLOC
0028 
0029   //! Default constructor.
0030   BRepMesh_Circle() : myRadius(0.0)
0031   {
0032   }
0033   
0034   //! Constructor.
0035   //! @param theLocation location of a circle.
0036   //! @param theRadius radius of a circle.
0037   BRepMesh_Circle(const gp_XY&        theLocation,
0038                   const Standard_Real theRadius)
0039   : myLocation(theLocation),
0040     myRadius  (theRadius)
0041   {
0042   }
0043   
0044   //! Sets location of a circle.
0045   //! @param theLocation location of a circle.
0046   void SetLocation(const gp_XY& theLocation)
0047   {
0048     myLocation = theLocation;
0049   }
0050   
0051   //! Sets radius of a circle.
0052   //! @param theRadius radius of a circle.
0053   void SetRadius(const Standard_Real theRadius)
0054   {
0055     myRadius = theRadius;
0056   }
0057   
0058   //! Returns location of a circle.
0059   const gp_XY& Location() const
0060   {
0061     return myLocation;
0062   }
0063 
0064   //! Returns radius of a circle.
0065   const Standard_Real& Radius() const
0066   {
0067     return myRadius;
0068   }
0069 
0070 private:
0071 
0072   gp_XY         myLocation;
0073   Standard_Real myRadius;
0074 };
0075 
0076 #endif