HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fieldSubtextureIdentifier.h
Go to the documentation of this file.
1 //
2 // Copyright 2020 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 //
24 #ifndef PXR_IMAGING_HD_ST_FIELD_SUBTEXTURE_IDENTIFIER_H
25 #define PXR_IMAGING_HD_ST_FIELD_SUBTEXTURE_IDENTIFIER_H
26 
28 
30 
31 ///
32 /// \class HdStOpenVDBAssetSubtextureIdentifier
33 ///
34 /// Identifies a grid in an OpenVDB file. Parallels OpenVDBAsset in usdVol.
35 ///
38 {
39 public:
40  /// C'tor
41  ///
42  /// fieldName corresponds to the gridName in the OpenVDB file.
43  ///
44  HDST_API
46  TfToken const &fieldName,
47  int fieldIndex);
48 
49  HDST_API
50  std::unique_ptr<HdStSubtextureIdentifier> Clone() const override;
51 
52  HDST_API
54 
55 protected:
56  HDST_API
57  ID _Hash() const override;
58 };
59 
60 ///
61 /// \class HdStField3DAssetSubtextureIdentifier
62 ///
63 /// Identifies the grid in a Field3DAsset file.
64 /// Parallels Field3DAsset in usdVol.
65 ///
68 {
69 public:
70  /// C'tor
71  ///
72  /// fieldName corresponds (e.g., density) to the
73  /// layer/attribute name in the Field3D file
74  /// fieldIndex corresponds to the
75  /// partition index
76  /// fieldPurpose (e.g., BigCloud) corresponds to the
77  /// partition name/grouping
78  ///
79  HDST_API
81  TfToken const &fieldName,
82  int fieldIndex,
83  TfToken const &fieldPurpose);
84 
85  HDST_API
86  std::unique_ptr<HdStSubtextureIdentifier> Clone() const override;
87 
88  HDST_API
89  TfToken const &GetFieldPurpose() const { return _fieldPurpose; }
90 
91  HDST_API
93 
94 protected:
95  HDST_API
96  ID _Hash() const override;
97 
98 private:
99  TfToken _fieldPurpose;
100 };
101 
102 
104 
105 #endif
HDST_API HdStField3DAssetSubtextureIdentifier(TfToken const &fieldName, int fieldIndex, TfToken const &fieldPurpose)
HDST_API ID _Hash() const override
Definition: token.h:87
HDST_API ~HdStOpenVDBAssetSubtextureIdentifier() override
HDST_API HdStOpenVDBAssetSubtextureIdentifier(TfToken const &fieldName, int fieldIndex)
HDST_API std::unique_ptr< HdStSubtextureIdentifier > Clone() const override
HDST_API ID _Hash() const override
HDST_API std::unique_ptr< HdStSubtextureIdentifier > Clone() const override
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
#define HDST_API
Definition: api.h:40
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HDST_API ~HdStField3DAssetSubtextureIdentifier() override
HDST_API TfToken const & GetFieldPurpose() const