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:
Robert Osfield
2001-10-31 20:04:32 +00:00
parent 78372a5a62
commit 4d4ff39ff9
2 changed files with 43 additions and 18 deletions

View File

@@ -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; }