|
|
|||
File indexing completed on 2026-09-12 09:18:27
0001 // Created on: 2021-07-20 0002 // Copyright (c) 2021 OPEN CASCADE SAS 0003 // Created by: Oleg AGASHIN 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _Poly_TriangulationParameters_HeaderFile 0017 #define _Poly_TriangulationParameters_HeaderFile 0018 0019 #include <Standard_Transient.hxx> 0020 #include <Standard_DefineHandle.hxx> 0021 0022 //! Represents initial set of parameters triangulation is built for. 0023 class Poly_TriangulationParameters : public Standard_Transient 0024 { 0025 public: 0026 //! Constructor. 0027 //! Initializes object with the given parameters. 0028 //! @param theDeflection linear deflection 0029 //! @param theAngle angular deflection 0030 //! @param theMinSize minimum size 0031 Poly_TriangulationParameters(const double theDeflection = -1., 0032 const double theAngle = -1., 0033 const double theMinSize = -1.) 0034 : myDeflection(theDeflection), 0035 myAngle(theAngle), 0036 myMinSize(theMinSize) 0037 { 0038 } 0039 0040 //! Destructor. 0041 ~Poly_TriangulationParameters() override = default; 0042 0043 //! Creates a copy of current triangulation parameters. 0044 Standard_EXPORT occ::handle<Poly_TriangulationParameters> Copy() const; 0045 0046 //! Returns true if linear deflection is defined. 0047 bool HasDeflection() const { return !(myDeflection < 0.); } 0048 0049 //! Returns true if angular deflection is defined. 0050 bool HasAngle() const { return !(myAngle < 0.); } 0051 0052 //! Returns true if minimum size is defined. 0053 bool HasMinSize() const { return !(myMinSize < 0.); } 0054 0055 //! Returns linear deflection or -1 if undefined. 0056 double Deflection() const { return myDeflection; } 0057 0058 //! Returns angular deflection or -1 if undefined. 0059 double Angle() const { return myAngle; } 0060 0061 //! Returns minimum size or -1 if undefined. 0062 double MinSize() const { return myMinSize; } 0063 0064 DEFINE_STANDARD_RTTIEXT(Poly_TriangulationParameters, Standard_Transient) 0065 0066 private: 0067 double myDeflection; 0068 double myAngle; 0069 double myMinSize; 0070 }; 0071 0072 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|