Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-25 08:29:58

0001 // Created on: 2005-10-05
0002 // Created by: Mikhail KLOKOV
0003 // Copyright (c) 2005-2014 OPEN CASCADE SAS
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 _IntTools_SurfaceRangeSample_HeaderFile
0017 #define _IntTools_SurfaceRangeSample_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 
0022 #include <IntTools_CurveRangeSample.hxx>
0023 #include <Standard_Integer.hxx>
0024 class IntTools_Range;
0025 
0026 //! class for range index management of surface
0027 class IntTools_SurfaceRangeSample
0028 {
0029 public:
0030   DEFINE_STANDARD_ALLOC
0031 
0032   Standard_EXPORT IntTools_SurfaceRangeSample();
0033 
0034   Standard_EXPORT IntTools_SurfaceRangeSample(const Standard_Integer theIndexU,
0035                                               const Standard_Integer theDepthU,
0036                                               const Standard_Integer theIndexV,
0037                                               const Standard_Integer theDepthV);
0038 
0039   Standard_EXPORT IntTools_SurfaceRangeSample(const IntTools_CurveRangeSample& theRangeU,
0040                                               const IntTools_CurveRangeSample& theRangeV);
0041 
0042   Standard_EXPORT IntTools_SurfaceRangeSample(const IntTools_SurfaceRangeSample& Other);
0043 
0044   Standard_EXPORT IntTools_SurfaceRangeSample& Assign(const IntTools_SurfaceRangeSample& Other);
0045 
0046   IntTools_SurfaceRangeSample& operator=(const IntTools_SurfaceRangeSample& Other)
0047   {
0048     return Assign(Other);
0049   }
0050 
0051   void SetRanges(const IntTools_CurveRangeSample& theRangeU,
0052                  const IntTools_CurveRangeSample& theRangeV);
0053 
0054   void GetRanges(IntTools_CurveRangeSample& theRangeU, IntTools_CurveRangeSample& theRangeV) const;
0055 
0056   void SetIndexes(const Standard_Integer theIndexU, const Standard_Integer theIndexV);
0057 
0058   void GetIndexes(Standard_Integer& theIndexU, Standard_Integer& theIndexV) const;
0059 
0060   void GetDepths(Standard_Integer& theDepthU, Standard_Integer& theDepthV) const;
0061 
0062   void SetSampleRangeU(const IntTools_CurveRangeSample& theRangeSampleU);
0063 
0064   const IntTools_CurveRangeSample& GetSampleRangeU() const;
0065 
0066   void SetSampleRangeV(const IntTools_CurveRangeSample& theRangeSampleV);
0067 
0068   const IntTools_CurveRangeSample& GetSampleRangeV() const;
0069 
0070   void SetIndexU(const Standard_Integer theIndexU);
0071 
0072   Standard_Integer GetIndexU() const;
0073 
0074   void SetIndexV(const Standard_Integer theIndexV);
0075 
0076   Standard_Integer GetIndexV() const;
0077 
0078   void SetDepthU(const Standard_Integer theDepthU);
0079 
0080   Standard_Integer GetDepthU() const;
0081 
0082   void SetDepthV(const Standard_Integer theDepthV);
0083 
0084   Standard_Integer GetDepthV() const;
0085 
0086   Standard_EXPORT IntTools_Range GetRangeU(const Standard_Real    theFirstU,
0087                                            const Standard_Real    theLastU,
0088                                            const Standard_Integer theNbSampleU) const;
0089 
0090   Standard_EXPORT IntTools_Range GetRangeV(const Standard_Real    theFirstV,
0091                                            const Standard_Real    theLastV,
0092                                            const Standard_Integer theNbSampleV) const;
0093 
0094   Standard_Boolean IsEqual(const IntTools_SurfaceRangeSample& Other) const;
0095 
0096   Standard_Integer GetRangeIndexUDeeper(const Standard_Integer theNbSampleU) const;
0097 
0098   Standard_Integer GetRangeIndexVDeeper(const Standard_Integer theNbSampleV) const;
0099 
0100   bool operator==(const IntTools_SurfaceRangeSample& theOther) const { return IsEqual(theOther); }
0101 
0102 protected:
0103 private:
0104   IntTools_CurveRangeSample myRangeU;
0105   IntTools_CurveRangeSample myRangeV;
0106 };
0107 
0108 #include <IntTools_SurfaceRangeSample.lxx>
0109 
0110 #endif // _IntTools_SurfaceRangeSample_HeaderFile