HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geom.h
Go to the documentation of this file.
1 //
2 // TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3 // All rights reserved. See LICENSE.txt for license.
4 //
5 
6 #ifndef MATERIALX_GEOM_H
7 #define MATERIALX_GEOM_H
8 
9 /// @file
10 /// Geometric element subclasses
11 
12 #include <MaterialXCore/Export.h>
13 
14 #include <MaterialXCore/Element.h>
15 
17 
18 extern MX_CORE_API const string GEOM_PATH_SEPARATOR;
19 extern MX_CORE_API const string UNIVERSAL_GEOM_NAME;
20 extern MX_CORE_API const string UDIM_TOKEN;
21 extern MX_CORE_API const string UV_TILE_TOKEN;
22 extern MX_CORE_API const string UDIM_SET_PROPERTY;
23 
24 class GeomElement;
25 class GeomInfo;
26 class GeomProp;
27 class GeomPropDef;
28 class Collection;
29 class CollectionAdd;
30 class CollectionRemove;
31 
32 /// A shared pointer to a GeomElement
33 using GeomElementPtr = shared_ptr<GeomElement>;
34 /// A shared pointer to a const GeomElement
35 using ConstGeomElementPtr = shared_ptr<const GeomElement>;
36 
37 /// A shared pointer to a GeomInfo
38 using GeomInfoPtr = shared_ptr<GeomInfo>;
39 /// A shared pointer to a const GeomInfo
40 using ConstGeomInfoPtr = shared_ptr<const GeomInfo>;
41 
42 /// A shared pointer to a GeomProp
43 using GeomPropPtr = shared_ptr<GeomProp>;
44 /// A shared pointer to a const GeomProp
45 using ConstGeomPropPtr = shared_ptr<const GeomProp>;
46 
47 /// A shared pointer to a GeomPropDef
48 using GeomPropDefPtr = shared_ptr<GeomPropDef>;
49 /// A shared pointer to a const GeomPropDef
50 using ConstGeomPropDefPtr = shared_ptr<const GeomPropDef>;
51 
52 /// A shared pointer to a Collection
53 using CollectionPtr = shared_ptr<Collection>;
54 /// A shared pointer to a const Collection
55 using ConstCollectionPtr = shared_ptr<const Collection>;
56 
57 /// @class GeomPath
58 /// A MaterialX geometry path, representing the hierarchical location
59 /// expressed by a geometry name.
61 {
62  public:
64  _empty(true)
65  {
66  }
67  ~GeomPath() { }
68 
69  bool operator==(const GeomPath& rhs) const
70  {
71  return _vec == rhs._vec &&
72  _empty == rhs._empty;
73  }
74  bool operator!=(const GeomPath& rhs) const
75  {
76  return !(*this == rhs);
77  }
78 
79  /// Construct a path from a geometry name string.
80  explicit GeomPath(const string& geom) :
81  _vec(splitString(geom, GEOM_PATH_SEPARATOR)),
82  _empty(geom.empty())
83  {
84  }
85 
86  /// Convert a path to a geometry name string.
87  operator string() const
88  {
89  if (_vec.empty())
90  {
91  return _empty ? EMPTY_STRING : UNIVERSAL_GEOM_NAME;
92  }
93  string geom;
94  for (size_t i = 0; i < _vec.size(); i++)
95  {
96  geom += _vec[i];
97  if (i + 1 < _vec.size())
98  {
99  geom += GEOM_PATH_SEPARATOR;
100  }
101  }
102  return geom;
103  }
104 
105  /// Return true if there is any geometry in common between the two paths.
106  /// @param rhs A second geometry path to be compared with this one
107  /// @param contains If true, then we require that the first path completely
108  /// contains the second one.
109  bool isMatching(const GeomPath& rhs, bool contains = false) const
110  {
111  if (_empty || rhs._empty)
112  {
113  return false;
114  }
115  if (contains && _vec.size() > rhs._vec.size())
116  {
117  return false;
118  }
119  size_t minSize = std::min(_vec.size(), rhs._vec.size());
120  for (size_t i = 0; i < minSize; i++)
121  {
122  if (_vec[i] != rhs._vec[i])
123  {
124  return false;
125  }
126  }
127  return true;
128  }
129 
130  /// Return true if this geometry path is empty. An empty path matches
131  /// no other geometry paths.
132  bool isEmpty() const
133  {
134  return _empty;
135  }
136 
137  /// Return true if this geometry path is universal. A universal path
138  /// matches all non-empty geometry paths.
139  bool isUniversal() const
140  {
141  return _vec.empty() && !_empty;
142  }
143 
144  private:
145  StringVec _vec;
146  bool _empty;
147 };
148 
149 /// @class GeomElement
150 /// The base class for geometric elements, which support bindings to geometries
151 /// and geometric collections.
153 {
154  protected:
155  GeomElement(ElementPtr parent, const string& category, const string& name) :
156  Element(parent, category, name)
157  {
158  }
159 
160  public:
161  virtual ~GeomElement() { }
162 
163  /// @name Geometry
164  /// @{
165 
166  /// Set the geometry string of this element.
167  void setGeom(const string& geom)
168  {
169  setAttribute(GEOM_ATTRIBUTE, geom);
170  }
171 
172  /// Return true if this element has a geometry string.
173  bool hasGeom() const
174  {
175  return hasAttribute(GEOM_ATTRIBUTE);
176  }
177 
178  /// Return the geometry string of this element.
179  const string& getGeom() const
180  {
181  return getAttribute(GEOM_ATTRIBUTE);
182  }
183 
184  /// Return the active geometry string of this element, taking all geometry
185  /// string substitutions at this scope into account.
186  string getActiveGeom() const
187  {
188  return hasGeom() ?
189  createStringResolver()->resolve(getGeom(), GEOMNAME_TYPE_STRING) :
190  EMPTY_STRING;
191  }
192 
193  /// @}
194  /// @name Collection
195  /// @{
196 
197  /// Set the collection string of this element.
198  void setCollectionString(const string& collection)
199  {
200  setAttribute(COLLECTION_ATTRIBUTE, collection);
201  }
202 
203  /// Return true if this element has a collection string.
204  bool hasCollectionString() const
205  {
206  return hasAttribute(COLLECTION_ATTRIBUTE);
207  }
208 
209  /// Return the collection string of this element.
210  const string& getCollectionString() const
211  {
212  return getAttribute(COLLECTION_ATTRIBUTE);
213  }
214 
215  /// Assign a Collection to this element.
216  void setCollection(ConstCollectionPtr collection);
217 
218  /// Return the Collection that is assigned to this element.
219  CollectionPtr getCollection() const;
220 
221  /// @}
222  /// @name Validation
223  /// @{
224 
225  /// Validate that the given element tree, including all descendants, is
226  /// consistent with the MaterialX specification.
227  bool validate(string* message = nullptr) const override;
228 
229  /// @}
230 
231  public:
232  static const string GEOM_ATTRIBUTE;
233  static const string COLLECTION_ATTRIBUTE;
234 };
235 
236 /// @class GeomInfo
237 /// A geometry info element within a Document.
239 {
240  public:
241  GeomInfo(ElementPtr parent, const string& name) :
242  GeomElement(parent, CATEGORY, name)
243  {
244  }
245  virtual ~GeomInfo() { }
246 
247  /// @name GeomProp Elements
248  /// @{
249 
250  /// Add a GeomProp to this element.
251  /// @param name The name of the new GeomProp.
252  /// If no name is specified, then a unique name will automatically be
253  /// generated.
254  /// @return A shared pointer to the new GeomProp.
256  {
257  return addChild<GeomProp>(name);
258  }
259 
260  /// Return the GeomProp, if any, with the given name.
261  GeomPropPtr getGeomProp(const string& name) const
262  {
263  return getChildOfType<GeomProp>(name);
264  }
265 
266  /// Return a vector of all GeomProp elements.
267  vector<GeomPropPtr> getGeomProps() const
268  {
269  return getChildrenOfType<GeomProp>();
270  }
271 
272  /// Remove the GeomProp, if any, with the given name.
273  void removeGeomProp(const string& name)
274  {
275  removeChildOfType<GeomProp>(name);
276  }
277 
278  /// @}
279  /// @name Tokens
280  /// @{
281 
282  /// Add a Token to this element.
283  /// @param name The name of the new Token.
284  /// If no name is specified, then a unique name will automatically be
285  /// generated.
286  /// @return A shared pointer to the new Token.
288  {
289  return addChild<Token>(name);
290  }
291 
292  /// Return the Token, if any, with the given name.
293  TokenPtr getToken(const string& name) const
294  {
295  return getChildOfType<Token>(name);
296  }
297 
298  /// Return a vector of all Token elements.
299  vector<TokenPtr> getTokens() const
300  {
301  return getChildrenOfType<Token>();
302  }
303 
304  /// Remove the Token, if any, with the given name.
305  void removeToken(const string& name)
306  {
307  removeChildOfType<Token>(name);
308  }
309 
310  /// @}
311  /// @name Values
312  /// @{
313 
314  /// Set the value of a GeomProp by its name, creating a child element
315  /// to hold the GeomProp if needed.
316  template <class T> GeomPropPtr setGeomPropValue(const string& name,
317  const T& value,
318  const string& type = EMPTY_STRING);
319 
320  /// Set the string value of a Token by its name, creating a child element
321  /// to hold the Token if needed.
322  TokenPtr setTokenValue(const string& name, const string& value)
323  {
324  TokenPtr token = getToken(name);
325  if (!token)
326  token = addToken(name);
327  token->setValue<string>(value);
328  return token;
329  }
330 
331  /// @}
332 
333  public:
334  static const string CATEGORY;
335 };
336 
337 /// @class GeomProp
338 /// A geometric property element within a GeomInfo.
340 {
341  public:
342  GeomProp(ElementPtr parent, const string& name) :
343  ValueElement(parent, CATEGORY, name)
344  {
345  }
346  virtual ~GeomProp() { }
347 
348  public:
349  static const string CATEGORY;
350 };
351 
352 /// @class GeomPropDef
353 /// An element representing a declaration of geometric property data.
354 ///
355 /// A GeomPropDef element contains a reference to a geometric node and a set of
356 /// modifiers for that node. For example, a world-space normal can be declared
357 /// as a reference to the "normal" geometric node with a space setting of
358 /// "world", or a specific set of texture coordinates can be declared as a
359 /// reference to the "texcoord" geometric node with an index setting of "1".
361 {
362  public:
363  GeomPropDef(ElementPtr parent, const string& name) :
364  Element(parent, CATEGORY, name)
365  {
366  }
367  virtual ~GeomPropDef() { }
368 
369  /// @name Geometric Property
370  /// @{
371 
372  /// Set the geometric property string of this element.
373  void setGeomProp(const string& node)
374  {
375  setAttribute(GEOM_PROP_ATTRIBUTE, node);
376  }
377 
378  /// Return true if this element has a geometric property string.
379  bool hasGeomProp() const
380  {
381  return hasAttribute(GEOM_PROP_ATTRIBUTE);
382  }
383 
384  /// Return the geometric property string of this element.
385  const string& getGeomProp() const
386  {
387  return getAttribute(GEOM_PROP_ATTRIBUTE);
388  }
389 
390  /// @}
391  /// @name Geometric Space
392  /// @{
393 
394  /// Set the geometric space string of this element.
395  void setSpace(const string& space)
396  {
397  setAttribute(SPACE_ATTRIBUTE, space);
398  }
399 
400  /// Return true if this element has a geometric space string.
401  bool hasSpace() const
402  {
403  return hasAttribute(SPACE_ATTRIBUTE);
404  }
405 
406  /// Return the geometric space string of this element.
407  const string& getSpace() const
408  {
409  return getAttribute(SPACE_ATTRIBUTE);
410  }
411 
412  /// @}
413  /// @name Geometric Index
414  /// @{
415 
416  /// Set the index string of this element.
417  void setIndex(const string& space)
418  {
419  setAttribute(INDEX_ATTRIBUTE, space);
420  }
421 
422  /// Return true if this element has an index string.
423  bool hasIndex() const
424  {
425  return hasAttribute(INDEX_ATTRIBUTE);
426  }
427 
428  /// Return the index string of this element.
429  const string& getIndex() const
430  {
431  return getAttribute(INDEX_ATTRIBUTE);
432  }
433 
434  /// @}
435 
436  public:
437  static const string CATEGORY;
438  static const string GEOM_PROP_ATTRIBUTE;
439  static const string SPACE_ATTRIBUTE;
440  static const string INDEX_ATTRIBUTE;
441 };
442 
443 /// @class Collection
444 /// A collection element within a Document.
446 {
447  public:
448  Collection(ElementPtr parent, const string& name) :
449  Element(parent, CATEGORY, name)
450  {
451  }
452  virtual ~Collection() { }
453 
454  /// @name Include Geometry
455  /// @{
456 
457  /// Set the include geometry string of this element.
458  void setIncludeGeom(const string& geom)
459  {
460  setAttribute(INCLUDE_GEOM_ATTRIBUTE, geom);
461  }
462 
463  /// Return true if this element has an include geometry string.
464  bool hasIncludeGeom() const
465  {
466  return hasAttribute(INCLUDE_GEOM_ATTRIBUTE);
467  }
468 
469  /// Return the include geometry string of this element.
470  const string& getIncludeGeom() const
471  {
472  return getAttribute(INCLUDE_GEOM_ATTRIBUTE);
473  }
474 
475  /// Return the active include geometry string of this element, taking all
476  /// geometry string substitutions at this scope into account.
477  string getActiveIncludeGeom() const
478  {
479  return hasIncludeGeom() ?
480  createStringResolver()->resolve(getIncludeGeom(), GEOMNAME_TYPE_STRING) :
481  EMPTY_STRING;
482  }
483 
484  /// @}
485  /// @name Exclude Geometry
486  /// @{
487 
488  /// Set the exclude geometry string of this element.
489  void setExcludeGeom(const string& geom)
490  {
491  setAttribute(EXCLUDE_GEOM_ATTRIBUTE, geom);
492  }
493 
494  /// Return true if this element has an exclude geometry string.
495  bool hasExcludeGeom() const
496  {
497  return hasAttribute(EXCLUDE_GEOM_ATTRIBUTE);
498  }
499 
500  /// Return the exclude geometry string of this element.
501  const string& getExcludeGeom() const
502  {
503  return getAttribute(EXCLUDE_GEOM_ATTRIBUTE);
504  }
505 
506  /// Return the active exclude geometry string of this element, taking all
507  /// geometry string substitutions at this scope into account.
508  string getActiveExcludeGeom() const
509  {
510  return hasExcludeGeom() ?
511  createStringResolver()->resolve(getExcludeGeom(), GEOMNAME_TYPE_STRING) :
512  EMPTY_STRING;
513  }
514 
515  /// @}
516  /// @name Include Collection
517  /// @{
518 
519  /// Set the include collection string of this element.
520  void setIncludeCollectionString(const string& collection)
521  {
522  setAttribute(INCLUDE_COLLECTION_ATTRIBUTE, collection);
523  }
524 
525  /// Return true if this element has an include collection string.
527  {
528  return hasAttribute(INCLUDE_COLLECTION_ATTRIBUTE);
529  }
530 
531  /// Return the include collection string of this element.
532  const string& getIncludeCollectionString() const
533  {
534  return getAttribute(INCLUDE_COLLECTION_ATTRIBUTE);
535  }
536 
537  /// Set the collection that is directly included by this element.
538  void setIncludeCollection(ConstCollectionPtr collection);
539 
540  /// Set the vector of collections that are directly included by
541  /// this element.
542  void setIncludeCollections(const vector<ConstCollectionPtr>& collections);
543 
544  /// Return the vector of collections that are directly included by
545  /// this element.
546  vector<CollectionPtr> getIncludeCollections() const;
547 
548  /// Return true if the include chain for this element contains a cycle.
549  bool hasIncludeCycle() const;
550 
551  /// @}
552  /// @name Geometry Matching
553  /// @{
554 
555  /// Return true if this collection and the given geometry string have any
556  /// geometries in common.
557  /// @throws ExceptionFoundCycle if a cycle is encountered.
558  bool matchesGeomString(const string& geom) const;
559 
560  /// @}
561  /// @name Validation
562  /// @{
563 
564  /// Validate that the given element tree, including all descendants, is
565  /// consistent with the MaterialX specification.
566  bool validate(string* message = nullptr) const override;
567 
568  /// @}
569 
570  public:
571  static const string CATEGORY;
572  static const string INCLUDE_GEOM_ATTRIBUTE;
573  static const string EXCLUDE_GEOM_ATTRIBUTE;
574  static const string INCLUDE_COLLECTION_ATTRIBUTE;
575 };
576 
577 template <class T> GeomPropPtr GeomInfo::setGeomPropValue(const string& name,
578  const T& value,
579  const string& type)
580 {
581  GeomPropPtr geomProp = getChildOfType<GeomProp>(name);
582  if (!geomProp)
583  geomProp = addGeomProp(name);
584  geomProp->setValue(value, type);
585  return geomProp;
586 }
587 
588 /// Given two geometry strings, each containing an array of geom names, return
589 /// true if they have any geometries in common.
590 ///
591 /// An empty geometry string matches no geometries, while the universal geometry
592 /// string "/" matches all non-empty geometries.
593 ///
594 /// If the contains argument is set to true, then we require that a geom path
595 /// in the first string completely contains a geom path in the second string.
596 ///
597 /// @todo Geometry name expressions are not yet supported.
598 MX_CORE_API bool geomStringsMatch(const string& geom1, const string& geom2, bool contains = false);
599 
601 
602 #endif
bool operator!=(const GeomPath &rhs) const
Definition: Geom.h:74
bool hasIncludeCollectionString() const
Return true if this element has an include collection string.
Definition: Geom.h:526
bool hasIncludeGeom() const
Return true if this element has an include geometry string.
Definition: Geom.h:464
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
const string & getIncludeGeom() const
Return the include geometry string of this element.
Definition: Geom.h:470
~GeomPath()
Definition: Geom.h:67
static const string GEOM_PROP_ATTRIBUTE
Definition: Geom.h:438
shared_ptr< Collection > CollectionPtr
A shared pointer to a Collection.
Definition: Geom.h:53
void removeToken(const string &name)
Remove the Token, if any, with the given name.
Definition: Geom.h:305
static const string INCLUDE_COLLECTION_ATTRIBUTE
Definition: Geom.h:574
vector< GeomPropPtr > getGeomProps() const
Return a vector of all GeomProp elements.
Definition: Geom.h:267
static const string CATEGORY
Definition: Geom.h:437
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string GEOM_PATH_SEPARATOR
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:23
vector< string > StringVec
A vector of strings.
Definition: Library.h:57
TokenPtr getToken(const string &name) const
Return the Token, if any, with the given name.
Definition: Geom.h:293
bool isMatching(const GeomPath &rhs, bool contains=false) const
Definition: Geom.h:109
const string & getGeom() const
Return the geometry string of this element.
Definition: Geom.h:179
Definition: Geom.h:60
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string EMPTY_STRING
void setCollectionString(const string &collection)
Set the collection string of this element.
Definition: Geom.h:198
const string & getAttribute(const string &attrib) const
Definition: Element.h:498
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool hasGeom() const
Return true if this element has a geometry string.
Definition: Geom.h:173
const string & getGeomProp() const
Return the geometric property string of this element.
Definition: Geom.h:385
GLuint const GLchar * name
Definition: glcorearb.h:786
shared_ptr< Token > TokenPtr
A shared pointer to a Token.
Definition: Element.h:45
shared_ptr< const GeomProp > ConstGeomPropPtr
A shared pointer to a const GeomProp.
Definition: Geom.h:45
shared_ptr< const GeomPropDef > ConstGeomPropDefPtr
A shared pointer to a const GeomPropDef.
Definition: Geom.h:50
StringResolverPtr createStringResolver(const string &geom=EMPTY_STRING) const
shared_ptr< GeomInfo > GeomInfoPtr
A shared pointer to a GeomInfo.
Definition: Geom.h:38
#define MX_CORE_API
Definition: Export.h:18
TokenPtr addToken(const string &name=EMPTY_STRING)
Definition: Geom.h:287
GeomPropPtr addGeomProp(const string &name=EMPTY_STRING)
Definition: Geom.h:255
shared_ptr< const GeomInfo > ConstGeomInfoPtr
A shared pointer to a const GeomInfo.
Definition: Geom.h:40
MX_CORE_API const string UV_TILE_TOKEN
void removeGeomProp(const string &name)
Remove the GeomProp, if any, with the given name.
Definition: Geom.h:273
GeomPropPtr getGeomProp(const string &name) const
Return the GeomProp, if any, with the given name.
Definition: Geom.h:261
bool hasExcludeGeom() const
Return true if this element has an exclude geometry string.
Definition: Geom.h:495
GeomPath()
Definition: Geom.h:63
TokenPtr setTokenValue(const string &name, const string &value)
Definition: Geom.h:322
GeomInfo(ElementPtr parent, const string &name)
Definition: Geom.h:241
bool hasGeomProp() const
Return true if this element has a geometric property string.
Definition: Geom.h:379
virtual bool validate(string *message=nullptr) const
const string & getIncludeCollectionString() const
Return the include collection string of this element.
Definition: Geom.h:532
static const string CATEGORY
Definition: Geom.h:334
string getActiveGeom() const
Definition: Geom.h:186
GeomElement(ElementPtr parent, const string &category, const string &name)
Definition: Geom.h:155
string getActiveIncludeGeom() const
Definition: Geom.h:477
MX_CORE_API const string GEOMNAME_TYPE_STRING
static const string INCLUDE_GEOM_ATTRIBUTE
Definition: Geom.h:572
virtual ~Collection()
Definition: Geom.h:452
virtual ~GeomElement()
Definition: Geom.h:161
Definition: Geom.h:238
MX_CORE_API const string UNIVERSAL_GEOM_NAME
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
static const string CATEGORY
Definition: Geom.h:349
const string & getSpace() const
Return the geometric space string of this element.
Definition: Geom.h:407
void setIncludeCollectionString(const string &collection)
Set the include collection string of this element.
Definition: Geom.h:520
shared_ptr< GeomPropDef > GeomPropDefPtr
A shared pointer to a GeomPropDef.
Definition: Geom.h:48
void setSpace(const string &space)
Set the geometric space string of this element.
Definition: Geom.h:395
void setIncludeGeom(const string &geom)
Set the include geometry string of this element.
Definition: Geom.h:458
bool operator==(const GeomPath &rhs) const
Definition: Geom.h:69
Collection(ElementPtr parent, const string &name)
Definition: Geom.h:448
GeomPath(const string &geom)
Construct a path from a geometry name string.
Definition: Geom.h:80
void setGeomProp(const string &node)
Set the geometric property string of this element.
Definition: Geom.h:373
GeomProp(ElementPtr parent, const string &name)
Definition: Geom.h:342
virtual ~GeomInfo()
Definition: Geom.h:245
GeomPropPtr setGeomPropValue(const string &name, const T &value, const string &type=EMPTY_STRING)
Definition: Geom.h:577
static const string EXCLUDE_GEOM_ATTRIBUTE
Definition: Geom.h:573
bool isEmpty() const
Definition: Geom.h:132
string getActiveExcludeGeom() const
Definition: Geom.h:508
vector< TokenPtr > getTokens() const
Return a vector of all Token elements.
Definition: Geom.h:299
virtual ~GeomPropDef()
Definition: Geom.h:367
GeomPropDef(ElementPtr parent, const string &name)
Definition: Geom.h:363
void setAttribute(const string &attrib, const string &value)
Set the value string of the given attribute.
const string & getIndex() const
Return the index string of this element.
Definition: Geom.h:429
void setExcludeGeom(const string &geom)
Set the exclude geometry string of this element.
Definition: Geom.h:489
shared_ptr< GeomProp > GeomPropPtr
A shared pointer to a GeomProp.
Definition: Geom.h:43
bool isUniversal() const
Definition: Geom.h:139
shared_ptr< const GeomElement > ConstGeomElementPtr
A shared pointer to a const GeomElement.
Definition: Geom.h:35
bool hasAttribute(const string &attrib) const
Return true if the given attribute is present.
Definition: Element.h:491
static const string COLLECTION_ATTRIBUTE
Definition: Geom.h:233
static const string CATEGORY
Definition: Geom.h:571
GLsizei const GLfloat * value
Definition: glcorearb.h:824
const string & getExcludeGeom() const
Return the exclude geometry string of this element.
Definition: Geom.h:501
const string & getCollectionString() const
Return the collection string of this element.
Definition: Geom.h:210
void setGeom(const string &geom)
Set the geometry string of this element.
Definition: Geom.h:167
shared_ptr< GeomElement > GeomElementPtr
A shared pointer to a GeomElement.
Definition: Geom.h:33
void setIndex(const string &space)
Set the index string of this element.
Definition: Geom.h:417
Definition: core.h:1131
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
Definition: Element.h:30
static const string INDEX_ATTRIBUTE
Definition: Geom.h:440
shared_ptr< const Collection > ConstCollectionPtr
A shared pointer to a const Collection.
Definition: Geom.h:55
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:24
virtual ~GeomProp()
Definition: Geom.h:346
bool hasCollectionString() const
Return true if this element has a collection string.
Definition: Geom.h:204
MX_CORE_API bool geomStringsMatch(const string &geom1, const string &geom2, bool contains=false)
type
Definition: core.h:1059
bool hasSpace() const
Return true if this element has a geometric space string.
Definition: Geom.h:401
MX_CORE_API const string UDIM_TOKEN
static const string SPACE_ATTRIBUTE
Definition: Geom.h:439
bool OIIO_UTIL_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
bool hasIndex() const
Return true if this element has an index string.
Definition: Geom.h:423
MX_CORE_API const string UDIM_SET_PROPERTY
static const string GEOM_ATTRIBUTE
Definition: Geom.h:232
MX_CORE_API StringVec splitString(const string &str, const string &sep)
Definition: Geom.h:339