Loading...
Searching...
No Matches
meshTopologySchema.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_TOPOLOGY_SCHEMA_H
19#define PXR_IMAGING_HD_MESH_TOPOLOGY_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34// --(END CUSTOM CODE: Declares)--
35
36#define HD_MESH_TOPOLOGY_SCHEMA_TOKENS \
37 (topology) \
38 (faceVertexCounts) \
39 (faceVertexIndices) \
40 (holeIndices) \
41 (orientation) \
42 (leftHanded) \
43 (rightHanded) \
44
45TF_DECLARE_PUBLIC_TOKENS(HdMeshTopologySchemaTokens, HD_API,
46 HD_MESH_TOPOLOGY_SCHEMA_TOKENS);
47
48//-----------------------------------------------------------------------------
49
50
51class HdMeshTopologySchema : public HdSchema
52{
53public:
56
57 HdMeshTopologySchema(HdContainerDataSourceHandle container)
58 : HdSchema(container) {}
59
65 HD_API
66 static HdMeshTopologySchema GetFromParent(
67 const HdContainerDataSourceHandle &fromParentContainer);
68
70
71// --(BEGIN CUSTOM CODE: Schema Methods)--
72// --(END CUSTOM CODE: Schema Methods)--
73
76
77 HD_API
78 HdIntArrayDataSourceHandle GetFaceVertexCounts() const;
79
80 HD_API
81 HdIntArrayDataSourceHandle GetFaceVertexIndices() const;
82
83 HD_API
84 HdIntArrayDataSourceHandle GetHoleIndices() const;
85
86 HD_API
87 HdTokenDataSourceHandle GetOrientation() const;
88
90
93
96 HD_API
97 static const TfToken &GetSchemaToken();
98
101 HD_API
102 static const HdDataSourceLocator &GetDefaultLocator();
103
105
108
116 HD_API
117 static HdContainerDataSourceHandle
118 BuildRetained(
119 const HdIntArrayDataSourceHandle &faceVertexCounts,
120 const HdIntArrayDataSourceHandle &faceVertexIndices,
121 const HdIntArrayDataSourceHandle &holeIndices,
122 const HdTokenDataSourceHandle &orientation
123 );
124
132 {
133 public:
134 HD_API
135 Builder &SetFaceVertexCounts(
136 const HdIntArrayDataSourceHandle &faceVertexCounts);
137 HD_API
138 Builder &SetFaceVertexIndices(
139 const HdIntArrayDataSourceHandle &faceVertexIndices);
140 HD_API
141 Builder &SetHoleIndices(
142 const HdIntArrayDataSourceHandle &holeIndices);
143 HD_API
144 Builder &SetOrientation(
145 const HdTokenDataSourceHandle &orientation);
146
148 HD_API
149 HdContainerDataSourceHandle Build();
150
151 private:
152 HdIntArrayDataSourceHandle _faceVertexCounts;
153 HdIntArrayDataSourceHandle _faceVertexIndices;
154 HdIntArrayDataSourceHandle _holeIndices;
155 HdTokenDataSourceHandle _orientation;
156
157 };
158
165 HD_API
166 static HdTokenDataSourceHandle BuildOrientationDataSource(
167 const TfToken &orientation);
168
170};
171
172PXR_NAMESPACE_CLOSE_SCOPE
173
174#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...
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