Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgraph/textureCollection.h

Go to the documentation of this file.
00001 // Filename: textureCollection.h
00002 // Created by:  drose (16Mar02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef TEXTURECOLLECTION_H
00020 #define TEXTURECOLLECTION_H
00021 
00022 #include "pandabase.h"
00023 #include "pointerToArray.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : TextureCollection
00027 // Description : 
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDA TextureCollection {
00030 PUBLISHED:
00031   TextureCollection();
00032   TextureCollection(const TextureCollection &copy);
00033   void operator = (const TextureCollection &copy);
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 

Generated on Fri May 2 00:42:29 2003 for Panda by doxygen1.3