|
Panda3D
|
Manages a list of Texture objects, as returned by TexturePool.find_all_textures(). More...
Public Member Functions | |
| TextureCollection () | |
| TextureCollection (PyObject self, PyObject sequence) | |
| This special constructor accepts a Python list of Textures. | |
| TextureCollection (TextureCollection const copy) | |
| addTexture (Texture texture) | |
| Adds a new Texture to the collection. | |
| addTexturesFrom (TextureCollection const other) | |
| Adds all the Textures indicated in the other collection to this texture. | |
| append (Texture texture) | |
| Adds a new Texture to the collection. | |
| clear () | |
| Removes all Textures from the collection. | |
| extend (TextureCollection const other) | |
| Appends the other list onto the end of this one. | |
| Texture | findTexture (string 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. | |
| Texture | getTexture (int index) |
| Returns the nth Texture in the collection. | |
| list | getTextures () |
| bool | hasTexture (Texture texture) |
| Returns true if the indicated Texture appears in this collection, false otherwise. | |
| TextureCollection | operator+ (TextureCollection const other) |
| Returns a TextureCollection representing the concatenation of the two lists. | |
| TextureCollection | operator+= (TextureCollection const other) |
| Appends the other list onto the end of this one. | |
| TextureCollection | operator= (TextureCollection const copy) |
| Texture | operator[] (int index) |
| Returns the nth Texture in the collection. | |
| output (ostream out) | |
| Writes a brief one-line description of the TextureCollection to the indicated output stream. | |
| PyObject | reduce (PyObject self) |
| This special Python method is implement to provide support for the pickle module. | |
| removeDuplicateTextures () | |
| Removes any duplicate entries of the same Textures on this collection. | |
| bool | removeTexture (Texture texture) |
| Removes the indicated Texture from the collection. | |
| removeTexturesFrom (TextureCollection const other) | |
| Removes from this collection all of the Textures listed in the other collection. | |
| int | size () |
| Returns the number of textures in the collection. | |
| write (ostream out) | |
| Writes a complete multi-line description of the TextureCollection to the indicated output stream. | |
| write (ostream out, int indent_level) | |
| Writes a complete multi-line description of the TextureCollection to the indicated output stream. | |
Manages a list of Texture objects, as returned by TexturePool.find_all_textures().
| TextureCollection | ( | PyObject | self, |
| PyObject | sequence | ||
| ) |
This special constructor accepts a Python list of Textures.
Since this constructor accepts a generic PyObject *, it should be the last constructor listed in the class record.
| TextureCollection | ( | TextureCollection const | copy | ) |
| addTexturesFrom | ( | TextureCollection const | 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 | ( | TextureCollection const | 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 | ( | string | 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+ | ( | TextureCollection const | other | ) |
Returns a TextureCollection representing the concatenation of the two lists.
| TextureCollection operator+= | ( | TextureCollection const | other | ) |
Appends the other list onto the end of this one.
| TextureCollection operator= | ( | TextureCollection const | copy | ) |
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.
| PyObject reduce | ( | PyObject | self | ) |
This special Python method is implement to provide support for the pickle module.
| 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 | ( | TextureCollection const | other | ) |
Removes from this collection all of the Textures listed in the other collection.
| int size | ( | ) |
Returns the number of textures in the collection.
This is the same thing as get_num_textures().
Writes a complete multi-line description of the TextureCollection to the indicated output stream.
| write | ( | ostream | out | ) |
Writes a complete multi-line description of the TextureCollection to the indicated output stream.
1.7.3