14#ifndef MATERIALCOLLECTION_H
15#define MATERIALCOLLECTION_H
24class EXPCL_PANDA_PGRAPH MaterialCollection {
27 MaterialCollection(
const MaterialCollection ©);
28 void operator = (
const MaterialCollection ©);
29 INLINE ~MaterialCollection();
43 Material *operator [] (
int index)
const;
45 INLINE
void operator += (
const MaterialCollection &other);
46 INLINE MaterialCollection operator + (
const MaterialCollection &other)
const;
48 void output(std::ostream &out)
const;
49 void write(std::ostream &out,
int indent_level = 0)
const;
void add_materials_from(const MaterialCollection &other)
Adds all the Materials indicated in the other collection to this material.
bool has_material(Material *material) const
Returns true if the indicated Material appears in this collection, false otherwise.
void remove_duplicate_materials()
Removes any duplicate entries of the same Materials on this collection.
Material * get_material(int index) const
Returns the nth Material in the collection.
bool remove_material(Material *node_material)
Removes the indicated Material from the collection.
void output(std::ostream &out) const
Writes a brief one-line description of the MaterialCollection to the indicated output stream.
int get_num_materials() const
Returns the number of Materials in the collection.
void remove_materials_from(const MaterialCollection &other)
Removes from this collection all of the Materials listed in the other collection.
void write(std::ostream &out, int indent_level=0) const
Writes a complete multi-line description of the MaterialCollection to the indicated output stream.
int size() const
Returns the number of materials in the collection.
Material * find_material(const std::string &name) const
Returns the material in the collection with the indicated name, if any, or NULL if no material has th...
void clear()
Removes all Materials from the collection.
void add_material(Material *node_material)
Adds a new Material to the collection.
Defines the way an object appears in the presence of lighting.
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.