# MaterialCollection

from pandac.PandaModules import MaterialCollection

Class : MaterialCollection
Description :

## Inheritance:

MaterialCollection:

## Methods of MaterialCollection:

MaterialCollection (Constructor)
addMaterial
addMaterialsFrom
clear
findMaterial
getMaterial
getNumMaterials
hasMaterial
operator +
operator +=
operator =
operator []
output
removeDuplicateMaterials
removeMaterial
removeMaterialsFrom
size
write

MaterialCollection MaterialCollection::MaterialCollection(void); Description:

addMaterial void MaterialCollection::add_material(Material *node_material); Description: Adds a new Material to the collection.

addMaterialsFrom void MaterialCollection::add_materials_from(MaterialCollection const &other); Description: Adds all the Materials indicated in the other collection to this material. The other materials are simply appended to the end of the materials in this list; duplicates are not automatically removed.

clear void MaterialCollection::clear(void); Description: Removes all Materials from the collection.

findMaterial Material *MaterialCollection::find_material(string const &name) const; Description: Returns the material in the collection with the indicated name, if any, or NULL if no material has that name.

getMaterial Material *MaterialCollection::get_material(int index) const; Description: Returns the nth Material in the collection.

getNumMaterials int MaterialCollection::get_num_materials(void) const; Description: Returns the number of Materials in the collection.

hasMaterial bool MaterialCollection::has_material(Material *material) const; Description: Returns true if the indicated Material appears in this collection, false otherwise.

operator + MaterialCollection MaterialCollection::operator +(MaterialCollection const &other) const; Description: Returns a MaterialCollection representing the concatenation of the two lists.

operator += void MaterialCollection::operator +=(MaterialCollection const &other); Description: Appends the other list onto the end of this one.

operator = void MaterialCollection::operator =(MaterialCollection const &copy); Description:

operator [] Material *MaterialCollection::operator [](int index) const; Description: Returns the nth Material in the collection. This is the same as get_material(), but it may be a more convenient way to access it.

output void MaterialCollection::output(ostream &out) const; Description: Writes a brief one-line description of the MaterialCollection to the indicated output stream.

removeDuplicateMaterials void MaterialCollection::remove_duplicate_materials(void); Description: Removes any duplicate entries of the same Materials on this collection. If a Material appears multiple times, the first appearance is retained; subsequent appearances are removed.

removeMaterial bool MaterialCollection::remove_material(Material *node_material); Description: Removes the indicated Material from the collection. Returns true if the material was removed, false if it was not a member of the collection.

removeMaterialsFrom void MaterialCollection::remove_materials_from(MaterialCollection const &other); Description: Removes from this collection all of the Materials listed in the other collection.

size int MaterialCollection::size(void) const; Description: Returns the number of materials in the collection. This is the same thing as get_num_materials().

write void MaterialCollection::write(ostream &out, int indent_level = (0)) const; Description: Writes a complete multi-line description of the MaterialCollection to the indicated output stream.