Panda3D
|
Classes | |
class | CompareTextureStageSort |
Public Member Functions | |
TextureStageCollection (const TextureStageCollection ©) | |
void | add_texture_stage (TextureStage *node_texture_stage) |
Adds a new TextureStage to the collection. | |
void | add_texture_stages_from (const TextureStageCollection &other) |
Adds all the TextureStages indicated in the other collection to this texture_stage. | |
void | clear () |
Removes all TextureStages from the collection. | |
TextureStage * | find_texture_stage (const string &name) const |
Returns the texture_stage in the collection with the indicated name, if any, or NULL if no texture_stage has that name. | |
int | get_num_texture_stages () const |
Returns the number of TextureStages in the collection. | |
TextureStage * | get_texture_stage (int index) const |
Returns the nth TextureStage in the collection. | |
bool | has_texture_stage (TextureStage *texture_stage) const |
Returns true if the indicated TextureStage appears in this collection, false otherwise. | |
MAKE_SEQ (get_texture_stages, get_num_texture_stages, get_texture_stage) | |
TextureStageCollection | operator+ (const TextureStageCollection &other) const |
Returns a TextureStageCollection representing the concatenation of the two lists. | |
void | operator+= (const TextureStageCollection &other) |
Appends the other list onto the end of this one. | |
void | operator= (const TextureStageCollection ©) |
TextureStage * | operator[] (int index) const |
Returns the nth TextureStage in the collection. | |
void | output (ostream &out) const |
Writes a brief one-line description of the TextureStageCollection to the indicated output stream. | |
void | remove_duplicate_texture_stages () |
Removes any duplicate entries of the same TextureStages on this collection. | |
bool | remove_texture_stage (TextureStage *node_texture_stage) |
Removes the indicated TextureStage from the collection. | |
void | remove_texture_stages_from (const TextureStageCollection &other) |
Removes from this collection all of the TextureStages listed in the other collection. | |
int | size () const |
Returns the number of texture stages in the collection. | |
void | sort () |
Sorts the TextureStages in this collection into order by TextureStage::sort(), from lowest to highest. | |
void | write (ostream &out, int indent_level=0) const |
Writes a complete multi-line description of the TextureStageCollection to the indicated output stream. |
Definition at line 26 of file textureStageCollection.h.
void TextureStageCollection::add_texture_stage | ( | TextureStage * | node_texture_stage | ) |
Adds a new TextureStage to the collection.
Definition at line 57 of file textureStageCollection.cxx.
Referenced by add_texture_stages_from(), and NodePath::find_all_texture_stages().
void TextureStageCollection::add_texture_stages_from | ( | const TextureStageCollection & | other | ) |
Adds all the TextureStages indicated in the other collection to this texture_stage.
The other texture_stages are simply appended to the end of the texture_stages in this list; duplicates are not automatically removed.
Definition at line 117 of file textureStageCollection.cxx.
References add_texture_stage(), get_num_texture_stages(), and get_texture_stage().
Referenced by operator+=().
void TextureStageCollection::clear | ( | ) |
Removes all TextureStages from the collection.
Definition at line 195 of file textureStageCollection.cxx.
TextureStage * TextureStageCollection::find_texture_stage | ( | const string & | name | ) | const |
Returns the texture_stage in the collection with the indicated name, if any, or NULL if no texture_stage has that name.
Definition at line 207 of file textureStageCollection.cxx.
References TextureStage::get_name(), get_num_texture_stages(), and get_texture_stage().
int TextureStageCollection::get_num_texture_stages | ( | ) | const |
Returns the number of TextureStages in the collection.
Definition at line 224 of file textureStageCollection.cxx.
Referenced by add_texture_stages_from(), find_texture_stage(), has_texture_stage(), output(), remove_duplicate_texture_stages(), remove_texture_stages_from(), and write().
TextureStage * TextureStageCollection::get_texture_stage | ( | int | index | ) | const |
Returns the nth TextureStage in the collection.
Definition at line 234 of file textureStageCollection.cxx.
Referenced by add_texture_stages_from(), find_texture_stage(), has_texture_stage(), remove_duplicate_texture_stages(), remove_texture_stages_from(), and write().
bool TextureStageCollection::has_texture_stage | ( | TextureStage * | texture_stage | ) | const |
Returns true if the indicated TextureStage appears in this collection, false otherwise.
Definition at line 180 of file textureStageCollection.cxx.
References get_num_texture_stages(), and get_texture_stage().
Referenced by remove_texture_stages_from().
TextureStageCollection TextureStageCollection::operator+ | ( | const TextureStageCollection & | other | ) | const [inline] |
Returns a TextureStageCollection representing the concatenation of the two lists.
Definition at line 42 of file textureStageCollection.I.
void TextureStageCollection::operator+= | ( | const TextureStageCollection & | other | ) | [inline] |
Appends the other list onto the end of this one.
Definition at line 31 of file textureStageCollection.I.
References add_texture_stages_from().
TextureStage * TextureStageCollection::operator[] | ( | int | index | ) | const |
Returns the nth TextureStage in the collection.
This is the same as get_texture_stage(), but it may be a more convenient way to access it.
Definition at line 248 of file textureStageCollection.cxx.
void TextureStageCollection::output | ( | ostream & | out | ) | const |
Writes a brief one-line description of the TextureStageCollection to the indicated output stream.
Definition at line 285 of file textureStageCollection.cxx.
References get_num_texture_stages().
void TextureStageCollection::remove_duplicate_texture_stages | ( | ) |
Removes any duplicate entries of the same TextureStages on this collection.
If a TextureStage appears multiple times, the first appearance is retained; subsequent appearances are removed.
Definition at line 153 of file textureStageCollection.cxx.
References get_num_texture_stages(), and get_texture_stage().
bool TextureStageCollection::remove_texture_stage | ( | TextureStage * | node_texture_stage | ) |
Removes the indicated TextureStage from the collection.
Returns true if the texture_stage was removed, false if it was not a member of the collection.
Definition at line 80 of file textureStageCollection.cxx.
void TextureStageCollection::remove_texture_stages_from | ( | const TextureStageCollection & | other | ) |
Removes from this collection all of the TextureStages listed in the other collection.
Definition at line 132 of file textureStageCollection.cxx.
References get_num_texture_stages(), get_texture_stage(), and has_texture_stage().
int TextureStageCollection::size | ( | ) | const |
Returns the number of texture stages in the collection.
This is the same thing as get_num_texture_stages().
Definition at line 262 of file textureStageCollection.cxx.
void TextureStageCollection::sort | ( | ) |
Sorts the TextureStages in this collection into order by TextureStage::sort(), from lowest to highest.
Definition at line 273 of file textureStageCollection.cxx.
void TextureStageCollection::write | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const |
Writes a complete multi-line description of the TextureStageCollection to the indicated output stream.
Definition at line 300 of file textureStageCollection.cxx.
References get_num_texture_stages(), and get_texture_stage().