Warning, file /include/opencascade/Graphic3d_TextureSet.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Graphic3d_TextureSet_HeaderFile
0015 #define _Graphic3d_TextureSet_HeaderFile
0016
0017 #include <Graphic3d_TextureMap.hxx>
0018 #include <NCollection_Array1.hxx>
0019
0020
0021
0022 class Graphic3d_TextureSet : public Standard_Transient
0023 {
0024 DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureSet, Standard_Transient)
0025 public:
0026
0027 class Iterator : public NCollection_Array1<occ::handle<Graphic3d_TextureMap>>::Iterator
0028 {
0029 public:
0030
0031 Iterator() = default;
0032
0033
0034 Iterator(const occ::handle<Graphic3d_TextureSet>& theSet)
0035 {
0036 if (!theSet.IsNull())
0037 {
0038 NCollection_Array1<occ::handle<Graphic3d_TextureMap>>::Iterator::Init(theSet->myTextures);
0039 }
0040 }
0041 };
0042
0043 public:
0044
0045 Graphic3d_TextureSet() = default;
0046
0047
0048 Graphic3d_TextureSet(int theNbTextures)
0049 : myTextures(0, theNbTextures - 1)
0050 {
0051 }
0052
0053
0054 Graphic3d_TextureSet(const occ::handle<Graphic3d_TextureMap>& theTexture)
0055 : myTextures(0, 0)
0056 {
0057 myTextures.ChangeFirst() = theTexture;
0058 }
0059
0060
0061 bool IsEmpty() const { return myTextures.IsEmpty(); }
0062
0063
0064 int Size() const { return myTextures.Length(); }
0065
0066
0067 int Lower() const { return myTextures.Lower(); }
0068
0069
0070 int Upper() const { return myTextures.Upper(); }
0071
0072
0073 const occ::handle<Graphic3d_TextureMap>& First() const { return myTextures.First(); }
0074
0075
0076 void SetFirst(const occ::handle<Graphic3d_TextureMap>& theTexture)
0077 {
0078 myTextures.ChangeFirst() = theTexture;
0079 }
0080
0081
0082 const occ::handle<Graphic3d_TextureMap>& Value(int theIndex) const
0083 {
0084 return myTextures.Value(theIndex);
0085 }
0086
0087
0088 void SetValue(int theIndex, const occ::handle<Graphic3d_TextureMap>& theTexture)
0089 {
0090 myTextures.SetValue(theIndex, theTexture);
0091 }
0092
0093 protected:
0094 NCollection_Array1<occ::handle<Graphic3d_TextureMap>> myTextures;
0095 };
0096
0097 #endif