Panda3D
textureStageCollection.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file textureStageCollection.h
10  * @author drose
11  * @date 2004-07-23
12  */
13 
14 #ifndef TEXTURESTAGECOLLECTION_H
15 #define TEXTURESTAGECOLLECTION_H
16 
17 #include "pandabase.h"
18 #include "pointerToArray.h"
19 #include "textureStage.h"
20 
21 /**
22  *
23  */
24 class EXPCL_PANDA_PGRAPH TextureStageCollection {
25 PUBLISHED:
28  void operator = (const TextureStageCollection &copy);
29  INLINE ~TextureStageCollection();
30 
31  void add_texture_stage(TextureStage *node_texture_stage);
32  bool remove_texture_stage(TextureStage *node_texture_stage);
33  void add_texture_stages_from(const TextureStageCollection &other);
34  void remove_texture_stages_from(const TextureStageCollection &other);
35  void remove_duplicate_texture_stages();
36  bool has_texture_stage(TextureStage *texture_stage) const;
37  void clear();
38 
39  TextureStage *find_texture_stage(const std::string &name) const;
40 
41  int get_num_texture_stages() const;
42  TextureStage *get_texture_stage(int index) const;
43  MAKE_SEQ(get_texture_stages, get_num_texture_stages, get_texture_stage);
44  TextureStage *operator [] (int index) const;
45  int size() const;
46  INLINE void operator += (const TextureStageCollection &other);
47  INLINE TextureStageCollection operator + (const TextureStageCollection &other) const;
48 
49  void sort();
50 
51  void output(std::ostream &out) const;
52  void write(std::ostream &out, int indent_level = 0) const;
53 
54 private:
55  typedef PTA(PT(TextureStage)) TextureStages;
56  TextureStages _texture_stages;
57 
58  class CompareTextureStageSort {
59  public:
60  INLINE bool operator () (const TextureStage *a, const TextureStage *b) const;
61  };
62 
63 };
64 
65 INLINE std::ostream &operator << (std::ostream &out, const TextureStageCollection &col) {
66  col.output(out);
67  return out;
68 }
69 
70 #include "textureStageCollection.I"
71 
72 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Writes a brief one-line description of the TextureStageCollection to the indicated output stream.
Defines the properties of a named stage of the multitexture pipeline.
Definition: textureStage.h:35
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.