Added a bool paramter to osg::StateSet::compare(const StateSet& rhs,bool compareAttributeContents=false) const;
to allow it to use different comparison schemes, now it can use checking for pointer equality (the default) or attribute contexts. This has been added to assist optimization of databases within the flt loader, but also could be useful for other operations too.
This commit is contained in:
@@ -35,7 +35,7 @@ class SG_EXPORT StateSet : public Object
|
||||
virtual const char* className() const { return "StateSet"; }
|
||||
|
||||
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
|
||||
int compare(const StateSet& rhs) const;
|
||||
int compare(const StateSet& rhs,bool compareAttributeContents=false) const;
|
||||
|
||||
bool operator < (const StateSet& rhs) const { return compare(rhs)<0; }
|
||||
bool operator == (const StateSet& rhs) const { return compare(rhs)==0; }
|
||||
|
||||
Reference in New Issue
Block a user