extentSchema.h
1 //
2 // Copyright 2021 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 //
25 // This file is generated by a script. Do not edit directly. Edit the
26 // schema.template.h file to make changes.
27 
28 #ifndef PXR_IMAGING_HD_EXTENT_SCHEMA_H
29 #define PXR_IMAGING_HD_EXTENT_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
35 PXR_NAMESPACE_OPEN_SCOPE
36 
37 //-----------------------------------------------------------------------------
38 
39 #define HDEXTENT_SCHEMA_TOKENS \
40  (extent) \
41  (min) \
42  (max) \
43 
44 TF_DECLARE_PUBLIC_TOKENS(HdExtentSchemaTokens, HD_API,
45  HDEXTENT_SCHEMA_TOKENS);
46 
47 //-----------------------------------------------------------------------------
48 
49 class HdExtentSchema : public HdSchema
50 {
51 public:
52  HdExtentSchema(HdContainerDataSourceHandle container)
53  : HdSchema(container) {}
54 
55  //ACCESSORS
56 
57  HD_API
58  HdVec3dDataSourceHandle GetMin();
59  HD_API
60  HdVec3dDataSourceHandle GetMax();
61 
62  // RETRIEVING AND CONSTRUCTING
63 
69  HD_API
70  static HdContainerDataSourceHandle
71  BuildRetained(
72  const HdVec3dDataSourceHandle &min,
73  const HdVec3dDataSourceHandle &max
74  );
75 
82  class Builder
83  {
84  public:
85  HD_API
86  Builder &SetMin(
87  const HdVec3dDataSourceHandle &min);
88  HD_API
89  Builder &SetMax(
90  const HdVec3dDataSourceHandle &max);
91 
93  HD_API
94  HdContainerDataSourceHandle Build();
95 
96  private:
97  HdVec3dDataSourceHandle _min;
98  HdVec3dDataSourceHandle _max;
99  };
100 
106  HD_API
107  static HdExtentSchema GetFromParent(
108  const HdContainerDataSourceHandle &fromParentContainer);
109 
112  HD_API
113  static const HdDataSourceLocator &GetDefaultLocator();
114 
115 };
116 
117 PXR_NAMESPACE_CLOSE_SCOPE
118 
119 #endif
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: extentSchema.h:82