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 terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_HD_ST_FIELD_SUBTEXTURE_IDENTIFIER_H
8 #define PXR_IMAGING_HD_ST_FIELD_SUBTEXTURE_IDENTIFIER_H
9 
11 
13 
14 ///
15 /// \class HdStOpenVDBAssetSubtextureIdentifier
16 ///
17 /// Identifies a grid in an OpenVDB file. Parallels OpenVDBAsset in usdVol.
18 ///
21 {
22 public:
23  /// C'tor
24  ///
25  /// fieldName corresponds to the gridName in the OpenVDB file.
26  ///
27  HDST_API
29  TfToken const &fieldName,
30  int fieldIndex);
31 
32  HDST_API
33  std::unique_ptr<HdStSubtextureIdentifier> Clone() const override;
34 
35  HDST_API
37 
38 protected:
39  HDST_API
40  ID _Hash() const override;
41 };
42 
43 ///
44 /// \class HdStField3DAssetSubtextureIdentifier
45 ///
46 /// Identifies the grid in a Field3DAsset file.
47 /// Parallels Field3DAsset in usdVol.
48 ///
51 {
52 public:
53  /// C'tor
54  ///
55  /// fieldName corresponds (e.g., density) to the
56  /// layer/attribute name in the Field3D file
57  /// fieldIndex corresponds to the
58  /// partition index
59  /// fieldPurpose (e.g., BigCloud) corresponds to the
60  /// partition name/grouping
61  ///
62  HDST_API
64  TfToken const &fieldName,
65  int fieldIndex,
66  TfToken const &fieldPurpose);
67 
68  HDST_API
69  std::unique_ptr<HdStSubtextureIdentifier> Clone() const override;
70 
71  HDST_API
72  TfToken const &GetFieldPurpose() const { return _fieldPurpose; }
73 
74  HDST_API
76 
77 protected:
78  HDST_API
79  ID _Hash() const override;
80 
81 private:
82  TfToken _fieldPurpose;
83 };
84 
85 
87 
88 #endif
HDST_API HdStField3DAssetSubtextureIdentifier(TfToken const &fieldName, int fieldIndex, TfToken const &fieldPurpose)
HDST_API ID _Hash() const override
Definition: token.h:70
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:1425
#define HDST_API
Definition: api.h:23
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HDST_API ~HdStField3DAssetSubtextureIdentifier() override
HDST_API TfToken const & GetFieldPurpose() const