Loading...
Searching...
No Matches
volumeFieldSchema.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_VOLUME_FIELD_SCHEMA_H
19#define PXR_IMAGING_HD_VOLUME_FIELD_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_VOLUME_FIELD_SCHEMA_TOKENS \
36 (volumeField) \
37 (filePath) \
38 (fieldName) \
39 (fieldIndex) \
40 (fieldDataType) \
41 (vectorDataRoleHint) \
42
43TF_DECLARE_PUBLIC_TOKENS(HdVolumeFieldSchemaTokens, HD_API,
44 HD_VOLUME_FIELD_SCHEMA_TOKENS);
45
46//-----------------------------------------------------------------------------
47
48
51class HdVolumeFieldSchema : public HdSchema
52{
53public:
56
57 HdVolumeFieldSchema(HdContainerDataSourceHandle container)
58 : HdSchema(container) {}
59
65 HD_API
66 static HdVolumeFieldSchema 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 HdAssetPathDataSourceHandle GetFilePath() const;
79
80 HD_API
81 HdTokenDataSourceHandle GetFieldName() const;
82
83 HD_API
84 HdIntDataSourceHandle GetFieldIndex() const;
85
86 HD_API
87 HdTokenDataSourceHandle GetFieldDataType() const;
88
89 HD_API
90 HdTokenDataSourceHandle GetVectorDataRoleHint() const;
91
93
96
99 HD_API
100 static const TfToken &GetSchemaToken();
101
104 HD_API
105 static const HdDataSourceLocator &GetDefaultLocator();
106
108
111
119 HD_API
120 static HdContainerDataSourceHandle
121 BuildRetained(
122 const HdAssetPathDataSourceHandle &filePath,
123 const HdTokenDataSourceHandle &fieldName,
124 const HdIntDataSourceHandle &fieldIndex,
125 const HdTokenDataSourceHandle &fieldDataType,
126 const HdTokenDataSourceHandle &vectorDataRoleHint
127 );
128
136 {
137 public:
138 HD_API
139 Builder &SetFilePath(
140 const HdAssetPathDataSourceHandle &filePath);
141 HD_API
142 Builder &SetFieldName(
143 const HdTokenDataSourceHandle &fieldName);
144 HD_API
145 Builder &SetFieldIndex(
146 const HdIntDataSourceHandle &fieldIndex);
147 HD_API
148 Builder &SetFieldDataType(
149 const HdTokenDataSourceHandle &fieldDataType);
150 HD_API
151 Builder &SetVectorDataRoleHint(
152 const HdTokenDataSourceHandle &vectorDataRoleHint);
153
155 HD_API
156 HdContainerDataSourceHandle Build();
157
158 private:
159 HdAssetPathDataSourceHandle _filePath;
160 HdTokenDataSourceHandle _fieldName;
161 HdIntDataSourceHandle _fieldIndex;
162 HdTokenDataSourceHandle _fieldDataType;
163 HdTokenDataSourceHandle _vectorDataRoleHint;
164
165 };
166
168};
169
170PXR_NAMESPACE_CLOSE_SCOPE
171
172#endif
Represents an object that can identify the location of a data source.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
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.
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:92