modelSchema.h
1 //
2 // Copyright 2022 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_USD_IMAGING_USD_IMAGING_MODEL_SCHEMA_H
29 #define PXR_USD_IMAGING_USD_IMAGING_MODEL_SCHEMA_H
30 
31 #include "pxr/usdImaging/usdImaging/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
35 PXR_NAMESPACE_OPEN_SCOPE
36 
37 //-----------------------------------------------------------------------------
38 
39 #define USDIMAGINGMODEL_SCHEMA_TOKENS \
40  (model) \
41  (drawMode) \
42  (applyDrawMode) \
43  (drawModeColor) \
44  (cardGeometry) \
45  (cardTextureXPos) \
46  (cardTextureYPos) \
47  (cardTextureZPos) \
48  (cardTextureXNeg) \
49  (cardTextureYNeg) \
50  (cardTextureZNeg) \
51  (inherited) \
52  (origin) \
53  (bounds) \
54  (cards) \
55  ((default_, "default")) \
56  (cross) \
57  (box) \
58  (fromTexture) \
59 
60 TF_DECLARE_PUBLIC_TOKENS(UsdImagingModelSchemaTokens, USDIMAGING_API,
61  USDIMAGINGMODEL_SCHEMA_TOKENS);
62 
63 //-----------------------------------------------------------------------------
64 
65 class UsdImagingModelSchema : public HdSchema
66 {
67 public:
68  UsdImagingModelSchema(HdContainerDataSourceHandle container)
69  : HdSchema(container) {}
70 
71  //ACCESSORS
72 
73  USDIMAGING_API
74  HdTokenDataSourceHandle GetDrawMode();
75  USDIMAGING_API
76  HdBoolDataSourceHandle GetApplyDrawMode();
77  USDIMAGING_API
78  HdVec3fDataSourceHandle GetDrawModeColor();
79  USDIMAGING_API
80  HdTokenDataSourceHandle GetCardGeometry();
81  USDIMAGING_API
82  HdAssetPathDataSourceHandle GetCardTextureXPos();
83  USDIMAGING_API
84  HdAssetPathDataSourceHandle GetCardTextureYPos();
85  USDIMAGING_API
86  HdAssetPathDataSourceHandle GetCardTextureZPos();
87  USDIMAGING_API
88  HdAssetPathDataSourceHandle GetCardTextureXNeg();
89  USDIMAGING_API
90  HdAssetPathDataSourceHandle GetCardTextureYNeg();
91  USDIMAGING_API
92  HdAssetPathDataSourceHandle GetCardTextureZNeg();
93 
94  // RETRIEVING AND CONSTRUCTING
95 
101  USDIMAGING_API
102  static HdContainerDataSourceHandle
103  BuildRetained(
104  const HdTokenDataSourceHandle &drawMode,
105  const HdBoolDataSourceHandle &applyDrawMode,
106  const HdVec3fDataSourceHandle &drawModeColor,
107  const HdTokenDataSourceHandle &cardGeometry,
108  const HdAssetPathDataSourceHandle &cardTextureXPos,
109  const HdAssetPathDataSourceHandle &cardTextureYPos,
110  const HdAssetPathDataSourceHandle &cardTextureZPos,
111  const HdAssetPathDataSourceHandle &cardTextureXNeg,
112  const HdAssetPathDataSourceHandle &cardTextureYNeg,
113  const HdAssetPathDataSourceHandle &cardTextureZNeg
114  );
115 
122  class Builder
123  {
124  public:
125  USDIMAGING_API
126  Builder &SetDrawMode(
127  const HdTokenDataSourceHandle &drawMode);
128  USDIMAGING_API
129  Builder &SetApplyDrawMode(
130  const HdBoolDataSourceHandle &applyDrawMode);
131  USDIMAGING_API
132  Builder &SetDrawModeColor(
133  const HdVec3fDataSourceHandle &drawModeColor);
134  USDIMAGING_API
135  Builder &SetCardGeometry(
136  const HdTokenDataSourceHandle &cardGeometry);
137  USDIMAGING_API
138  Builder &SetCardTextureXPos(
139  const HdAssetPathDataSourceHandle &cardTextureXPos);
140  USDIMAGING_API
141  Builder &SetCardTextureYPos(
142  const HdAssetPathDataSourceHandle &cardTextureYPos);
143  USDIMAGING_API
144  Builder &SetCardTextureZPos(
145  const HdAssetPathDataSourceHandle &cardTextureZPos);
146  USDIMAGING_API
147  Builder &SetCardTextureXNeg(
148  const HdAssetPathDataSourceHandle &cardTextureXNeg);
149  USDIMAGING_API
150  Builder &SetCardTextureYNeg(
151  const HdAssetPathDataSourceHandle &cardTextureYNeg);
152  USDIMAGING_API
153  Builder &SetCardTextureZNeg(
154  const HdAssetPathDataSourceHandle &cardTextureZNeg);
155 
157  USDIMAGING_API
158  HdContainerDataSourceHandle Build();
159 
160  private:
161  HdTokenDataSourceHandle _drawMode;
162  HdBoolDataSourceHandle _applyDrawMode;
163  HdVec3fDataSourceHandle _drawModeColor;
164  HdTokenDataSourceHandle _cardGeometry;
165  HdAssetPathDataSourceHandle _cardTextureXPos;
166  HdAssetPathDataSourceHandle _cardTextureYPos;
167  HdAssetPathDataSourceHandle _cardTextureZPos;
168  HdAssetPathDataSourceHandle _cardTextureXNeg;
169  HdAssetPathDataSourceHandle _cardTextureYNeg;
170  HdAssetPathDataSourceHandle _cardTextureZNeg;
171  };
172 
178  USDIMAGING_API
179  static UsdImagingModelSchema GetFromParent(
180  const HdContainerDataSourceHandle &fromParentContainer);
181 
184  USDIMAGING_API
185  static const HdDataSourceLocator &GetDefaultLocator();
186 
187 };
188 
189 PXR_NAMESPACE_CLOSE_SCOPE
190 
191 #endif
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: modelSchema.h:122
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.