Loading...
Searching...
No Matches
instancerTopologySchema.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_INSTANCER_TOPOLOGY_SCHEMA_H
19#define PXR_IMAGING_HD_INSTANCER_TOPOLOGY_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24#include "pxr/imaging/hd/schemaTypeDefs.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_INSTANCER_TOPOLOGY_SCHEMA_TOKENS \
37 (instancerTopology) \
38 (prototypes) \
39 (instanceIndices) \
40 (mask) \
41 (instanceLocations) \
42
43TF_DECLARE_PUBLIC_TOKENS(HdInstancerTopologySchemaTokens, HD_API,
44 HD_INSTANCER_TOPOLOGY_SCHEMA_TOKENS);
45
46//-----------------------------------------------------------------------------
47
48
93{
94public:
97
98 HdInstancerTopologySchema(HdContainerDataSourceHandle container)
99 : HdSchema(container) {}
100
106 HD_API
108 const HdContainerDataSourceHandle &fromParentContainer);
109
111
112// --(BEGIN CUSTOM CODE: Schema Methods)--
113
114 HD_API
115 VtArray<int> ComputeInstanceIndicesForProto(SdfPath const &path);
116
117// --(END CUSTOM CODE: Schema Methods)--
118
121
122 HD_API
123 HdPathArrayDataSourceHandle GetPrototypes() const;
124
125 HD_API
126 HdIntArrayVectorSchema GetInstanceIndices() const;
127
128 HD_API
129 HdBoolArrayDataSourceHandle GetMask() const;
130
131 HD_API
132 HdPathArrayDataSourceHandle GetInstanceLocations() const;
133
135
138
141 HD_API
142 static const TfToken &GetSchemaToken();
143
146 HD_API
148
150
153
161 HD_API
162 static HdContainerDataSourceHandle
164 const HdPathArrayDataSourceHandle &prototypes,
165 const HdVectorDataSourceHandle &instanceIndices,
166 const HdBoolArrayDataSourceHandle &mask,
167 const HdPathArrayDataSourceHandle &instanceLocations
168 );
169
177 {
178 public:
179 HD_API
180 Builder &SetPrototypes(
181 const HdPathArrayDataSourceHandle &prototypes);
182 HD_API
183 Builder &SetInstanceIndices(
184 const HdVectorDataSourceHandle &instanceIndices);
185 HD_API
186 Builder &SetMask(
187 const HdBoolArrayDataSourceHandle &mask);
188 HD_API
189 Builder &SetInstanceLocations(
190 const HdPathArrayDataSourceHandle &instanceLocations);
191
193 HD_API
194 HdContainerDataSourceHandle Build();
195
196 private:
197 HdPathArrayDataSourceHandle _prototypes;
198 HdVectorDataSourceHandle _instanceIndices;
199 HdBoolArrayDataSourceHandle _mask;
200 HdPathArrayDataSourceHandle _instanceLocations;
201
202 };
203
205};
206
207PXR_NAMESPACE_CLOSE_SCOPE
208
209#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.
Since the instancing schema is complicated:
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathArrayDataSourceHandle &prototypes, const HdVectorDataSourceHandle &instanceIndices, const HdBoolArrayDataSourceHandle &mask, const HdPathArrayDataSourceHandle &instanceLocations)
static HD_API HdInstancerTopologySchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "instancerTopology" from the p...
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Template class wrapping a vector data source whose children are data source of an expected type.
Definition: vectorSchema.h:66
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:213
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92