Panda3D
|
Public Member Functions | |
__init__ () | |
__init__ (const MaterialCollection copy) | |
addMaterial (Material node_material) | |
Adds a new Material to the collection. More... | |
addMaterialsFrom (const MaterialCollection other) | |
Adds all the Materials indicated in the other collection to this material. More... | |
clear () | |
Removes all Materials from the collection. More... | |
Material | findMaterial (str name) |
Returns the material in the collection with the indicated name, if any, or NULL if no material has that name. More... | |
Material | getMaterial (int index) |
Returns the nth Material in the collection. More... | |
int | getNumMaterials () |
Returns the number of Materials in the collection. More... | |
bool | hasMaterial (Material material) |
Returns true if the indicated Material appears in this collection, false otherwise. More... | |
Material | operator [] (int index) |
Returns the nth Material in the collection. More... | |
MaterialCollection | operator+ (const MaterialCollection other) |
MaterialCollection | operator+= (const MaterialCollection other) |
MaterialCollection | operator= (const MaterialCollection copy) |
output (Ostream out) | |
Writes a brief one-line description of the MaterialCollection to the indicated output stream. More... | |
removeDuplicateMaterials () | |
Removes any duplicate entries of the same Materials on this collection. More... | |
bool | removeMaterial (Material node_material) |
Removes the indicated Material from the collection. More... | |
removeMaterialsFrom (const MaterialCollection other) | |
Removes from this collection all of the Materials listed in the other collection. More... | |
int | size () |
Returns the number of materials in the collection. More... | |
write (Ostream out, int indent_level) | |
Writes a complete multi-line description of the MaterialCollection to the indicated output stream. More... | |
__init__ | ( | ) |
__init__ | ( | const MaterialCollection | copy | ) |
addMaterialsFrom | ( | const MaterialCollection | other | ) |
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 | ( | ) |
Removes all Materials from the collection.
Material findMaterial | ( | str | name | ) |
Returns the material in the collection with the indicated name, if any, or NULL if no material has that name.
int getNumMaterials | ( | ) |
Returns the number of Materials in the collection.
bool hasMaterial | ( | Material | material | ) |
Returns true if the indicated Material appears in this collection, false otherwise.
Material operator [] | ( | int | index | ) |
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.
MaterialCollection operator+ | ( | const MaterialCollection | other | ) |
MaterialCollection operator+= | ( | const MaterialCollection | other | ) |
MaterialCollection operator= | ( | const MaterialCollection | copy | ) |
output | ( | Ostream | out | ) |
Writes a brief one-line description of the MaterialCollection to the indicated output stream.
removeDuplicateMaterials | ( | ) |
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.
bool removeMaterial | ( | Material | node_material | ) |
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 | ( | const MaterialCollection | other | ) |
Removes from this collection all of the Materials listed in the other collection.
int size | ( | ) |
Returns the number of materials in the collection.
This is the same thing as get_num_materials().
write | ( | Ostream | out, |
int | indent_level | ||
) |
Writes a complete multi-line description of the MaterialCollection to the indicated output stream.