meshTopologySchema.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_MESH_TOPOLOGY_SCHEMA_H
29 #define PXR_IMAGING_HD_MESH_TOPOLOGY_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/subdivisionTagsSchema.h"
34 
35 
36 PXR_NAMESPACE_OPEN_SCOPE
37 
38 //-----------------------------------------------------------------------------
39 
40 #define HDMESHTOPOLOGY_SCHEMA_TOKENS \
41  (topology) \
42  (faceVertexCounts) \
43  (faceVertexIndices) \
44  (holeIndices) \
45  (orientation) \
46  (leftHanded) \
47  (rightHanded) \
48 
49 TF_DECLARE_PUBLIC_TOKENS(HdMeshTopologySchemaTokens, HD_API,
50  HDMESHTOPOLOGY_SCHEMA_TOKENS);
51 
52 //-----------------------------------------------------------------------------
53 
54 class HdMeshTopologySchema : public HdSchema
55 {
56 public:
57  HdMeshTopologySchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  //ACCESSORS
61 
62  HD_API
63  HdIntArrayDataSourceHandle GetFaceVertexCounts();
64  HD_API
65  HdIntArrayDataSourceHandle GetFaceVertexIndices();
66  HD_API
67  HdIntArrayDataSourceHandle GetHoleIndices();
68  HD_API
69  HdTokenDataSourceHandle GetOrientation();
70 
71  // RETRIEVING AND CONSTRUCTING
72 
78  HD_API
79  static HdContainerDataSourceHandle
80  BuildRetained(
81  const HdIntArrayDataSourceHandle &faceVertexCounts,
82  const HdIntArrayDataSourceHandle &faceVertexIndices,
83  const HdIntArrayDataSourceHandle &holeIndices,
84  const HdTokenDataSourceHandle &orientation
85  );
86 
93  class Builder
94  {
95  public:
96  HD_API
97  Builder &SetFaceVertexCounts(
98  const HdIntArrayDataSourceHandle &faceVertexCounts);
99  HD_API
100  Builder &SetFaceVertexIndices(
101  const HdIntArrayDataSourceHandle &faceVertexIndices);
102  HD_API
103  Builder &SetHoleIndices(
104  const HdIntArrayDataSourceHandle &holeIndices);
105  HD_API
106  Builder &SetOrientation(
107  const HdTokenDataSourceHandle &orientation);
108 
110  HD_API
111  HdContainerDataSourceHandle Build();
112 
113  private:
114  HdIntArrayDataSourceHandle _faceVertexCounts;
115  HdIntArrayDataSourceHandle _faceVertexIndices;
116  HdIntArrayDataSourceHandle _holeIndices;
117  HdTokenDataSourceHandle _orientation;
118  };
119 
125  HD_API
126  static HdMeshTopologySchema GetFromParent(
127  const HdContainerDataSourceHandle &fromParentContainer);
128 
131  HD_API
132  static const HdDataSourceLocator &GetDefaultLocator();
133 
139  HD_API
140  static HdTokenDataSourceHandle BuildOrientationDataSource(
141  const TfToken &orientation);
142 
143 };
144 
145 PXR_NAMESPACE_CLOSE_SCOPE
146 
147 #endif
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
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...