HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extentSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 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 ////////////////////////////////////////////////////////////////////////
25 
26 /* ************************************************************************** */
27 /* ** This file is generated by a script. Do not edit directly. Edit ** */
28 /* ** defs.py or the (*)Schema.template.h files to make changes. ** */
29 /* ************************************************************************** */
30 
31 #ifndef PXR_IMAGING_HD_EXTENT_SCHEMA_H
32 #define PXR_IMAGING_HD_EXTENT_SCHEMA_H
33 
34 #include "pxr/imaging/hd/api.h"
35 
36 #include "pxr/imaging/hd/schema.h"
37 
39 
40 //-----------------------------------------------------------------------------
41 
42 #define HDEXTENT_SCHEMA_TOKENS \
43  (extent) \
44  (min) \
45  (max) \
46 
47 TF_DECLARE_PUBLIC_TOKENS(HdExtentSchemaTokens, HD_API,
49 
50 //-----------------------------------------------------------------------------
51 
52 class HdExtentSchema : public HdSchema
53 {
54 public:
55  HdExtentSchema(HdContainerDataSourceHandle container)
56  : HdSchema(container) {}
57 
58  //ACCESSORS
59 
60  HD_API
62  HD_API
64 
65  // RETRIEVING AND CONSTRUCTING
66 
67  /// Builds a container data source which includes the provided child data
68  /// sources. Parameters with nullptr values are excluded. This is a
69  /// low-level interface. For cases in which it's desired to define
70  /// the container with a sparse set of child fields, the Builder class
71  /// is often more convenient and readable.
72  HD_API
73  static HdContainerDataSourceHandle
77  );
78 
79  /// \class HdExtentSchema::Builder
80  ///
81  /// Utility class for setting sparse sets of child data source fields to be
82  /// filled as arguments into BuildRetained. Because all setter methods
83  /// return a reference to the instance, this can be used in the "builder
84  /// pattern" form.
85  class Builder
86  {
87  public:
88  HD_API
89  Builder &SetMin(
91  HD_API
92  Builder &SetMax(
94 
95  /// Returns a container data source containing the members set thus far.
96  HD_API
97  HdContainerDataSourceHandle Build();
98 
99  private:
102  };
103 
104  /// Retrieves a container data source with the schema's default name token
105  /// "extent" from the parent container and constructs a
106  /// HdExtentSchema instance.
107  /// Because the requested container data source may not exist, the result
108  /// should be checked with IsDefined() or a bool comparison before use.
109  HD_API
111  const HdContainerDataSourceHandle &fromParentContainer);
112 
113  /// Returns a token where the container representing this schema is found in
114  /// a container by default.
115  HD_API
116  static const TfToken &GetSchemaToken();
117 
118  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
119  /// where the container representing this schema is found by default.
120  HD_API
121  static const HdDataSourceLocator &GetDefaultLocator();
122 
123 };
124 
126 
127 #endif
HdVec3dDataSource::Handle HdVec3dDataSourceHandle
static HD_API HdExtentSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
HD_API Builder & SetMin(const HdVec3dDataSourceHandle &min)
#define HD_API
Definition: api.h:40
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
static HD_API HdContainerDataSourceHandle BuildRetained(const HdVec3dDataSourceHandle &min, const HdVec3dDataSourceHandle &max)
static HD_API const HdDataSourceLocator & GetDefaultLocator()
TF_DECLARE_PUBLIC_TOKENS(HdExtentSchemaTokens, HD_API, HDEXTENT_SCHEMA_TOKENS)
Definition: token.h:87
#define HDEXTENT_SCHEMA_TOKENS
Definition: extentSchema.h:42
HD_API HdVec3dDataSourceHandle GetMin()
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
HD_API HdVec3dDataSourceHandle GetMax()
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HD_API Builder & SetMax(const HdVec3dDataSourceHandle &max)
static HD_API const TfToken & GetSchemaToken()
HdExtentSchema(HdContainerDataSourceHandle container)
Definition: extentSchema.h:55