All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
interpolation.h
Go to the documentation of this file.
1//
2// Copyright 2016 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_USD_USD_INTERPOLATION_H
8#define PXR_USD_USD_INTERPOLATION_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usd/api.h"
15#include "pxr/base/vt/array.h"
16#include "pxr/base/gf/declare.h"
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20
28{
31};
32
56#define USD_LINEAR_INTERPOLATION_TYPES \
57 (GfHalf) (VtArray<GfHalf>) \
58 (float) (VtArray<float>) \
59 (double) (VtArray<double>) \
60 (SdfTimeCode) (VtArray<SdfTimeCode>) \
61 (GfMatrix2d) (VtArray<GfMatrix2d>) \
62 (GfMatrix3d) (VtArray<GfMatrix3d>) \
63 (GfMatrix4d) (VtArray<GfMatrix4d>) \
64 (GfVec2d) (VtArray<GfVec2d>) \
65 (GfVec2f) (VtArray<GfVec2f>) \
66 (GfVec2h) (VtArray<GfVec2h>) \
67 (GfVec3d) (VtArray<GfVec3d>) \
68 (GfVec3f) (VtArray<GfVec3f>) \
69 (GfVec3h) (VtArray<GfVec3h>) \
70 (GfVec4d) (VtArray<GfVec4d>) \
71 (GfVec4f) (VtArray<GfVec4f>) \
72 (GfVec4h) (VtArray<GfVec4h>) \
73 (GfQuatd) (VtArray<GfQuatd>) \
74 (GfQuatf) (VtArray<GfQuatf>) \
75 (GfQuath) (VtArray<GfQuath>)
76
84template <class T>
86{
87 static const bool isSupported = false;
88};
89
91#define _USD_DECLARE_INTERPOLATION_TRAITS(unused, type) \
92template <> \
93struct UsdLinearInterpolationTraits<type> \
94{ \
95 static const bool isSupported = true; \
96};
97
98TF_PP_SEQ_FOR_EACH(_USD_DECLARE_INTERPOLATION_TRAITS, ~,
100
101#undef _USD_DECLARE_INTERPOLATION_TRAITS
103
104
105PXR_NAMESPACE_CLOSE_SCOPE
106
107#endif // PXR_USD_USD_INTERPOLATION_H
Declares Gf types.
UsdInterpolationType
Attribute value interpolation options.
Definition: interpolation.h:28
@ UsdInterpolationTypeHeld
Held interpolation.
Definition: interpolation.h:29
@ UsdInterpolationTypeLinear
Linear interpolation.
Definition: interpolation.h:30
#define USD_LINEAR_INTERPOLATION_TYPES
Sequence of value types that support linear interpolation.
Definition: interpolation.h:56
Traits class describing whether a particular C++ value type supports linear interpolation.
Definition: interpolation.h:86