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