Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
TextureStageCollection Class Reference

Public Member Functions

 TextureStageCollection (const TextureStageCollection &copy)
 
void add_texture_stage (TextureStage *node_texture_stage)
 Adds a new TextureStage to the collection.
 
void add_texture_stages_from (const TextureStageCollection &other)
 Adds all the TextureStages indicated in the other collection to this texture_stage.
 
void clear ()
 Removes all TextureStages from the collection.
 
TextureStagefind_texture_stage (const std::string &name) const
 Returns the texture_stage in the collection with the indicated name, if any, or NULL if no texture_stage has that name.
 
int get_num_texture_stages () const
 
TextureStageget_texture_stage (int index) const
 
bool has_texture_stage (TextureStage *texture_stage) const
 Returns true if the indicated TextureStage appears in this collection, false otherwise.
 
TextureStageCollection operator+ (const TextureStageCollection &other) const
 Returns a TextureStageCollection representing the concatenation of the two lists.
 
void operator+= (const TextureStageCollection &other)
 Appends the other list onto the end of this one.
 
void operator= (const TextureStageCollection &copy)
 
TextureStageoperator[] (int index) const
 Returns the nth TextureStage in the collection.
 
void output (std::ostream &out) const
 Writes a brief one-line description of the TextureStageCollection to the indicated output stream.
 
void remove_duplicate_texture_stages ()
 Removes any duplicate entries of the same TextureStages on this collection.
 
bool remove_texture_stage (TextureStage *node_texture_stage)
 Removes the indicated TextureStage from the collection.
 
void remove_texture_stages_from (const TextureStageCollection &other)
 Removes from this collection all of the TextureStages listed in the other collection.
 
int size () const
 Returns the number of texture stages in the collection.
 
void sort ()
 Sorts the TextureStages in this collection into order by TextureStage::sort(), from lowest to highest.
 
void write (std::ostream &out, int indent_level=0) const
 Writes a complete multi-line description of the TextureStageCollection to the indicated output stream.
 

Public Attributes

 get_num_texture_stages
 Returns the number of TextureStages in the collection.
 
 get_texture_stage
 Returns the nth TextureStage in the collection.
 

Detailed Description

Definition at line 24 of file textureStageCollection.h.

Constructor & Destructor Documentation

◆ TextureStageCollection() [1/2]

TextureStageCollection::TextureStageCollection ( )

Definition at line 23 of file textureStageCollection.cxx.

◆ TextureStageCollection() [2/2]

TextureStageCollection::TextureStageCollection ( const TextureStageCollection & copy)

Definition at line 30 of file textureStageCollection.cxx.

◆ ~TextureStageCollection()

TextureStageCollection::~TextureStageCollection ( )
inline

Definition at line 17 of file textureStageCollection.I.

Member Function Documentation

◆ add_texture_stage()

void TextureStageCollection::add_texture_stage ( TextureStage * node_texture_stage)

◆ add_texture_stages_from()

void TextureStageCollection::add_texture_stages_from ( const TextureStageCollection & other)

Adds all the TextureStages indicated in the other collection to this texture_stage.

The other texture_stages are simply appended to the end of the texture_stages in this list; duplicates are not automatically removed.

Definition at line 100 of file textureStageCollection.cxx.

References add_texture_stage(), get_num_texture_stages, and get_texture_stage.

Referenced by operator+=().

◆ clear()

void TextureStageCollection::clear ( )

Removes all TextureStages from the collection.

Definition at line 169 of file textureStageCollection.cxx.

◆ find_texture_stage()

TextureStage * TextureStageCollection::find_texture_stage ( const std::string & name) const

Returns the texture_stage in the collection with the indicated name, if any, or NULL if no texture_stage has that name.

Definition at line 178 of file textureStageCollection.cxx.

References TextureStage::get_name, get_num_texture_stages, and get_texture_stage.

◆ has_texture_stage()

bool TextureStageCollection::has_texture_stage ( TextureStage * texture_stage) const

Returns true if the indicated TextureStage appears in this collection, false otherwise.

Definition at line 156 of file textureStageCollection.cxx.

References get_num_texture_stages, and get_texture_stage.

Referenced by remove_texture_stages_from().

◆ operator+()

TextureStageCollection TextureStageCollection::operator+ ( const TextureStageCollection & other) const
inline

Returns a TextureStageCollection representing the concatenation of the two lists.

Definition at line 33 of file textureStageCollection.I.

◆ operator+=()

void TextureStageCollection::operator+= ( const TextureStageCollection & other)
inline

Appends the other list onto the end of this one.

Definition at line 24 of file textureStageCollection.I.

References add_texture_stages_from().

◆ operator=()

void TextureStageCollection::operator= ( const TextureStageCollection & copy)

Definition at line 39 of file textureStageCollection.cxx.

◆ operator[]()

TextureStage * TextureStageCollection::operator[] ( int index) const

Returns the nth TextureStage in the collection.

This is the same as get_texture_stage(), but it may be a more convenient way to access it.

Definition at line 212 of file textureStageCollection.cxx.

◆ output()

void TextureStageCollection::output ( std::ostream & out) const

Writes a brief one-line description of the TextureStageCollection to the indicated output stream.

Definition at line 242 of file textureStageCollection.cxx.

References get_num_texture_stages.

◆ remove_duplicate_texture_stages()

void TextureStageCollection::remove_duplicate_texture_stages ( )

Removes any duplicate entries of the same TextureStages on this collection.

If a TextureStage appears multiple times, the first appearance is retained; subsequent appearances are removed.

Definition at line 131 of file textureStageCollection.cxx.

References get_num_texture_stages, and get_texture_stage.

◆ remove_texture_stage()

bool TextureStageCollection::remove_texture_stage ( TextureStage * node_texture_stage)

Removes the indicated TextureStage from the collection.

Returns true if the texture_stage was removed, false if it was not a member of the collection.

Definition at line 67 of file textureStageCollection.cxx.

◆ remove_texture_stages_from()

void TextureStageCollection::remove_texture_stages_from ( const TextureStageCollection & other)

Removes from this collection all of the TextureStages listed in the other collection.

Definition at line 113 of file textureStageCollection.cxx.

References get_num_texture_stages, get_texture_stage, and has_texture_stage().

◆ size()

int TextureStageCollection::size ( ) const

Returns the number of texture stages in the collection.

This is the same thing as get_num_texture_stages().

Definition at line 223 of file textureStageCollection.cxx.

◆ sort()

void TextureStageCollection::sort ( )

Sorts the TextureStages in this collection into order by TextureStage::sort(), from lowest to highest.

Definition at line 232 of file textureStageCollection.cxx.

◆ write()

void TextureStageCollection::write ( std::ostream & out,
int indent_level = 0 ) const

Writes a complete multi-line description of the TextureStageCollection to the indicated output stream.

Definition at line 255 of file textureStageCollection.cxx.

References get_num_texture_stages, get_texture_stage, and indent().

Member Data Documentation

◆ get_num_texture_stages

int TextureStageCollection::get_num_texture_stages

Returns the number of TextureStages in the collection.

Definition at line 43 of file textureStageCollection.h.

Referenced by add_texture_stages_from(), find_texture_stage(), has_texture_stage(), output(), remove_duplicate_texture_stages(), remove_texture_stages_from(), and write().

◆ get_texture_stage

TextureStage * TextureStageCollection::get_texture_stage

The documentation for this class was generated from the following files: