Panda3D
|
Manages a list of Texture objects, as returned by TexturePool::find_all_textures(). More...
Public Member Functions | |
__init__ () | |
__init__ (const TextureCollection copy) | |
__init__ (object sequence) | |
object | __reduce__ () |
addTexture (Texture texture) | |
Adds a new Texture to the collection. More... | |
addTexturesFrom (const TextureCollection other) | |
Adds all the Textures indicated in the other collection to this texture. More... | |
append (Texture texture) | |
Adds a new Texture to the collection. More... | |
clear () | |
Removes all Textures from the collection. More... | |
extend (const TextureCollection other) | |
Appends the other list onto the end of this one. More... | |
Texture | findTexture (str name) |
Returns the texture in the collection with the indicated name, if any, or NULL if no texture has that name. More... | |
int | getNumTextures () |
Returns the number of Textures in the collection. More... | |
Texture | getTexture (int index) |
Returns the nth Texture in the collection. More... | |
list | getTextures () |
bool | hasTexture (Texture texture) |
Returns true if the indicated Texture appears in this collection, false otherwise. More... | |
TextureCollection | operator+ (const TextureCollection other) |
TextureCollection | operator+= (const TextureCollection other) |
TextureCollection | operator= (const TextureCollection copy) |
Texture | operator[] (int index) |
Returns the nth Texture in the collection. More... | |
output (Ostream out) | |
Writes a brief one-line description of the TextureCollection to the indicated output stream. More... | |
removeDuplicateTextures () | |
Removes any duplicate entries of the same Textures on this collection. More... | |
bool | removeTexture (Texture texture) |
Removes the indicated Texture from the collection. More... | |
removeTexturesFrom (const TextureCollection other) | |
Removes from this collection all of the Textures listed in the other collection. More... | |
reserve (int num) | |
This is a hint to Panda to allocate enough memory to hold the given number of NodePaths, if you know ahead of time how many you will be adding. More... | |
int | size () |
Returns the number of textures in the collection. More... | |
write (Ostream out, int indent_level) | |
Writes a complete multi-line description of the TextureCollection to the indicated output stream. More... | |
Manages a list of Texture objects, as returned by TexturePool::find_all_textures().
__init__ | ( | ) |
__init__ | ( | const TextureCollection | copy | ) |
__init__ | ( | object | sequence | ) |
object __reduce__ | ( | ) |
addTexturesFrom | ( | const TextureCollection | other | ) |
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.
append | ( | Texture | texture | ) |
Adds a new Texture to the collection.
This method duplicates the add_texture() method; it is provided to satisfy Python's naming convention.
clear | ( | ) |
Removes all Textures from the collection.
extend | ( | const TextureCollection | other | ) |
Appends the other list onto the end of this one.
This method duplicates the += operator; it is provided to satisfy Python's naming convention.
Texture findTexture | ( | str | name | ) |
Returns the texture in the collection with the indicated name, if any, or NULL if no texture has that name.
int getNumTextures | ( | ) |
Returns the number of Textures in the collection.
list getTextures | ( | ) |
bool hasTexture | ( | Texture | texture | ) |
Returns true if the indicated Texture appears in this collection, false otherwise.
TextureCollection operator+ | ( | const TextureCollection | other | ) |
TextureCollection operator+= | ( | const TextureCollection | other | ) |
TextureCollection operator= | ( | const TextureCollection | copy | ) |
Texture operator[] | ( | int | index | ) |
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.
output | ( | Ostream | out | ) |
Writes a brief one-line description of the TextureCollection to the indicated output stream.
removeDuplicateTextures | ( | ) |
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.
bool removeTexture | ( | Texture | texture | ) |
Removes the indicated Texture from the collection.
Returns true if the texture was removed, false if it was not a member of the collection.
removeTexturesFrom | ( | const TextureCollection | other | ) |
Removes from this collection all of the Textures listed in the other collection.
reserve | ( | int | num | ) |
This is a hint to Panda to allocate enough memory to hold the given number of NodePaths, if you know ahead of time how many you will be adding.
int size | ( | ) |
Returns the number of textures in the collection.
This is the same thing as get_num_textures().
write | ( | Ostream | out, |
int | indent_level | ||
) |
Writes a complete multi-line description of the TextureCollection to the indicated output stream.