Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/IntTools_SurfaceRangeSample.lxx is written in an unsupported language. File is not indexed.

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 #include <Standard_HashUtils.hxx>
0017 
0018 inline void IntTools_SurfaceRangeSample::SetRanges(const IntTools_CurveRangeSample& theRangeU,
0019                                                    const IntTools_CurveRangeSample& theRangeV) 
0020 {
0021   myRangeU = theRangeU;
0022   myRangeV = theRangeV;
0023 }
0024 
0025  
0026 inline void IntTools_SurfaceRangeSample::GetRanges(IntTools_CurveRangeSample& theRangeU,
0027                                              IntTools_CurveRangeSample& theRangeV) const
0028 {
0029   theRangeU = myRangeU;
0030   theRangeV = myRangeV;
0031 }
0032 
0033  
0034 inline void IntTools_SurfaceRangeSample::SetIndexes(const Standard_Integer theIndexU,
0035                                                     const Standard_Integer theIndexV) 
0036 {
0037   myRangeU.SetRangeIndex(theIndexU);
0038   myRangeV.SetRangeIndex(theIndexV);
0039 }
0040 
0041  
0042 inline void IntTools_SurfaceRangeSample::GetIndexes(Standard_Integer& theIndexU,Standard_Integer& theIndexV) const
0043 {
0044   theIndexU = myRangeU.GetRangeIndex();
0045   theIndexV = myRangeV.GetRangeIndex();
0046 }
0047 
0048  
0049 inline void IntTools_SurfaceRangeSample::GetDepths(Standard_Integer& theDepthU,Standard_Integer& theDepthV) const
0050 {
0051   theDepthU = myRangeU.GetDepth();
0052   theDepthV = myRangeV.GetDepth();
0053 }
0054 
0055  
0056 inline void IntTools_SurfaceRangeSample::SetSampleRangeU(const IntTools_CurveRangeSample& theRangeSampleU) 
0057 {
0058   myRangeU = theRangeSampleU;
0059 }
0060 
0061  
0062 inline const IntTools_CurveRangeSample& IntTools_SurfaceRangeSample::GetSampleRangeU() const
0063 {
0064   return myRangeU;
0065 }
0066 
0067  
0068 inline void IntTools_SurfaceRangeSample::SetSampleRangeV(const IntTools_CurveRangeSample& theRangeSampleV) 
0069 {
0070   myRangeV = theRangeSampleV;
0071 }
0072 
0073  
0074 inline const IntTools_CurveRangeSample& IntTools_SurfaceRangeSample::GetSampleRangeV() const
0075 {
0076   return myRangeV;
0077 }
0078 
0079  
0080 inline void IntTools_SurfaceRangeSample::SetIndexU(const Standard_Integer theIndexU) 
0081 {
0082   myRangeU.SetRangeIndex(theIndexU);
0083 }
0084 
0085  
0086 inline Standard_Integer IntTools_SurfaceRangeSample::GetIndexU() const
0087 {
0088   return myRangeU.GetRangeIndex();
0089 }
0090 
0091  
0092 inline void IntTools_SurfaceRangeSample::SetIndexV(const Standard_Integer theIndexV) 
0093 {
0094   myRangeV.SetRangeIndex(theIndexV);
0095 }
0096 
0097  
0098 inline Standard_Integer IntTools_SurfaceRangeSample::GetIndexV() const
0099 {
0100   return myRangeV.GetRangeIndex();
0101 }
0102 
0103  
0104 inline void IntTools_SurfaceRangeSample::SetDepthU(const Standard_Integer theDepthU) 
0105 {
0106   myRangeU.SetDepth(theDepthU);
0107 }
0108 
0109  
0110 inline Standard_Integer IntTools_SurfaceRangeSample::GetDepthU() const
0111 {
0112   return myRangeU.GetDepth();
0113 }
0114 
0115  
0116 inline void IntTools_SurfaceRangeSample::SetDepthV(const Standard_Integer theDepthV) 
0117 {
0118   myRangeV.SetDepth(theDepthV);
0119 }
0120 
0121  
0122 inline Standard_Integer IntTools_SurfaceRangeSample::GetDepthV() const
0123 {
0124   return myRangeV.GetDepth();
0125 }
0126 
0127 inline Standard_Boolean IntTools_SurfaceRangeSample::IsEqual(const IntTools_SurfaceRangeSample& Other) const
0128 {
0129   return (myRangeU.IsEqual(Other.myRangeU) && myRangeV.IsEqual(Other.myRangeV));
0130 }
0131 
0132  
0133 inline Standard_Integer IntTools_SurfaceRangeSample::GetRangeIndexUDeeper(const Standard_Integer theNbSampleU) const
0134 {
0135   return myRangeU.GetRangeIndexDeeper(theNbSampleU);
0136 }
0137 
0138  
0139 inline Standard_Integer IntTools_SurfaceRangeSample::GetRangeIndexVDeeper(const Standard_Integer theNbSampleV) const
0140 {
0141   return myRangeV.GetRangeIndexDeeper(theNbSampleV);
0142 }
0143 
0144 namespace std
0145 {
0146   template <>
0147   struct hash<IntTools_SurfaceRangeSample>
0148   {
0149     size_t operator()(const IntTools_SurfaceRangeSample& theSurfaceRangeSample) const noexcept
0150     {
0151       // Combine two int values into a single hash value.
0152       size_t aCombination[2]{ std::hash<IntTools_CurveRangeSample>{}(theSurfaceRangeSample.GetSampleRangeU()),
0153                               std::hash<IntTools_CurveRangeSample>{}(theSurfaceRangeSample.GetSampleRangeV()) };
0154       return opencascade::hashBytes(aCombination, sizeof(aCombination));
0155     }
0156   };
0157 }