MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / matchesGeomString

Method matchesGeomString

source/MaterialXCore/Geom.cpp:139–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139bool Collection::matchesGeomString(const string& geom) const
140{
141 if (geomStringsMatch(getActiveExcludeGeom(), geom, true))
142 {
143 return false;
144 }
145 if (geomStringsMatch(getActiveIncludeGeom(), geom))
146 {
147 return true;
148 }
149
150 std::set<CollectionPtr> includedSet;
151 vector<CollectionPtr> includedVec = getIncludeCollections();
152 for (size_t i = 0; i < includedVec.size(); i++)
153 {
154 CollectionPtr collection = includedVec[i];
155 if (includedSet.count(collection))
156 {
157 throw ExceptionFoundCycle("Encountered a cycle in collection: " + getName());
158 }
159 includedSet.insert(collection);
160 vector<CollectionPtr> appendVec = collection->getIncludeCollections();
161 includedVec.insert(includedVec.end(), appendVec.begin(), appendVec.end());
162 }
163 for (ConstCollectionPtr collection : includedSet)
164 {
165 if (collection->matchesGeomString(geom))
166 {
167 return true;
168 }
169 }
170
171 return false;
172}
173
174bool Collection::validate(string* message) const
175{

Callers 4

Geom.cppFile · 0.80
loadDocumentMethod · 0.80
getGeometryBindingsFunction · 0.80
updateMaterialMethod · 0.80

Calls 9

geomStringsMatchFunction · 0.85
getActiveExcludeGeomFunction · 0.85
getActiveIncludeGeomFunction · 0.85
countMethod · 0.80
insertMethod · 0.80
getIncludeCollectionsMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected