File indexing completed on 2025-01-18 10:03:49
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
0028 class Iterator : public NCollection_Array1<Handle(Graphic3d_TextureMap)>::Iterator
0029 {
0030 public:
0031
0032 Iterator() {}
0033
0034
0035 Iterator (const Handle(Graphic3d_TextureSet)& theSet)
0036 {
0037 if (!theSet.IsNull())
0038 {
0039 NCollection_Array1<Handle(Graphic3d_TextureMap)>::Iterator::Init (theSet->myTextures);
0040 }
0041 }
0042 };
0043
0044 public:
0045
0046
0047 Graphic3d_TextureSet() {}
0048
0049
0050 Graphic3d_TextureSet (Standard_Integer theNbTextures)
0051 : myTextures (0, theNbTextures - 1) {}
0052
0053
0054 Graphic3d_TextureSet (const Handle(Graphic3d_TextureMap)& theTexture)
0055 : myTextures (0, 0)
0056 {
0057 myTextures.ChangeFirst() = theTexture;
0058 }
0059
0060
0061 Standard_Boolean IsEmpty() const { return myTextures.IsEmpty(); }
0062
0063
0064 Standard_Integer Size() const { return myTextures.Size(); }
0065
0066
0067 Standard_Integer Lower() const { return myTextures.Lower(); }
0068
0069
0070 Standard_Integer Upper() const { return myTextures.Upper(); }
0071
0072
0073 const Handle(Graphic3d_TextureMap)& First() const { return myTextures.First(); }
0074
0075
0076 void SetFirst (const Handle(Graphic3d_TextureMap)& theTexture) { myTextures.ChangeFirst() = theTexture; }
0077
0078
0079 const Handle(Graphic3d_TextureMap)& Value (Standard_Integer theIndex) const { return myTextures.Value (theIndex); }
0080
0081
0082 void SetValue (Standard_Integer theIndex,
0083 const Handle(Graphic3d_TextureMap)& theTexture) { myTextures.SetValue (theIndex, theTexture); }
0084
0085 protected:
0086
0087 NCollection_Array1<Handle(Graphic3d_TextureMap)> myTextures;
0088
0089 };
0090
0091 #endif