0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / IntTools / IntTools_SurfaceRangeSample.cxx
1 // Created on: 2005-10-05
2 // Created by: Mikhail KLOKOV
3 // Copyright (c) 2005-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <IntTools_SurfaceRangeSample.ixx>
17
18 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample()
19 {
20 }
21
22 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const Standard_Integer theIndexU,const Standard_Integer theDepthU,
23                                                          const Standard_Integer theIndexV,const Standard_Integer theDepthV)
24 {
25   myRangeU.SetRangeIndex(theIndexU);
26   myRangeU.SetDepth(theDepthU);
27   myRangeV.SetRangeIndex(theIndexV);
28   myRangeV.SetDepth(theDepthV);
29 }
30
31 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const IntTools_CurveRangeSample& theRangeU,
32                                                          const IntTools_CurveRangeSample& theRangeV)
33 {
34   myRangeU = theRangeU;
35   myRangeV = theRangeV;
36 }
37
38 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const IntTools_SurfaceRangeSample& Other)
39 {
40   Assign(Other);
41 }
42
43 IntTools_SurfaceRangeSample& IntTools_SurfaceRangeSample::Assign(const IntTools_SurfaceRangeSample& Other) 
44 {
45   myRangeU = Other.myRangeU;
46   myRangeV = Other.myRangeV;
47   return (*this);
48 }
49
50
51 IntTools_Range IntTools_SurfaceRangeSample::GetRangeU(const Standard_Real theFirstU,const Standard_Real theLastU,
52                                                       const Standard_Integer theNbSampleU) const
53 {
54   return myRangeU.GetRange(theFirstU, theLastU, theNbSampleU);
55 }
56
57 IntTools_Range IntTools_SurfaceRangeSample::GetRangeV(const Standard_Real theFirstV,const Standard_Real theLastV,
58                                                       const Standard_Integer theNbSampleV) const
59 {
60   return myRangeV.GetRange(theFirstV, theLastV, theNbSampleV);
61 }