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 
246  // --------------------------------------------------------------------- //
247  /// \name Primvar Creation and Introspection
248  /// @{
249  // --------------------------------------------------------------------- //
250 
251  /// \deprecated Please use UsdGeomPrimvarsAPI::CreatePrimvar() instead.
253  UsdGeomPrimvar CreatePrimvar(const TfToken& attrName,
254  const SdfValueTypeName &typeName,
255  const TfToken& interpolation = TfToken(),
256  int elementSize = -1) const;
257 
258  /// \deprecated Please use UsdGeomPrimvarsAPI::GetPrimvar() instead.
260  UsdGeomPrimvar GetPrimvar(const TfToken &name) const;
261 
262  /// \deprecated Please use UsdGeomPrimvarsAPI::GetPrimvars() instead.
264  std::vector<UsdGeomPrimvar> GetPrimvars() const;
265 
266  /// \deprecated Please use UsdGeomPrimvarsAPI::GetAuthoredPrimvars() instead.
268  std::vector<UsdGeomPrimvar> GetAuthoredPrimvars() const;
269 
270  /// \deprecated Please use UsdGeomPrimvarsAPI::HasPrimvar() instead.
272  bool HasPrimvar(const TfToken &name) const;
273 
274 
275  /// Returns an ordered list of allowed values of the purpose attribute.
276  ///
277  /// The ordering is important because it defines the protocol between
278  /// UsdGeomModelAPI and UsdGeomBBoxCache for caching and retrieving extents
279  /// hints by purpose.
280  ///
281  /// The order is: [default, render, proxy, guide]
282  ///
283  /// See \sa UsdGeomModelAPI::GetExtentsHint().
284  ///
285  /// \sa GetOrderedPurposeTokens()
287  static const TfTokenVector &GetOrderedPurposeTokens();
288 
289  // --------------------------------------------------------------------- //
290  /// \name Visibility Authoring Helpers
291  /// \anchor usdGeom_Visibility_Authoring_Helpers
292  /// Convenience API for making an imageable visible or invisible.
293  /// @{
294  // --------------------------------------------------------------------- //
295 
296  /// Make the imageable visible if it is invisible at the given time.
297  ///
298  /// Since visibility is pruning, this may need to override some
299  /// ancestor's visibility and all-but-one of the ancestor's children's
300  /// visibility, for all the ancestors of this prim up to the highest
301  /// ancestor that is explicitly invisible, to preserve the visibility state.
302  ///
303  /// If MakeVisible() (or MakeInvisible()) is going to be applied to all
304  /// the prims on a stage, ancestors must be processed prior to descendants
305  /// to get the correct behavior.
306  ///
307  /// \note When visibility is animated, this only works when it is
308  /// invoked sequentially at increasing time samples. If visibility is
309  /// already authored and animated in the scene, calling MakeVisible() at
310  /// an arbitrary (in-between) frame isn't guaranteed to work.
311  ///
312  /// \note This will only work properly if all ancestor prims of the
313  /// imageable are <b>defined</b>, as the imageable schema is only valid on
314  /// defined prims.
315  ///
316  /// \note Be sure to set the edit target to the layer containing the
317  /// strongest visibility opinion or to a stronger layer.
318  ///
319  /// \sa MakeInvisible()
320  /// \sa ComputeVisibility()
321  ///
323  void MakeVisible(const UsdTimeCode &time=UsdTimeCode::Default()) const;
324 
325  /// Makes the imageable invisible if it is visible at the given time.
326  ///
327  /// \note When visibility is animated, this only works when it is
328  /// invoked sequentially at increasing time samples. If visibility is
329  /// already authored and animated in the scene, calling MakeVisible() at
330  /// an arbitrary (in-between) frame isn't guaranteed to work.
331  ///
332  /// \note Be sure to set the edit target to the layer containing the
333  /// strongest visibility opinion or to a stronger layer.
334  ///
335  /// \sa MakeVisible()
336  /// \sa ComputeVisibility()
337  ///
339  void MakeInvisible(const UsdTimeCode &time=UsdTimeCode::Default()) const;
340 
341  ///@}
342 
343  // --------------------------------------------------------------------- //
344  /// \name Computed Attribute Helpers
345  /// \anchor usdGeom_Computed_Attribute_Helpers
346  /// Visbility, Purpose, Bounds (World, Local, and Untransformed), and
347  /// Transform (LocalToWorld and ParentToWorld) are all qualities of a
348  /// prim's location in namespace that require non-local data and
349  /// computation. Computing these efficiently requires a stage-level
350  /// cache, but when performance is not a concern, it is convenient to
351  /// query these quantities directly on a prim, so we provide convenience
352  /// API here for doing so.
353  /// @{
354  // --------------------------------------------------------------------- //
355 
356  /// Calculate the effective visibility of this prim, as defined by its
357  /// most ancestral authored "invisible" opinion, if any.
358  ///
359  /// A prim is considered visible at the current \p time if none of its
360  /// Imageable ancestors express an authored "invisible" opinion, which is
361  /// what leads to the "simple pruning" behavior described in
362  /// GetVisibilityAttr().
363  ///
364  /// This function should be considered a reference implementation for
365  /// correctness. <b>If called on each prim in the context of a traversal
366  /// we will perform massive overcomputation, because sibling prims share
367  /// sub-problems in the query that can be efficiently cached, but are not
368  /// (cannot be) by this simple implementation.</b> If you have control of
369  /// your traversal, it will be far more efficient to manage visibility
370  /// on a stack as you traverse.
371  ///
372  /// \sa GetVisibilityAttr()
375 
376  /// \overload
377  /// Calculates the effective visibility of this prim, given the computed
378  /// visibility of its parent prim at the given \p time.
379  ///
380  /// \sa GetVisibilityAttr()
382  TfToken ComputeVisibility(const TfToken &parentVisibility,
383  UsdTimeCode const &time = UsdTimeCode::Default()) const;
384 
385  /// Value type containing information about a prim's computed effective
386  /// purpose as well as storing whether the prim's purpose value can be
387  /// inherited by namespace children if necessary. This provides the purpose
388  /// information necessary for efficiently computing and caching the purposes
389  /// of a hierarchy of prims.
390  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
391  struct PurposeInfo {
392  constexpr PurposeInfo() = default;
393 
394  PurposeInfo(const TfToken &purpose_, bool isInheritable_) :
395  purpose(purpose_), isInheritable(isInheritable_) {}
396 
397  /// The computed purpose. An empty purpose indicates that this
398  /// represents a purpose that hasn't been computed yet.
400 
401  /// Whether this purpose should be inherited by namespace children
402  /// that do not have their own authored purpose value.
403  bool isInheritable = false;
404 
405  /// Returns true if this represents a purpose that has been computed.
406  explicit operator bool() const { return !purpose.IsEmpty(); }
407 
408  bool operator==(const PurposeInfo &rhs) {
409  return purpose == rhs.purpose && isInheritable == rhs.isInheritable;
410  }
411 
412  bool operator!=(const PurposeInfo &rhs) {
413  return !(*this == rhs);
414  }
415 
416  /// Returns the purpose if it's inheritable, returns empty if it is not.
418  static const TfToken empty;
419  return isInheritable ? purpose : empty;
420  }
421  };
422 
423  /// Calculate the effective purpose information about this prim which
424  /// includes final computed purpose value of the prim as well as whether
425  /// the purpose value should be inherited by namespace children without
426  /// their own purpose opinions.
427  ///
428  /// This function should be considered a reference implementation for
429  /// correctness. <b>If called on each prim in the context of a traversal
430  /// we will perform massive overcomputation, because sibling prims share
431  /// sub-problems in the query that can be efficiently cached, but are not
432  /// (cannot be) by this simple implementation.</b> If you have control of
433  /// your traversal, it will be far more efficient to manage purpose, along
434  /// with visibility, on a stack as you traverse.
435  ///
436  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
438  PurposeInfo ComputePurposeInfo() const;
439 
440  /// \overload
441  /// Calculates the effective purpose information about this prim, given the
442  /// computed purpose information of its parent prim. This can be much more
443  /// efficient than using CommputePurposeInfo() when PurposeInfo values are
444  /// properly computed and cached for a hierarchy of prims using this
445  /// function.
446  ///
447  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
449  PurposeInfo ComputePurposeInfo(const PurposeInfo &parentPurposeInfo) const;
450 
451  /// Calculate the effective purpose information about this prim. This is
452  /// equivalent to extracting the purpose from the value returned by
453  /// ComputePurposeInfo().
454  ///
455  /// This function should be considered a reference implementation for
456  /// correctness. <b>If called on each prim in the context of a traversal
457  /// we will perform massive overcomputation, because sibling prims share
458  /// sub-problems in the query that can be efficiently cached, but are not
459  /// (cannot be) by this simple implementation.</b> If you have control of
460  /// your traversal, it will be far more efficient to manage purpose, along
461  /// with visibility, on a stack as you traverse.
462  ///
463  /// \sa GetPurposeAttr(), \ref UsdGeom_ImageablePurpose
465  TfToken ComputePurpose() const;
466 
467  /// Find the prim whose purpose is \em proxy that serves as the proxy
468  /// for this prim, as established by the GetProxyPrimRel(), or an
469  /// invalid UsdPrim if this prim has no proxy.
470  ///
471  /// This method will find the proxy for \em any prim whose computed
472  /// purpose (see ComputePurpose()) is \em render. If provided and a proxy
473  /// was found, we will set *renderPrim to the root of the \em render
474  /// subtree upon which the renderProxy relationship was authored.
475  ///
476  /// If the renderProxy relationship has more than one target, we will
477  /// issue a warning and return an invalid UsdPrim. If the targeted prim
478  /// does not have a resolved purpose of \em proxy, we will warn and
479  /// return an invalid prim.
480  ///
481  /// This function should be considered a reference implementation for
482  /// correctness. <b>If called on each prim in the context of a traversal
483  /// we will perform massive overcomputation, because sibling prims share
484  /// sub-problems in the query that can be efficiently cached, but are not
485  /// (cannot be) by this simple implementation.</b> If you have control of
486  /// your traversal, it will be far more efficient to compute proxy-prims
487  /// on a stack as you traverse.
488  ///
489  /// \note Currently the returned prim will not contain any instancing
490  /// context if it is inside a prototype - its path will be relative to the
491  /// prototype's root. Once UsdPrim is instancing-aware in the core, we can
492  /// change this method to return a context-aware result.
493  ///
494  /// \sa SetProxyPrim(), GetProxyPrimRel()
496  UsdPrim ComputeProxyPrim(UsdPrim *renderPrim=NULL) const;
497 
498  /// Convenience function for authoring the \em renderProxy rel on this
499  /// prim to target the given \p proxy prim.
500  ///
501  /// To facilitate authoring on sparse or unloaded stages, we do not
502  /// perform any validation of this prim's purpose or the type or
503  /// purpose of the specified prim.
504  ///
505  /// \sa ComputeProxyPrim(), GetProxyPrimRel()
507  bool SetProxyPrim(const UsdPrim &proxy) const;
508 
509  /// \overload that takes any UsdSchemaBase-derived object
511  bool SetProxyPrim(const UsdSchemaBase &proxy) const;
512 
513  /// Compute the bound of this prim in world space, at the specified
514  /// \p time, and for the specified purposes.
515  ///
516  /// The bound of the prim is computed, including the transform (if any)
517  /// authored on the node itself, and then transformed to world space.
518  ///
519  /// It is an error to not specify any purposes, which will result in the
520  /// return of an empty box.
521  ///
522  /// <b>If you need to compute bounds for multiple prims on a stage, it
523  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
524  /// and query it directly; doing so will reuse sub-computations shared
525  /// by the prims.</b>
528  TfToken const &purpose1=TfToken(),
529  TfToken const &purpose2=TfToken(),
530  TfToken const &purpose3=TfToken(),
531  TfToken const &purpose4=TfToken()) const;
532 
533 
534  /// Compute the bound of this prim in local space, at the specified
535  /// \p time, and for the specified purposes.
536  ///
537  /// The bound of the prim is computed, including the transform (if any)
538  /// authored on the node itself.
539  ///
540  /// It is an error to not specify any purposes, which will result in the
541  /// return of an empty box.
542  ///
543  /// <b>If you need to compute bounds for multiple prims on a stage, it
544  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
545  /// and query it directly; doing so will reuse sub-computations shared
546  /// by the prims.</b>
549  TfToken const &purpose1=TfToken(),
550  TfToken const &purpose2=TfToken(),
551  TfToken const &purpose3=TfToken(),
552  TfToken const &purpose4=TfToken()) const;
553 
554  /// Compute the untransformed bound of this prim, at the specified
555  /// \p time, and for the specified purposes.
556  ///
557  /// The bound of the prim is computed in its object space, ignoring
558  /// any transforms authored on or above the prim.
559  ///
560  /// It is an error to not specify any purposes, which will result in the
561  /// return of an empty box.
562  ///
563  /// <b>If you need to compute bounds for multiple prims on a stage, it
564  /// will be much, much more efficient to instantiate a UsdGeomBBoxCache
565  /// and query it directly; doing so will reuse sub-computations shared
566  /// by the prims.</b>
569  TfToken const &purpose1=TfToken(),
570  TfToken const &purpose2=TfToken(),
571  TfToken const &purpose3=TfToken(),
572  TfToken const &purpose4=TfToken()) const;
573 
574  /// Compute the transformation matrix for this prim at the given time,
575  /// including the transform authored on the Prim itself, if present.
576  ///
577  /// <b>If you need to compute the transform for multiple prims on a
578  /// stage, it will be much, much more efficient to instantiate a
579  /// UsdGeomXformCache and query it directly; doing so will reuse
580  /// sub-computations shared by the prims.</b>
583 
584  /// Compute the transformation matrix for this prim at the given time,
585  /// \em NOT including the transform authored on the prim itself.
586  ///
587  /// <b>If you need to compute the transform for multiple prims on a
588  /// stage, it will be much, much more efficient to instantiate a
589  /// UsdGeomXformCache and query it directly; doing so will reuse
590  /// sub-computations shared by the prims.</b>
593 
594  /// @}
595 
596 };
597 
599 
600 #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:3340
USDGEOM_API UsdAttribute GetVisibilityAttr() const
USDGEOM_API UsdRelationship GetProxyPrimRel() const
USDGEOM_API TfToken ComputePurpose() const
GLuint const GLchar * name
Definition: glcorearb.h:785
USDGEOM_API std::vector< UsdGeomPrimvar > GetPrimvars() 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
UsdSchemaKind
Definition: common.h:127
bool operator!=(const PurposeInfo &rhs)
Definition: imageable.h:412
Definition: token.h:87
USDGEOM_API UsdAttribute GetPurposeAttr() const
USDGEOM_API std::vector< UsdGeomPrimvar > GetAuthoredPrimvars() 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:132
Definition: typed.h:47
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
constexpr PurposeInfo()=default
Definition: path.h:288
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
bool operator==(const PurposeInfo &rhs)
Definition: imageable.h:408
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:417
PurposeInfo(const TfToken &purpose_, bool isInheritable_)
Definition: imageable.h:394
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
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
USDGEOM_API UsdGeomPrimvar GetPrimvar(const TfToken &name) const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Represents a non-concrete typed schema.
Definition: type.h:64
static USDGEOM_API const TfTokenVector & GetOrderedPurposeTokens()
#define USDGEOM_API
Definition: api.h:40
USDGEOM_API UsdGeomPrimvar CreatePrimvar(const TfToken &attrName, const SdfValueTypeName &typeName, const TfToken &interpolation=TfToken(), int elementSize=-1) const
USDGEOM_API bool HasPrimvar(const TfToken &name) const
Definition: value.h:168
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