All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
array.h
1 //
2 // Copyright 2018 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 VTKATANA_ARRAY_H
25 #define VTKATANA_ARRAY_H
26 
27 #include "pxr/pxr.h"
28 #include <FnAttribute/FnAttribute.h>
29 
30 #include "pxr/base/vt/array.h"
31 #include "vtKatana/traits.h"
32 
33 PXR_NAMESPACE_OPEN_SCOPE
34 
53 template <typename T>
54 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaMapOrCopy(
55  const VtArray<T>& value);
56 
78 template <typename T>
79 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaMapOrCopy(
80  const std::vector<float>& times,
81  const typename std::vector<VtArray<T>>& values);
82 
89 template <typename T>
90 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaMapOrCopy(
91  const typename std::map<float, VtArray<T>>& timeToValueMap);
92 
95 template <typename T>
96 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaCopy(
97  const VtArray<T>& value);
98 
104 template <typename T>
105 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaCopy(
106  const std::vector<float>& times,
107  const typename std::vector<VtArray<T>>& values);
108 
116 template <typename T>
117 typename VtKatana_GetKatanaAttrType<T>::type VtKatanaCopy(
118  const typename std::map<float, VtArray<T>>& timeToValueMap);
119 
142 template <typename T>
143 const VtArray<T> VtKatanaMapOrCopy(
144  const typename VtKatana_GetKatanaAttrType<T>::type& attr,
145  float sample = 0.0f);
146 
150 template <typename T>
151 const VtArray<T> VtKatanaCopy(
152  const typename VtKatana_GetKatanaAttrType<T>::type& attr,
153  float sample = 0.0f);
154 
155 PXR_NAMESPACE_CLOSE_SCOPE
156 
157 #endif