TextureCollection

from panda3d.core import TextureCollection
class TextureCollection

Bases: DTOOL_SUPER_BASE

Manages a list of Texture objects, as returned by TexturePool::find_all_textures().

Inheritance diagram

Inheritance diagram of TextureCollection

__init__(*args, **kwargs)
addTexture()

C++ Interface: add_texture(const TextureCollection self, Texture texture)

/**
  • Adds a new Texture to the collection.

*/

addTexturesFrom()

C++ Interface: add_textures_from(const TextureCollection self, 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.

*/

add_texture()

C++ Interface: add_texture(const TextureCollection self, Texture texture)

/**
  • Adds a new Texture to the collection.

*/

add_textures_from()

C++ Interface: add_textures_from(const TextureCollection self, 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()

C++ Interface: append(const TextureCollection self, Texture texture)

// Method names to satisfy Python’s conventions.

/**
  • Adds a new Texture to the collection. This method duplicates the

  • add_texture() method; it is provided to satisfy Python’s naming convention.

*/

assign()

C++ Interface: assign(const TextureCollection self, const TextureCollection copy)

clear()

C++ Interface: clear(const TextureCollection self)

/**
  • Removes all Textures from the collection.

*/

extend()

C++ Interface: extend(const TextureCollection self, 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.

*/

findTexture()

C++ Interface: find_texture(TextureCollection self, str name)

/**
  • Returns the texture in the collection with the indicated name, if any, or

  • NULL if no texture has that name.

*/

find_texture()

C++ Interface: find_texture(TextureCollection self, str name)

/**
  • Returns the texture in the collection with the indicated name, if any, or

  • NULL if no texture has that name.

*/

getNumTextures()

C++ Interface: get_num_textures(TextureCollection self)

/**
  • Returns the number of Textures in the collection.

*/

getTexture()

C++ Interface: get_texture(TextureCollection self, int index)

/**
  • Returns the nth Texture in the collection.

*/

getTextures()
get_num_textures()

C++ Interface: get_num_textures(TextureCollection self)

/**
  • Returns the number of Textures in the collection.

*/

get_texture()

C++ Interface: get_texture(TextureCollection self, int index)

/**
  • Returns the nth Texture in the collection.

*/

get_textures()
hasTexture()

C++ Interface: has_texture(TextureCollection self, Texture texture)

/**
  • Returns true if the indicated Texture appears in this collection, false

  • otherwise.

*/

has_texture()

C++ Interface: has_texture(TextureCollection self, Texture texture)

/**
  • Returns true if the indicated Texture appears in this collection, false

  • otherwise.

*/

output()

C++ Interface: output(TextureCollection self, ostream out)

/**
  • Writes a brief one-line description of the TextureCollection to the

  • indicated output stream.

*/

removeDuplicateTextures()

C++ Interface: remove_duplicate_textures(const TextureCollection self)

/**
  • 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.

*/

removeTexture()

C++ Interface: remove_texture(const TextureCollection self, 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()

C++ Interface: remove_textures_from(const TextureCollection self, const TextureCollection other)

/**
  • Removes from this collection all of the Textures listed in the other

  • collection.

*/

remove_duplicate_textures()

C++ Interface: remove_duplicate_textures(const TextureCollection self)

/**
  • 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.

*/

remove_texture()

C++ Interface: remove_texture(const TextureCollection self, 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.

*/

remove_textures_from()

C++ Interface: remove_textures_from(const TextureCollection self, const TextureCollection other)

/**
  • Removes from this collection all of the Textures listed in the other

  • collection.

*/

reserve()

C++ Interface: reserve(const TextureCollection self, 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.

*/

write()

C++ Interface: write(TextureCollection self, ostream out, int indent_level)

/**
  • Writes a complete multi-line description of the TextureCollection to the

  • indicated output stream.

*/