1 //
2 // Copyright 2021 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_DATASOURCETYPEDEFS_H
25 #define PXR_IMAGING_HD_DATASOURCETYPEDEFS_H
26 
27 #include "pxr/pxr.h"
28 
29 #include "pxr/imaging/hd/dataSource.h"
30 #include "pxr/imaging/hd/dataSourceLocator.h"
31 #include "pxr/imaging/hd/types.h"
32 
33 #include "pxr/base/gf/matrix4d.h"
34 #include "pxr/base/gf/vec2f.h"
35 #include "pxr/base/tf/staticTokens.h"
36 #include "pxr/base/vt/array.h"
37 
38 #include "pxr/usd/sdf/path.h"
39 #include "pxr/usd/sdf/assetPath.h"
40 
41 PXR_NAMESPACE_OPEN_SCOPE
42 
43 // Numeric
44 using HdIntDataSource = HdTypedSampledDataSource<int>;
45 using HdIntDataSourceHandle = HdIntDataSource::Handle;
46 using HdIntArrayDataSource = HdTypedSampledDataSource<VtArray<int>>;
47 using HdIntArrayDataSourceHandle = HdIntArrayDataSource::Handle;
48 
49 using HdSizetDataSource = HdTypedSampledDataSource<size_t>;
50 using HdSizetDataSourceHandle = HdSizetDataSource::Handle;
51 
52 using HdFloatDataSource = HdTypedSampledDataSource<float>;
53 using HdFloatDataSourceHandle = HdFloatDataSource::Handle;
54 using HdFloatArrayDataSource = HdTypedSampledDataSource<VtArray<float>>;
55 using HdFloatArrayDataSourceHandle = HdFloatArrayDataSource::Handle;
56 
57 // Bool
58 using HdBoolDataSource = HdTypedSampledDataSource<bool>;
59 using HdBoolDataSourceHandle = HdBoolDataSource::Handle;
60 using HdBoolArrayDataSource = HdTypedSampledDataSource<VtArray<bool>>;
61 using HdBoolArrayDataSourceHandle = HdBoolArrayDataSource::Handle;
62 
63 // String
64 using HdTokenDataSource = HdTypedSampledDataSource<TfToken>;
65 using HdTokenDataSourceHandle = HdTokenDataSource::Handle;
66 using HdTokenArrayDataSource = HdTypedSampledDataSource<VtArray<TfToken>>;
67 using HdTokenArrayDataSourceHandle = HdTokenArrayDataSource::Handle;
68 
69 using HdPathDataSource = HdTypedSampledDataSource<SdfPath>;
70 using HdPathDataSourceHandle = HdPathDataSource::Handle;
71 using HdPathArrayDataSource = HdTypedSampledDataSource<VtArray<SdfPath>>;
72 using HdPathArrayDataSourceHandle = HdPathArrayDataSource::Handle;
73 
74 using HdStringDataSource = HdTypedSampledDataSource<std::string>;
75 using HdStringDataSourceHandle = HdStringDataSource::Handle;
76 
77 using HdAssetPathDataSource = HdTypedSampledDataSource<SdfAssetPath>;
78 using HdAssetPathDataSourceHandle = HdAssetPathDataSource::Handle;
79 
80 // Linear algebra
81 using HdVec2iDataSource = HdTypedSampledDataSource<GfVec2i>;
82 using HdVec2iDataSourceHandle = HdVec2iDataSource::Handle;
83 using HdVec2fDataSource = HdTypedSampledDataSource<GfVec2f>;
84 using HdVec2fDataSourceHandle = HdVec2fDataSource::Handle;
85 using HdVec2fArrayDataSource = HdTypedSampledDataSource<VtArray<GfVec2f>>;
86 using HdVec2fArrayDataSourceHandle = HdVec2fArrayDataSource::Handle;
87 
88 using HdVec3iDataSource = HdTypedSampledDataSource<GfVec3i>;
89 using HdVec3iDataSourceHandle = HdVec3iDataSource::Handle;
90 using HdVec3fDataSource = HdTypedSampledDataSource<GfVec3f>;
91 using HdVec3fDataSourceHandle = HdVec3fDataSource::Handle;
92 using HdVec3fArrayDataSource = HdTypedSampledDataSource<VtArray<GfVec3f>>;
93 using HdVec3fArrayDataSourceHandle = HdVec3fArrayDataSource::Handle;
94 
95 using HdVec4iDataSource = HdTypedSampledDataSource<GfVec4i>;
96 using HdVec4iDataSourceHandle = HdVec4iDataSource::Handle;
97 using HdVec3dDataSource = HdTypedSampledDataSource<GfVec3d>;
98 using HdVec3dDataSourceHandle = HdVec3dDataSource::Handle;
99 using HdVec3dArrayDataSource = HdTypedSampledDataSource<VtArray<GfVec3d>>;
100 using HdVec3dArrayDataSourceHandle = HdVec3dArrayDataSource::Handle;
101 
102 using HdMatrixDataSource = HdTypedSampledDataSource<GfMatrix4d>;
103 using HdMatrixDataSourceHandle = HdMatrixDataSource::Handle;
104 using HdMatrixArrayDataSource = HdTypedSampledDataSource<VtArray<GfMatrix4d>>;
105 using HdMatrixArrayDataSourceHandle = HdMatrixArrayDataSource::Handle;
106 
107 // Locator
108 using HdLocatorDataSource = HdTypedSampledDataSource<HdDataSourceLocator>;
109 using HdLocatorDataSourceHandle = HdLocatorDataSource::Handle;
110 
111 // Enum
112 using HdFormatDataSource = HdTypedSampledDataSource<HdFormat>;
113 using HdFormatDataSourceHandle = HdFormatDataSource::Handle;
114 
115 using HdTupleTypeDataSource = HdTypedSampledDataSource<HdTupleType>;
116 using HdTupleTypeDataSourceHandle = HdTupleTypeDataSource::Handle;
117 
118 PXR_NAMESPACE_CLOSE_SCOPE
119 
120 #endif // PXR_IMAGING_HD_DATASOURCETYPEDEFS_H
121