00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TEXTURECOLLECTION_H
00020 #define TEXTURECOLLECTION_H
00021
00022 #include "pandabase.h"
00023 #include "pointerToArray.h"
00024
00025
00026
00027
00028
00029 class EXPCL_PANDA TextureCollection {
00030 PUBLISHED:
00031 TextureCollection();
00032 TextureCollection(const TextureCollection ©);
00033 void operator = (const TextureCollection ©);
00034 INLINE ~TextureCollection();
00035
00036 void add_texture(Texture *node_texture);
00037 bool remove_texture(Texture *node_texture);
00038 void add_textures_from(const TextureCollection &other);
00039 void remove_textures_from(const TextureCollection &other);
00040 void remove_duplicate_textures();
00041 bool has_texture(Texture *texture) const;
00042 void clear();
00043
00044 Texture *find_texture(const string &name) const;
00045
00046 int get_num_textures() const;
00047 Texture *get_texture(int index) const;
00048 Texture *operator [] (int index) const;
00049
00050 void output(ostream &out) const;
00051 void write(ostream &out, int indent_level = 0) const;
00052
00053 private:
00054 typedef PTA(PT(Texture)) Textures;
00055 Textures _textures;
00056 };
00057
00058 INLINE ostream &operator << (ostream &out, const TextureCollection &col) {
00059 col.output(out);
00060 return out;
00061 }
00062
00063 #include "textureCollection.I"
00064
00065 #endif
00066
00067