14#ifndef TEXTURECOLLECTION_H
15#define TEXTURECOLLECTION_H
25class EXPCL_PANDA_GOBJ TextureCollection {
28 TextureCollection(
const TextureCollection ©);
29 void operator = (
const TextureCollection ©);
30 INLINE ~TextureCollection();
33 EXTENSION(TextureCollection(PyObject *self, PyObject *sequence));
34 EXTENSION(PyObject *__reduce__(PyObject *self)
const);
51 Texture *operator [] (
int index)
const;
53 INLINE
void operator += (
const TextureCollection &other);
54 INLINE TextureCollection operator + (
const TextureCollection &other)
const;
58 INLINE
void extend(
const TextureCollection &other);
60 void output(std::ostream &out)
const;
61 void write(std::ostream &out,
int indent_level = 0)
const;
64 typedef PTA(PT(
Texture)) Textures;
68INLINE std::ostream &operator << (std::ostream &out,
const TextureCollection &col) {
Manages a list of Texture objects, as returned by TexturePool::find_all_textures().
get_num_textures
Returns the number of Textures in the collection.
void extend(const TextureCollection &other)
Appends the other list onto the end of this one.
void add_texture(Texture *texture)
Adds a new Texture to the collection.
void remove_duplicate_textures()
Removes any duplicate entries of the same Textures on this collection.
int size() const
Returns the number of textures in the collection.
bool has_texture(Texture *texture) const
Returns true if the indicated Texture appears in this collection, false otherwise.
bool remove_texture(Texture *texture)
Removes the indicated Texture from the collection.
void append(Texture *texture)
Adds a new Texture to 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 reserve(size_t num)
This is a hint to Panda to allocate enough memory to hold the given number of NodePaths,...
void write(std::ostream &out, int indent_level=0) const
Writes a complete multi-line description of the TextureCollection to the indicated output stream.
void clear()
Removes all Textures from the collection.
Texture * find_texture(const std::string &name) const
Returns the texture in the collection with the indicated name, if any, or NULL if no texture has that...
void output(std::ostream &out) const
Writes a brief one-line description of the TextureCollection to the indicated output stream.
get_texture
Returns the nth Texture in the collection.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.