All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
50class HdMeshSchema : public HdSchema
51{
52public:
55
56 HdMeshSchema(HdContainerDataSourceHandle container)
57 : HdSchema(container) {}
58
64 HD_API
65 static HdMeshSchema GetFromParent(
66 const HdContainerDataSourceHandle &fromParentContainer);
67
69
70// --(BEGIN CUSTOM CODE: Schema Methods)--
71// --(END CUSTOM CODE: Schema Methods)--
72
75
76 HD_API
77 HdMeshTopologySchema GetTopology() const;
78
79 HD_API
80 HdTokenDataSourceHandle GetSubdivisionScheme() const;
81
82 HD_API
83 HdSubdivisionTagsSchema GetSubdivisionTags() const;
84
85 HD_API
86 HdBoolDataSourceHandle GetDoubleSided() const;
87
89
92
95 HD_API
96 static const TfToken &GetSchemaToken();
97
100 HD_API
101 static const HdDataSourceLocator &GetDefaultLocator();
102
104
113
115 HD_API
116 static const HdDataSourceLocator &GetTopologyLocator();
117
119 HD_API
120 static const HdDataSourceLocator &GetSubdivisionSchemeLocator();
121
123 HD_API
124 static const HdDataSourceLocator &GetSubdivisionTagsLocator();
125
127 HD_API
128 static const HdDataSourceLocator &GetDoubleSidedLocator();
130
133
141 HD_API
142 static HdContainerDataSourceHandle
143 BuildRetained(
144 const HdContainerDataSourceHandle &topology,
145 const HdTokenDataSourceHandle &subdivisionScheme,
146 const HdContainerDataSourceHandle &subdivisionTags,
147 const HdBoolDataSourceHandle &doubleSided
148 );
149
157 {
158 public:
159 HD_API
160 Builder &SetTopology(
161 const HdContainerDataSourceHandle &topology);
162 HD_API
163 Builder &SetSubdivisionScheme(
164 const HdTokenDataSourceHandle &subdivisionScheme);
165 HD_API
166 Builder &SetSubdivisionTags(
167 const HdContainerDataSourceHandle &subdivisionTags);
168 HD_API
169 Builder &SetDoubleSided(
170 const HdBoolDataSourceHandle &doubleSided);
171
173 HD_API
174 HdContainerDataSourceHandle Build();
175
176 private:
177 HdContainerDataSourceHandle _topology;
178 HdTokenDataSourceHandle _subdivisionScheme;
179 HdContainerDataSourceHandle _subdivisionTags;
180 HdBoolDataSourceHandle _doubleSided;
181
182 };
183
185};
186
187PXR_NAMESPACE_CLOSE_SCOPE
188
189#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:157
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:81