Panda3D
Classes | 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. More...
 
void add_texture_stages_from (const TextureStageCollection &other)
 Adds all the TextureStages indicated in the other collection to this texture_stage. More...
 
void clear ()
 Removes all TextureStages from the collection. More...
 
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. More...
 
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. More...
 
TextureStageoperator [] (int index) const
 Returns the nth TextureStage in the collection. More...
 
TextureStageCollection operator+ (const TextureStageCollection &other) const
 Returns a TextureStageCollection representing the concatenation of the two lists. More...
 
void operator+= (const TextureStageCollection &other)
 Appends the other list onto the end of this one. More...
 
void operator= (const TextureStageCollection &copy)
 
void output (std::ostream &out) const
 Writes a brief one-line description of the TextureStageCollection to the indicated output stream. More...
 
void remove_duplicate_texture_stages ()
 Removes any duplicate entries of the same TextureStages on this collection. More...
 
bool remove_texture_stage (TextureStage *node_texture_stage)
 Removes the indicated TextureStage from the collection. More...
 
void remove_texture_stages_from (const TextureStageCollection &other)
 Removes from this collection all of the TextureStages listed in the other collection. More...
 
int size () const
 Returns the number of texture stages in the collection. More...
 
void sort ()
 Sorts the TextureStages in this collection into order by TextureStage::sort(), from lowest to highest. More...
 
void write (std::ostream &out, int indent_level=0) const
 Writes a complete multi-line description of the TextureStageCollection to the indicated output stream. More...
 

Public Attributes

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

Detailed Description

Definition at line 24 of file textureStageCollection.h.

Member Function Documentation

◆ add_texture_stage()

void TextureStageCollection::add_texture_stage ( TextureStage node_texture_stage)

Adds a new TextureStage to the collection.

Definition at line 48 of file textureStageCollection.cxx.

◆ 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 101 of file textureStageCollection.cxx.

References get_num_texture_stages.

Referenced by operator+=().

◆ clear()

void TextureStageCollection::clear ( )

Removes all TextureStages from the collection.

Definition at line 170 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 179 of file textureStageCollection.cxx.

References get_num_texture_stages.

◆ 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 157 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 213 of file textureStageCollection.cxx.

◆ operator+()

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

Returns a TextureStageCollection representing the concatenation of the two lists.

Definition at line 34 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 25 of file textureStageCollection.I.

References add_texture_stages_from().

◆ 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 243 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 132 of file textureStageCollection.cxx.

References get_num_texture_stages.

◆ 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 68 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 114 of file textureStageCollection.cxx.

References get_num_texture_stages.

◆ 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 224 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 233 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 256 of file textureStageCollection.cxx.

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(), output(), remove_duplicate_texture_stages(), and remove_texture_stages_from().

◆ get_texture_stage

TextureStage * TextureStageCollection::get_texture_stage

Returns the nth TextureStage in the collection.

Definition at line 43 of file textureStageCollection.h.


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