Loading...
Searching...
No Matches
instanceIndicesSchema.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_INSTANCE_INDICES_SCHEMA_H
19#define PXR_IMAGING_HD_INSTANCE_INDICES_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_INSTANCE_INDICES_SCHEMA_TOKENS \
36 (instancer) \
37 (prototypeIndex) \
38 (instanceIndices) \
39
40TF_DECLARE_PUBLIC_TOKENS(HdInstanceIndicesSchemaTokens, HD_API,
41 HD_INSTANCE_INDICES_SCHEMA_TOKENS);
42
43//-----------------------------------------------------------------------------
44
45
46class HdInstanceIndicesSchema : public HdSchema
47{
48public:
51
52 HdInstanceIndicesSchema(HdContainerDataSourceHandle container)
53 : HdSchema(container) {}
54
56
57// --(BEGIN CUSTOM CODE: Schema Methods)--
58// --(END CUSTOM CODE: Schema Methods)--
59
62
63 HD_API
64 HdPathDataSourceHandle GetInstancer() const;
65
66 HD_API
67 HdIntDataSourceHandle GetPrototypeIndex() const;
68
69 HD_API
70 HdIntArrayDataSourceHandle GetInstanceIndices() const;
71
73
76
84 HD_API
85 static HdContainerDataSourceHandle
86 BuildRetained(
87 const HdPathDataSourceHandle &instancer,
88 const HdIntDataSourceHandle &prototypeIndex,
89 const HdIntArrayDataSourceHandle &instanceIndices
90 );
91
98 class Builder
99 {
100 public:
101 HD_API
102 Builder &SetInstancer(
103 const HdPathDataSourceHandle &instancer);
104 HD_API
105 Builder &SetPrototypeIndex(
106 const HdIntDataSourceHandle &prototypeIndex);
107 HD_API
108 Builder &SetInstanceIndices(
109 const HdIntArrayDataSourceHandle &instanceIndices);
110
112 HD_API
113 HdContainerDataSourceHandle Build();
114
115 private:
116 HdPathDataSourceHandle _instancer;
117 HdIntDataSourceHandle _prototypeIndex;
118 HdIntArrayDataSourceHandle _instanceIndices;
119
120 };
121
123};
124
125PXR_NAMESPACE_CLOSE_SCOPE
126
127#endif
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
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81