mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
add TextureStageCollection::sort()
This commit is contained in:
parent
a209d63185
commit
3c39318b34
@ -19,6 +19,8 @@
|
|||||||
#include "textureStageCollection.h"
|
#include "textureStageCollection.h"
|
||||||
|
|
||||||
#include "indent.h"
|
#include "indent.h"
|
||||||
|
#include "indirectLess.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: TextureStageCollection::Constructor
|
// Function: TextureStageCollection::Constructor
|
||||||
@ -253,6 +255,18 @@ operator [] (int index) const {
|
|||||||
return _texture_stages[index];
|
return _texture_stages[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: TextureStageCollection::sort
|
||||||
|
// Access: Published
|
||||||
|
// Description: Sorts the TextureStages in this collection into order
|
||||||
|
// by TextureStage::sort(), from lowest to highest.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void TextureStageCollection::
|
||||||
|
sort() {
|
||||||
|
::sort(_texture_stages.begin(), _texture_stages.end(),
|
||||||
|
IndirectLess<TextureStage>());
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: TextureStageCollection::output
|
// Function: TextureStageCollection::output
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -48,6 +48,8 @@ PUBLISHED:
|
|||||||
TextureStage *get_texture_stage(int index) const;
|
TextureStage *get_texture_stage(int index) const;
|
||||||
TextureStage *operator [] (int index) const;
|
TextureStage *operator [] (int index) const;
|
||||||
|
|
||||||
|
void sort();
|
||||||
|
|
||||||
void output(ostream &out) const;
|
void output(ostream &out) const;
|
||||||
void write(ostream &out, int indent_level = 0) const;
|
void write(ostream &out, int indent_level = 0) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user