HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
imageable.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USDGEOM_GENERATED_IMAGEABLE_H
8 #define USDGEOM_GENERATED_IMAGEABLE_H
9 
10 /// \file usdGeom/imageable.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usdGeom/api.h"
14 #include "pxr/usd/usd/typed.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 #include "pxr/usd/usdGeom/tokens.h"
18 
19 #include "pxr/base/gf/bbox3d.h"
20 #include "pxr/usd/usdGeom/primvar.h"
21 
22 #include "pxr/base/vt/value.h"
23 
24 #include "pxr/base/gf/vec3d.h"
25 #include "pxr/base/gf/vec3f.h"
26 #include "pxr/base/gf/matrix4d.h"
27 
28 #include "pxr/base/tf/token.h"
29 #include "pxr/base/tf/type.h"
30 
32 
33 class SdfAssetPath;
34 
35 // -------------------------------------------------------------------------- //
36 // IMAGEABLE //
37 // -------------------------------------------------------------------------- //
38 
39 /// \class UsdGeomImageable
40 ///
41 /// Base class for all prims that may require rendering or
42 /// visualization of some sort. The primary attributes of Imageable
43 /// are \em visibility and \em purpose, which each provide instructions for
44 /// what geometry should be included for processing by rendering and other
45 /// computations.
46 ///
47 /// \deprecated Imageable also provides API for accessing primvars, which
48 /// has been moved to the UsdGeomPrimvarsAPI schema, because primvars can now
49 /// be applied on non-Imageable prim types. This API is planned
50 /// to be removed, UsdGeomPrimvarsAPI should be used directly instead.
51 ///
52 /// For any described attribute \em Fallback \em Value or \em Allowed \em Values below
53 /// that are text/tokens, the actual token is published and defined in \ref UsdGeomTokens.
54 /// So to set an attribute to the value "rightHanded", use UsdGeomTokens->rightHanded
55 /// as the value.
56 ///
57 class UsdGeomImageable : public UsdTyped
58 {
59 public:
60  /// Compile time constant representing what kind of schema this class is.
61  ///
62  /// \sa UsdSchemaKind
64 
65  /// Construct a UsdGeomImageable on UsdPrim \p prim .
66  /// Equivalent to UsdGeomImageable::Get(prim.GetStage(), prim.GetPath())
67  /// for a \em valid \p prim, but will not immediately throw an error for
68  /// an invalid \p prim
69  explicit UsdGeomImageable(const UsdPrim& prim=UsdPrim())
70  : UsdTyped(prim)
71  {
72  }
73 
74  /// Construct a UsdGeomImageable on the prim held by \p schemaObj .
75  /// Should be preferred over UsdGeomImageable(schemaObj.GetPrim()),
76  /// as it preserves SchemaBase state.
77  explicit UsdGeomImageable(const UsdSchemaBase& schemaObj)
78  : UsdTyped(schemaObj)
79  {
80  }
81 
82  /// Destructor.
84  virtual ~UsdGeomImageable();
85 
86  /// Return a vector of names of all pre-declared attributes for this schema
87  /// class and all its ancestor classes. Does not include attributes that
88  /// may be authored by custom/extended methods of the schemas involved.
90  static const TfTokenVector &
91  GetSchemaAttributeNames(bool includeInherited=true);
92 
93  /// Return a UsdGeomImageable holding the prim adhering to this
94  /// schema at \p path on \p stage. If no prim exists at \p path on
95  /// \p stage, or if the prim at that path does not adhere to this schema,
96  /// return an invalid schema object. This is shorthand for the following:
97  ///
98  /// \code
99  /// UsdGeomImageable(stage->GetPrimAtPath(path));
100  /// \endcode
101  ///
103  static UsdGeomImageable
104  Get(const UsdStagePtr &stage, const SdfPath &path);
105 
106 
107 protected:
108  /// Returns the kind of schema this class belongs to.
109  ///
110  /// \sa UsdSchemaKind
112  UsdSchemaKind _GetSchemaKind() const override;
113 
114 private:
115  // needs to invoke _GetStaticTfType.
116  friend class UsdSchemaRegistry;
118  static const TfType &_GetStaticTfType();
119 
120  static bool _IsTypedSchema();
121 
122  // override SchemaBase virtuals.
124  const TfType &_GetTfType() const override;
125 
126 public:
127  // --------------------------------------------------------------------- //
128  // VISIBILITY
129  // --------------------------------------------------------------------- //
130  /// Visibility is meant to be the simplest form of "pruning"
131  /// visibility that is supported by most DCC apps. Visibility is
132  /// animatable, allowing a sub-tree of geometry to be present for some
133  /// segment of a shot, and absent from others; unlike the action of
134  /// deactivating geometry prims, invisible geometry is still
135  /// available for inspection, for positioning, for defining volumes, etc.
136  ///
137  /// | ||
138  /// | -- | -- |
139  /// | Declaration | `token visibility = "inherited"` |
140  /// | C++ Type | TfToken |
141  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
142  /// | \ref UsdGeomTokens "Allowed Values" | inherited, invisible |
145 
146  /// See GetVisibilityAttr(), and also
147  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
148  /// If specified, author \p defaultValue as the attribute's default,
149  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
150  /// the default for \p writeSparsely is \c false.
152  UsdAttribute CreateVisibilityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
153 
154 public:
155  // --------------------------------------------------------------------- //
156  // PURPOSE
157  // --------------------------------------------------------------------- //
158  /// Purpose is a classification of geometry into categories that
159  /// can each be independently included or excluded from traversals of prims
160  /// on a stage, such as rendering or bounding-box computation traversals.
161  ///
162  /// See \ref UsdGeom_ImageablePurpose for more detail about how
163  /// \em purpose is computed and used.
164  ///
165  /// | ||
166  /// | -- | -- |
167  /// | Declaration | `uniform token purpose = "default"` |
168  /// | C++ Type | TfToken |
169  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
170  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
171  /// | \ref UsdGeomTokens "Allowed Values" | default, render, proxy, guide |
174 
175  /// See GetPurposeAttr(), and also
176  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
177  /// If specified, author \p defaultValue as the attribute's default,
178  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
179  /// the default for \p writeSparsely is \c false.
181  UsdAttribute CreatePurposeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
182 
183 public:
184  // --------------------------------------------------------------------- //
185  // PROXYPRIM
186  // --------------------------------------------------------------------- //
187  /// The \em proxyPrim relationship allows us to link a
188  /// prim whose \em purpose is "render" to its (single target)
189  /// purpose="proxy" prim. This is entirely optional, but can be
190  /// useful in several scenarios:
191  ///
192  /// \li In a pipeline that does pruning (for complexity management)
193  /// by deactivating prims composed from asset references, when we
194  /// deactivate a purpose="render" prim, we will be able to discover
195  /// and additionally deactivate its associated purpose="proxy" prim,
196  /// so that preview renders reflect the pruning accurately.
197  ///
198  /// \li DCC importers may be able to make more aggressive optimizations
199  /// for interactive processing and display if they can discover the proxy
200  /// for a given render prim.
201  ///
202  /// \li With a little more work, a Hydra-based application will be able
203  /// to map a picked proxy prim back to its render geometry for selection.
204  ///
205  /// \note It is only valid to author the proxyPrim relationship on
206  /// prims whose purpose is "render".
207  ///
210 
211  /// See GetProxyPrimRel(), and also
212  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
215 
216 public:
217  // ===================================================================== //
218  // Feel free to add custom code below this line, it will be preserved by
219  // the code generator.
220  //
221  // Just remember to:
222  // - Close the class declaration with };
223  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
224  // - Close the include guard with #endif
225  // ===================================================================== //
226  // --(BEGIN CUSTOM CODE)--
227 
228  /// Returns an ordered list of allowed values of the purpose attribute.
229  ///
230  /// The ordering is important because it defines the protocol between
231  /// UsdGeomModelAPI and UsdGeomBBoxCache for caching and retrieving extents
232  /// hints by purpose.
233  ///
234  /// The order is: [default, render, proxy, guide]
235  ///
236  /// See \sa UsdGeomModelAPI::GetExtentsHint().
237  ///
238  /// \sa GetOrderedPurposeTokens()
240  static const TfTokenVector &GetOrderedPurposeTokens();
241 
242  // --------------------------------------------------------------------- //
243  /// \name Visibility Authoring Helpers
244  /// \anchor usdGeom_Visibility_Authoring_Helpers
245  /// Convenience API for making an imageable visible or invisible.
246  /// @{
247  // --------------------------------------------------------------------- //
248 
249  /// Make the imageable visible if it is invisible at the given time.
250  ///
251  /// Since visibility is pruning, this may need to override some
252  /// ancestor's visibility and all-but-one of the ancestor's children's
253  /// visibility, for all the ancestors of this prim up to the highest
254  /// ancestor that is explicitly invisible, to preserve the visibility state.
255  ///
256  /// If MakeVisible() (or MakeInvisible()) is going to be applied to all
257  /// the prims on a stage, ancestors must be processed prior to descendants
258  /// to get the correct behavior.
259  ///
260  /// \note When visibility is animated, this only works when it is
261  /// invoked sequentially at increasing time samples. If visibility is
262  /// already authored and animated in the scene, calling MakeVisible() at
263  /// an arbitrary (in-between) frame isn't guaranteed to work.
264  ///
265  /// \note This will only work properly if all ancestor prims of the
266  /// imageable are <b>defined</b>, as the imageable schema is only valid on
267  /// defined prims.
268  ///
269  /// \note Be sure to set the edit target to the layer containing the
270  /// strongest visibility opinion or to a stronger layer.
271  ///
272  /// \sa MakeInvisible()
273  /// \sa ComputeVisibility()
274  ///
276  void MakeVisible(const UsdTimeCode &time=UsdTimeCode::Default()) const;
277 
278  /// Makes the imageable invisible if it is visible at the given time.
279  ///
280  /// \note When visibility is animated, this only works when it is
281  /// invoked sequentially at increasing time samples. If visibility is
282  /// already authored and animated in the scene, calling MakeVisible() at
283  /// an arbitrary (in-between) frame isn't guaranteed to work.
284  ///
285  /// \note Be sure to set the edit target to the layer containing the
286  /// strongest visibility opinion or to a stronger layer.
287  ///
288  /// \sa MakeVisible()
289  /// \sa ComputeVisibility()
290  ///
292  void MakeInvisible(const UsdTimeCode &time=UsdTimeCode::Default()) const;
293 
294  ///@}
295 
296  // --------------------------------------------------------------------- //
297  /// \name Computed Attribute Helpers
298  /// \anchor usdGeom_Computed_Attribute_Helpers
299  /// Visbility, Purpose, Bounds (World, Local, and Untransformed), and
300  /// Transform (LocalToWorld and ParentToWorld) are all qualities of a
301  /// prim's location in namespace that require non-local data and
302  /// computation. Computing these efficiently requires a stage-level
303  /// cache, but when performance is not a concern, it is convenient to
304  /// query these quantities directly on a prim, so we provide convenience
305  /// API here for doing so.
306  /// @{
307  // --------------------------------------------------------------------- //
308 
309  /// Calculate the effective visibility of this prim, as defined by its
310  /// most ancestral authored "invisible" opinion, if any.
311  ///
312  /// A prim is considered visible at the current \p time if none of its
313  /// Imageable ancestors express an authored "invisible" opinion, which is
314  /// what leads to the "simple pruning" behavior described in
315  /// GetVisibilityAttr().
316  ///
317  /// This function should be considered a reference implementation for
318  /// correctness. <b>If called on each prim in the context of a traversal
319  /// we will perform massive overcomputation, because sibling prims share
320  /// sub-problems in the query that can be efficiently cached, but are not
321  /// (cannot be) by this simple implementation.</b> If you have control of
322  /// your traversal, it will be far more efficient to manage visibility
323  /// on a stack as you traverse.
324  ///
325  /// \sa GetVisibilityAttr()
328 
329  /// Return the attribute that is used for expressing visibility opinions
330  /// for the given \p purpose.
331  ///
332  /// For "default" purpose, return the overall *visibility* attribute.
333  /// For "guide", "proxy", or "render" purpose, return *guideVisibility*,
334  /// *proxyVisibility*, or *renderVisibility* if UsdGeomVisibilityAPI is
335  /// applied to the prim. If UsdGeomvVisibiltyAPI is not applied, an
336  /// empty attribute is returned for purposes other than default.
337  ///
338  /// \sa UsdGeomVisibilityAPI::Apply
339  /// \sa UsdGeomVisibilityAPI::GetPurposeVisibilityAttr
342  const TfToken &purpose = UsdGeomTokens->default_) const;
343 
344  /// Calculate the effective purpose visibility of this prim for the
345  /// given \p purpose, taking into account opinions for the corresponding
346  /// purpose attribute, along with overall visibility opinions.
347  ///
348  /// If ComputeVisibility() returns "invisible", then
349  /// ComputeEffectiveVisibility() is "invisible" for all purpose
350  /// values. Otherwise, ComputeEffectiveVisibility() returns the value of
351  /// the nearest ancestral authored opinion for the corresponding purpose
352  /// visibility attribute, as retured by
353  /// GetPurposeVisibilityAttr(purpose).
354  ///
355  /// Note that the value returned here can be "invisible" (indicating the
356  /// prim is invisible for the given purpose), "visible" (indicating that
357  /// it's visible), or "inherited" (indicating that the purpose visibility
358  /// is context-dependent and the fallback behavior must be determined by
359  /// the caller.
360  ///
361  /// This function should be considered a reference implementation for
362  /// correctness. <b>If called on each prim in the context of a traversal
363  /// we will perform massive overcomputation, because sibling prims share
364  /// sub-problems in the query that can be efficiently cached, but are not
365  /// (cannot be) by this simple implementation.</b> If you have control of
366  /// your traversal, it will be far more efficient to manage visibility
367  /// on a stack as you traverse.
368  ///
369  /// \sa UsdGeomVisibilityAPI
370  /// \sa GetPurposeVisibilityAttr()
371  /// \sa ComputeVisibility()
374  const TfToken &purpose = UsdGeomTokens->default_,
375  const UsdTimeCode &time = UsdTimeCode::Default()) const;
376 
377  /// Value type containing information about a prim's computed effective
378  /// purpose as well as storing whether the prim's purpose value can be
379  /// inherited by namespace children if necessary. This provides the purpose
380  /// information necessary for efficiently computing and caching the purposes
381  /// of a hierarchy of prims.
382  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
383  struct PurposeInfo {
384  constexpr PurposeInfo() = default;
385 
386  PurposeInfo(const TfToken &purpose_, bool isInheritable_) :
387  purpose(purpose_), isInheritable(isInheritable_) {}
388 
389  /// The computed purpose. An empty purpose indicates that this
390  /// represents a purpose that hasn't been computed yet.
392 
393  /// Whether this purpose should be inherited by namespace children
394  /// that do not have their own authored purpose value.
395  bool isInheritable = false;
396 
397  /// Returns true if this represents a purpose that has been computed.
398  explicit operator bool() const { return !purpose.IsEmpty(); }
399 
400  bool operator==(const PurposeInfo &rhs) {
401  return purpose == rhs.purpose && isInheritable == rhs.isInheritable;
402  }
403 
404  bool operator!=(const PurposeInfo &rhs) {
405  return !(*this == rhs);
406  }
407 
408  /// Returns the purpose if it's inheritable, returns empty if it is not.
410  static const TfToken empty;
411  return isInheritable ? purpose : empty;
412  }
413  };
414 
415  /// Calculate the effective purpose information about this prim which
416  /// includes final computed purpose value of the prim as well as whether
417  /// the purpose value should be inherited by namespace children without
418  /// their own purpose opinions.
419  ///
420  /// This function should be considered a reference implementation for
421  /// correctness. <b>If called on each prim in the context of a traversal
422  /// we will perform massive overcomputation, because sibling prims share
423  /// sub-problems in the query that can be efficiently cached, but are not
424  /// (cannot be) by this simple implementation.</b> If you have control of
425  /// your traversal, it will be far more efficient to manage purpose, along
426  /// with visibility, on a stack as you traverse.
427  ///
428  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
430  PurposeInfo ComputePurposeInfo() const;
431 
432  /// \overload
433  /// Calculates the effective purpose information about this prim, given the
434  /// computed purpose information of its parent prim. This can be much more
435  /// efficient than using CommputePurposeInfo() when PurposeInfo values are
436  /// properly computed and cached for a hierarchy of prims using this
437  /// function.
438  ///
439  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
441  PurposeInfo ComputePurposeInfo(const PurposeInfo &parentPurposeInfo) const;
442 
443  /// Calculate the effective purpose information about this prim. This is
444  /// equivalent to extracting the purpose from the value returned by
445  /// ComputePurposeInfo().
446  ///
447  /// This function should be considered a reference implementation for
448  /// correctness. <b>If called on each prim in the context of a traversal
449  /// we will perform massive overcomputation, because sibling prims share
450  /// sub-problems in the query that can be efficiently cached, but are not
451  /// (cannot be) by this simple implementation.</b> If you have control of
452  /// your traversal, it will be far more efficient to manage purpose, along
453  /// with visibility, on a stack as you traverse.
454  ///
455  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
457  TfToken ComputePurpose() const;
458 
459  /// Find the prim whose purpose is \em proxy that serves as the proxy
460  /// for this prim, as established by the GetProxyPrimRel(), or an
461  /// invalid UsdPrim if this prim has no proxy.
462  ///
463  /// This method will find the proxy for \em any prim whose computed
464  /// purpose (see ComputePurpose()) is \em render. If provided and a proxy
465  /// was found, we will set *renderPrim to the root of the \em render
466  /// subtree upon which the renderProxy relationship was authored.
467  ///
468  /// If the renderProxy relationship has more than one target, we will
469  /// issue a warning and return an invalid UsdPrim. If the targeted prim
470  /// does not have a resolved purpose of \em proxy, we will warn and
471  /// return an invalid prim.
472  ///
473  /// This function should be considered a reference implementation for
474  /// correctness. <b>If called on each prim in the context of a traversal
475  /// we will perform massive overcomputation, because sibling prims share
476  /// sub-problems in the query that can be efficiently cached, but are not
477  /// (cannot be) by this simple implementation.</b> If you have control of
478  /// your traversal, it will be far more efficient to compute proxy-prims
479  /// on a stack as you traverse.
480  ///
481  /// \note Currently the returned prim will not contain any instancing
482  /// context if it is inside a prototype - its path will be relative to the
483  /// prototype's root. Once UsdPrim is instancing-aware in the core, we can
484  /// change this method to return a context-aware result.
485  ///
486  /// \sa SetProxyPrim(), GetProxyPrimRel()
488  UsdPrim ComputeProxyPrim(UsdPrim *renderPrim=NULL) const;
489 
490  /// Convenience function for authoring the \em renderProxy rel on this
491  /// prim to target the given \p proxy prim.
492  ///
493  /// To facilitate authoring on sparse or unloaded stages, we do not
494  /// perform any validation of this prim's purpose or the type or
495  /// purpose of the specified prim.
496  ///
497  /// \sa ComputeProxyPrim(), GetProxyPrimRel()
499  bool SetProxyPrim(const UsdPrim &proxy) const;
500 
501  /// \overload that takes any UsdSchemaBase-derived object
503  bool SetProxyPrim(const UsdSchemaBase &proxy) const;
504 
505  /// Compute the bound of this prim in world space, at the specified
506  /// \p time, and for the specified purposes.
507  ///
508  /// The bound of the prim is computed, including the transform (if any)
509  /// authored on the node itself, and then transformed to world space.
510  ///
511  /// It is an error to not specify any purposes, which will result in the
512  /// return of an empty box.
513  ///
514  /// <b>If you need to compute bounds for multiple prims on a stage, it
515  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
516  /// and query it directly; doing so will reuse sub-computations shared
517  /// by the prims.</b>
520  TfToken const &purpose1=TfToken(),
521  TfToken const &purpose2=TfToken(),
522  TfToken const &purpose3=TfToken(),
523  TfToken const &purpose4=TfToken()) const;
524 
525 
526  /// Compute the bound of this prim in local space, at the specified
527  /// \p time, and for the specified purposes.
528  ///
529  /// The bound of the prim is computed, including the transform (if any)
530  /// authored on the node itself.
531  ///
532  /// It is an error to not specify any purposes, which will result in the
533  /// return of an empty box.
534  ///
535  /// <b>If you need to compute bounds for multiple prims on a stage, it
536  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
537  /// and query it directly; doing so will reuse sub-computations shared
538  /// by the prims.</b>
541  TfToken const &purpose1=TfToken(),
542  TfToken const &purpose2=TfToken(),
543  TfToken const &purpose3=TfToken(),
544  TfToken const &purpose4=TfToken()) const;
545 
546  /// Compute the untransformed bound of this prim, at the specified
547  /// \p time, and for the specified purposes.
548  ///
549  /// The bound of the prim is computed in its object space, ignoring
550  /// any transforms authored on or above the prim.
551  ///
552  /// It is an error to not specify any purposes, which will result in the
553  /// return of an empty box.
554  ///
555  /// <b>If you need to compute bounds for multiple prims on a stage, it
556  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
557  /// and query it directly; doing so will reuse sub-computations shared
558  /// by the prims.</b>
561  TfToken const &purpose1=TfToken(),
562  TfToken const &purpose2=TfToken(),
563  TfToken const &purpose3=TfToken(),
564  TfToken const &purpose4=TfToken()) const;
565 
566  /// Compute the transformation matrix for this prim at the given time,
567  /// including the transform authored on the Prim itself, if present.
568  ///
569  /// <b>If you need to compute the transform for multiple prims on a
570  /// stage, it will be much, much more efficient to instantiate a
571  /// UsdGeomXformCache and query it directly; doing so will reuse
572  /// sub-computations shared by the prims.</b>
575 
576  /// Compute the transformation matrix for this prim at the given time,
577  /// \em NOT including the transform authored on the prim itself.
578  ///
579  /// <b>If you need to compute the transform for multiple prims on a
580  /// stage, it will be much, much more efficient to instantiate a
581  /// UsdGeomXformCache and query it directly; doing so will reuse
582  /// sub-computations shared by the prims.</b>
585 
586  /// @}
587 
588 };
589 
591 
592 #endif
USDGEOM_API GfBBox3d ComputeWorldBound(UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
virtual USDGEOM_API ~UsdGeomImageable()
Destructor.
USDGEOM_API bool SetProxyPrim(const UsdPrim &proxy) const
static constexpr UsdTimeCode Default()
Definition: timeCode.h:113
GT_API const UT_StringHolder time
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
USDGEOM_API UsdAttribute GetVisibilityAttr() const
USDGEOM_API UsdRelationship GetProxyPrimRel() const
USDGEOM_API TfToken ComputePurpose() const
USDGEOM_API UsdPrim ComputeProxyPrim(UsdPrim *renderPrim=NULL) const
USDGEOM_API UsdAttribute CreateVisibilityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API GfBBox3d ComputeUntransformedBound(UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
OutGridT const XformOp bool bool
UsdGeomImageable(const UsdPrim &prim=UsdPrim())
Definition: imageable.h:69
USDGEOM_API UsdRelationship CreateProxyPrimRel() const
bool operator!=(const PurposeInfo &rhs)
Definition: imageable.h:404
Definition: token.h:70
USDGEOM_API UsdAttribute GetPurposeAttr() const
Represents a non-concrete typed schema.
USDGEOM_API UsdAttribute GetPurposeVisibilityAttr(const TfToken &purpose=UsdGeomTokens->default_) const
USDGEOM_API TfToken ComputeVisibility(UsdTimeCode const &time=UsdTimeCode::Default()) const
static USDGEOM_API UsdGeomImageable Get(const UsdStagePtr &stage, const SdfPath &path)
static const UsdSchemaKind schemaKind
Definition: imageable.h:63
Definition: prim.h:116
Definition: typed.h:44
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
constexpr PurposeInfo()=default
Definition: path.h:273
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
bool operator==(const PurposeInfo &rhs)
Definition: imageable.h:400
UsdSchemaKind
Definition: common.h:112
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
USDGEOM_API PurposeInfo ComputePurposeInfo() const
const TfToken & GetInheritablePurpose() const
Returns the purpose if it's inheritable, returns empty if it is not.
Definition: imageable.h:409
PurposeInfo(const TfToken &purpose_, bool isInheritable_)
Definition: imageable.h:386
USDGEOM_API TfStaticData< UsdGeomTokensType > UsdGeomTokens
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
USDGEOM_API void MakeInvisible(const UsdTimeCode &time=UsdTimeCode::Default()) const
UsdGeomImageable(const UsdSchemaBase &schemaObj)
Definition: imageable.h:77
USDGEOM_API GfBBox3d ComputeLocalBound(UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
USDGEOM_API GfMatrix4d ComputeParentToWorldTransform(UsdTimeCode const &time) const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
static USDGEOM_API const TfTokenVector & GetOrderedPurposeTokens()
#define USDGEOM_API
Definition: api.h:23
Definition: value.h:146
USDGEOM_API TfToken ComputeEffectiveVisibility(const TfToken &purpose=UsdGeomTokens->default_, const UsdTimeCode &time=UsdTimeCode::Default()) const
USDGEOM_API UsdAttribute CreatePurposeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
bool IsEmpty() const
Returns true iff this token contains the empty string "".
Definition: token.h:288
USDGEOM_API void MakeVisible(const UsdTimeCode &time=UsdTimeCode::Default()) const
USDGEOM_API GfMatrix4d ComputeLocalToWorldTransform(UsdTimeCode const &time) const