HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
denoisePass.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 USDRENDER_GENERATED_DENOISEPASS_H
25 #define USDRENDER_GENERATED_DENOISEPASS_H
26 
27 /// \file usdRender/denoisePass.h
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdRender/api.h"
31 #include "pxr/usd/usd/typed.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 
35 #include "pxr/base/vt/value.h"
36 
37 #include "pxr/base/gf/vec3d.h"
38 #include "pxr/base/gf/vec3f.h"
39 #include "pxr/base/gf/matrix4d.h"
40 
41 #include "pxr/base/tf/token.h"
42 #include "pxr/base/tf/type.h"
43 
45 
46 class SdfAssetPath;
47 
48 // -------------------------------------------------------------------------- //
49 // RENDERDENOISEPASS //
50 // -------------------------------------------------------------------------- //
51 
52 /// \class UsdRenderDenoisePass
53 ///
54 /// A RenderDenoisePass generates renders via a denoising process.
55 /// This may be the same renderer that a pipeline uses for UsdRender,
56 /// or may be a separate one. Notably, a RenderDenoisePass requires
57 /// another Pass to be present for it to operate. The denoising process
58 /// itself is not generative, and requires images inputs to operate.
59 ///
60 /// As denoising integration varies so widely across pipelines, all
61 /// implementation details are left to pipeline-specific prims
62 /// that inherit from RenderDenoisePass.
63 ///
64 ///
66 {
67 public:
68  /// Compile time constant representing what kind of schema this class is.
69  ///
70  /// \sa UsdSchemaKind
72 
73  /// Construct a UsdRenderDenoisePass on UsdPrim \p prim .
74  /// Equivalent to UsdRenderDenoisePass::Get(prim.GetStage(), prim.GetPath())
75  /// for a \em valid \p prim, but will not immediately throw an error for
76  /// an invalid \p prim
77  explicit UsdRenderDenoisePass(const UsdPrim& prim=UsdPrim())
78  : UsdTyped(prim)
79  {
80  }
81 
82  /// Construct a UsdRenderDenoisePass on the prim held by \p schemaObj .
83  /// Should be preferred over UsdRenderDenoisePass(schemaObj.GetPrim()),
84  /// as it preserves SchemaBase state.
85  explicit UsdRenderDenoisePass(const UsdSchemaBase& schemaObj)
86  : UsdTyped(schemaObj)
87  {
88  }
89 
90  /// Destructor.
92  virtual ~UsdRenderDenoisePass();
93 
94  /// Return a vector of names of all pre-declared attributes for this schema
95  /// class and all its ancestor classes. Does not include attributes that
96  /// may be authored by custom/extended methods of the schemas involved.
98  static const TfTokenVector &
99  GetSchemaAttributeNames(bool includeInherited=true);
100 
101  /// Return a UsdRenderDenoisePass holding the prim adhering to this
102  /// schema at \p path on \p stage. If no prim exists at \p path on
103  /// \p stage, or if the prim at that path does not adhere to this schema,
104  /// return an invalid schema object. This is shorthand for the following:
105  ///
106  /// \code
107  /// UsdRenderDenoisePass(stage->GetPrimAtPath(path));
108  /// \endcode
109  ///
111  static UsdRenderDenoisePass
112  Get(const UsdStagePtr &stage, const SdfPath &path);
113 
114  /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
115  /// is defined (according to UsdPrim::IsDefined()) on this stage.
116  ///
117  /// If a prim adhering to this schema at \p path is already defined on this
118  /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
119  /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
120  /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
121  /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
122  /// current EditTarget for any nonexistent, or existing but not \a Defined
123  /// ancestors.
124  ///
125  /// The given \a path must be an absolute prim path that does not contain
126  /// any variant selections.
127  ///
128  /// If it is impossible to author any of the necessary PrimSpecs, (for
129  /// example, in case \a path cannot map to the current UsdEditTarget's
130  /// namespace) issue an error and return an invalid \a UsdPrim.
131  ///
132  /// Note that this method may return a defined prim whose typeName does not
133  /// specify this schema class, in case a stronger typeName opinion overrides
134  /// the opinion at the current EditTarget.
135  ///
137  static UsdRenderDenoisePass
138  Define(const UsdStagePtr &stage, const SdfPath &path);
139 
140 protected:
141  /// Returns the kind of schema this class belongs to.
142  ///
143  /// \sa UsdSchemaKind
145  UsdSchemaKind _GetSchemaKind() const override;
146 
147 private:
148  // needs to invoke _GetStaticTfType.
149  friend class UsdSchemaRegistry;
151  static const TfType &_GetStaticTfType();
152 
153  static bool _IsTypedSchema();
154 
155  // override SchemaBase virtuals.
157  const TfType &_GetTfType() const override;
158 
159 public:
160  // ===================================================================== //
161  // Feel free to add custom code below this line, it will be preserved by
162  // the code generator.
163  //
164  // Just remember to:
165  // - Close the class declaration with };
166  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
167  // - Close the include guard with #endif
168  // ===================================================================== //
169  // --(BEGIN CUSTOM CODE)--
170 };
171 
173 
174 #endif
USDRENDER_API UsdSchemaKind _GetSchemaKind() const override
#define USDRENDER_API
Definition: api.h:40
UsdRenderDenoisePass(const UsdPrim &prim=UsdPrim())
Definition: denoisePass.h:77
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
static USDRENDER_API UsdRenderDenoisePass Get(const UsdStagePtr &stage, const SdfPath &path)
Represents a concrete typed schema.
static USDRENDER_API UsdRenderDenoisePass Define(const UsdStagePtr &stage, const SdfPath &path)
virtual USDRENDER_API ~UsdRenderDenoisePass()
Destructor.
static USDRENDER_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Definition: prim.h:135
Definition: typed.h:61
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
Definition: path.h:291
UsdSchemaKind
Definition: common.h:127
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Definition: type.h:64
UsdRenderDenoisePass(const UsdSchemaBase &schemaObj)
Definition: denoisePass.h:85
static const UsdSchemaKind schemaKind
Definition: denoisePass.h:71