Loading...
Searching...
No Matches
meshSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_MESH_SCHEMA_H
19#define PXR_IMAGING_HD_MESH_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
26
27#include "pxr/imaging/hd/schema.h"
28
29// --(BEGIN CUSTOM CODE: Includes)--
30// --(END CUSTOM CODE: Includes)--
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34// --(BEGIN CUSTOM CODE: Declares)--
35// --(END CUSTOM CODE: Declares)--
36
37#define HD_MESH_SCHEMA_TOKENS \
38 (mesh) \
39 (topology) \
40 (subdivisionScheme) \
41 (subdivisionTags) \
42 (doubleSided) \
43
44TF_DECLARE_PUBLIC_TOKENS(HdMeshSchemaTokens, HD_API,
45 HD_MESH_SCHEMA_TOKENS);
46
47//-----------------------------------------------------------------------------
48
49
52class HdMeshSchema : public HdSchema
53{
54public:
57
58 HdMeshSchema(HdContainerDataSourceHandle container)
59 : HdSchema(container) {}
60
66 HD_API
67 static HdMeshSchema GetFromParent(
68 const HdContainerDataSourceHandle &fromParentContainer);
69
71
72// --(BEGIN CUSTOM CODE: Schema Methods)--
73// --(END CUSTOM CODE: Schema Methods)--
74
77
78 HD_API
79 HdMeshTopologySchema GetTopology() const;
80
81 HD_API
82 HdTokenDataSourceHandle GetSubdivisionScheme() const;
83
84 HD_API
85 HdSubdivisionTagsSchema GetSubdivisionTags() const;
86
87 HD_API
88 HdBoolDataSourceHandle GetDoubleSided() const;
89
91
94
97 HD_API
98 static const TfToken &GetSchemaToken();
99
102 HD_API
103 static const HdDataSourceLocator &GetDefaultLocator();
104
106
115
117 HD_API
118 static const HdDataSourceLocator &GetTopologyLocator();
119
121 HD_API
122 static const HdDataSourceLocator &GetSubdivisionSchemeLocator();
123
125 HD_API
126 static const HdDataSourceLocator &GetSubdivisionTagsLocator();
127
129 HD_API
130 static const HdDataSourceLocator &GetDoubleSidedLocator();
132
135
143 HD_API
144 static HdContainerDataSourceHandle
145 BuildRetained(
146 const HdContainerDataSourceHandle &topology,
147 const HdTokenDataSourceHandle &subdivisionScheme,
148 const HdContainerDataSourceHandle &subdivisionTags,
149 const HdBoolDataSourceHandle &doubleSided
150 );
151
159 {
160 public:
161 HD_API
162 Builder &SetTopology(
163 const HdContainerDataSourceHandle &topology);
164 HD_API
165 Builder &SetSubdivisionScheme(
166 const HdTokenDataSourceHandle &subdivisionScheme);
167 HD_API
168 Builder &SetSubdivisionTags(
169 const HdContainerDataSourceHandle &subdivisionTags);
170 HD_API
171 Builder &SetDoubleSided(
172 const HdBoolDataSourceHandle &doubleSided);
173
175 HD_API
176 HdContainerDataSourceHandle Build();
177
178 private:
179 HdContainerDataSourceHandle _topology;
180 HdTokenDataSourceHandle _subdivisionScheme;
181 HdContainerDataSourceHandle _subdivisionTags;
182 HdBoolDataSourceHandle _doubleSided;
183
184 };
185
187};
188
189PXR_NAMESPACE_CLOSE_SCOPE
190
191#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: meshSchema.h:159
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92