#include <textureCollection.h>
Public Member Functions | |
TextureCollection () | |
TextureCollection (const TextureCollection ©) | |
void | operator= (const TextureCollection ©) |
~TextureCollection () | |
void | add_texture (Texture *node_texture) |
Adds a new Texture to the collection. | |
bool | remove_texture (Texture *node_texture) |
Removes the indicated Texture from the collection. | |
void | add_textures_from (const TextureCollection &other) |
Adds all the Textures indicated in the other collection to this texture. | |
void | remove_textures_from (const TextureCollection &other) |
Removes from this collection all of the Textures listed in the other collection. | |
void | remove_duplicate_textures () |
Removes any duplicate entries of the same Textures on this collection. | |
bool | has_texture (Texture *texture) const |
Returns true if the indicated Texture appears in this collection, false otherwise. | |
void | clear () |
Removes all Textures from the collection. | |
Texture * | find_texture (const string &name) const |
Returns the texture in the collection with the indicated name, if any, or NULL if no texture has that name. | |
int | get_num_textures () const |
Returns the number of Textures in the collection. | |
Texture * | get_texture (int index) const |
Returns the nth Texture in the collection. | |
Texture * | operator[] (int index) const |
Returns the nth Texture in the collection. | |
void | output (ostream &out) const |
Writes a brief one-line description of the TextureCollection to the indicated output stream. | |
void | write (ostream &out, int indent_level=0) const |
Writes a complete multi-line description of the TextureCollection to the indicated output stream. | |
Private Types | |
typedef PointerToArray< PointerTo< Texture > > | Textures |
Private Attributes | |
Textures | _textures |
|
Definition at line 60 of file textureCollection.h. |
|
Definition at line 34 of file textureCollection.cxx. |
|
Definition at line 45 of file textureCollection.cxx. References _textures. |
|
Definition at line 31 of file textureCollection.I. |
|
Adds a new Texture to the collection.
Definition at line 71 of file textureCollection.cxx. References _textures. Referenced by NodePath::set_color(). |
|
Adds all the Textures indicated in the other collection to this texture. The other textures are simply appended to the end of the textures in this list; duplicates are not automatically removed. Definition at line 142 of file textureCollection.cxx. |
|
Removes all Textures from the collection.
Definition at line 237 of file textureCollection.cxx. |
|
Returns the texture in the collection with the indicated name, if any, or NULL if no texture has that name.
Definition at line 254 of file textureCollection.cxx. |
|
Returns the number of Textures in the collection.
Definition at line 274 of file textureCollection.cxx. References get_texture(), and indent(). |
|
Returns the nth Texture in the collection.
Definition at line 287 of file textureCollection.cxx. Referenced by get_num_textures(), and remove_textures_from(). |
|
Returns true if the indicated Texture appears in this collection, false otherwise.
Definition at line 219 of file textureCollection.cxx. References _textures, and PointerToArray< PointerTo< Texture > >::size(). |
|
Definition at line 58 of file textureCollection.cxx. References _textures, PointerToArray< PointerTo< Texture > >::get_ref_count(), and PointerToArray< PointerTo< Texture > >::v(). |
|
Returns the nth Texture in the collection. This is the same as get_texture(), but it may be a more convenient way to access it. Definition at line 306 of file textureCollection.cxx. |
|
Writes a brief one-line description of the TextureCollection to the indicated output stream.
Definition at line 323 of file textureCollection.cxx. |
|
Removes any duplicate entries of the same Textures on this collection. If a Texture appears multiple times, the first appearance is retained; subsequent appearances are removed. Definition at line 188 of file textureCollection.cxx. |
|
Removes the indicated Texture from the collection. Returns true if the texture was removed, false if it was not a member of the collection. Definition at line 99 of file textureCollection.cxx. References _textures, and PointerToArray< PointerTo< Texture > >::v(). |
|
Removes from this collection all of the Textures listed in the other collection.
Definition at line 161 of file textureCollection.cxx. References get_texture(). |
|
Writes a complete multi-line description of the TextureCollection to the indicated output stream.
Definition at line 342 of file textureCollection.cxx. |
|
Definition at line 61 of file textureCollection.h. Referenced by add_texture(), clear(), has_texture(), operator=(), remove_texture(), and TextureCollection(). |