OpenVDB: Types.h Source File

OpenVDB 8.0.0

openvdb/Types.h
Go to the documentation of this file.
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3
4 #ifndef OPENVDB_TYPES_HAS_BEEN_INCLUDED
5 #define OPENVDB_TYPES_HAS_BEEN_INCLUDED
6
7 #include "version.h"
8 #include "Platform.h"
9 #include "TypeList.h" // backwards compat
10 #include <OpenEXR/half.h>
11 #include <openvdb/math/Math.h>
12 #include <openvdb/math/BBox.h>
13 #include <openvdb/math/Quat.h>
14 #include <openvdb/math/Vec2.h>
15 #include <openvdb/math/Vec3.h>
16 #include <openvdb/math/Vec4.h>
17 #include <openvdb/math/Mat3.h>
18 #include <openvdb/math/Mat4.h>
19 #include <openvdb/math/Coord.h>
20 #include <cstdint>
21 #include <memory>
22 #include <type_traits>
23
24
25 namespace openvdb {
26 OPENVDB_USE_VERSION_NAMESPACE
27 namespace OPENVDB_VERSION_NAME {
28
29 // One-dimensional scalar types
30 using Index32 = uint32_t;
31 using Index64 = uint64_t;
32 using Index = Index32;
33 using Int16 = int16_t;
34 using Int32 = int32_t;
35 using Int64 = int64_t;
36 using Int = Int32;
37 using Byte = unsigned char;
38 using Real = double;
39
40 // Two-dimensional vector types
41 using Vec2R = math::Vec2<Real>;
42 using Vec2I = math::Vec2<Index32>;
43 using Vec2f = math::Vec2<float>;
44 using Vec2H = math::Vec2<half>;
45 using math::Vec2i;
46 using math::Vec2s;
47 using math::Vec2d;
48
49 // Three-dimensional vector types
50 using Vec3R = math::Vec3<Real>;
51 using Vec3I = math::Vec3<Index32>;
52 using Vec3f = math::Vec3<float>;
53 using Vec3H = math::Vec3<half>;
54 using Vec3U8 = math::Vec3<uint8_t>;
55 using Vec3U16 = math::Vec3<uint16_t>;
56 using math::Vec3i;
57 using math::Vec3s;
58 using math::Vec3d;
59
60 using math::Coord;
61 using math::CoordBBox;
62 using BBoxd = math::BBox<Vec3d>;
63
64 // Four-dimensional vector types
65 using Vec4R = math::Vec4<Real>;
66 using Vec4I = math::Vec4<Index32>;
67 using Vec4f = math::Vec4<float>;
68 using Vec4H = math::Vec4<half>;
69 using math::Vec4i;
70 using math::Vec4s;
71 using math::Vec4d;
72
73 // Three-dimensional matrix types
74 using Mat3R = math::Mat3<Real>;
75 using math::Mat3s;
76 using math::Mat3d;
77
78 // Four-dimensional matrix types
79 using Mat4R = math::Mat4<Real>;
80 using math::Mat4s;
81 using math::Mat4d;
82
83 // Quaternions
84 using QuatR = math::Quat<Real>;
85 using math::Quats;
86 using math::Quatd;
87
88 // Dummy type for a voxel with a binary mask value, e.g. the active state
89 class ValueMask {};
90
91 // Use STL shared pointers from OpenVDB 4 on.
92 template<typename T> using SharedPtr = std::shared_ptr<T>;
93 template<typename T> using WeakPtr = std::weak_ptr<T>;
94
103 template<typename T, typename U> inline SharedPtr<T>
104 ConstPtrCast(const SharedPtr<U>& ptr) { return std::const_pointer_cast<T, U>(ptr); }
105
113 template<typename T, typename U> inline SharedPtr<T>
114 DynamicPtrCast(const SharedPtr<U>& ptr) { return std::dynamic_pointer_cast<T, U>(ptr); }
115
123 template<typename T, typename U> inline SharedPtr<T>
124 StaticPtrCast(const SharedPtr<U>& ptr) { return std::static_pointer_cast<T, U>(ptr); }
125
126
128
129
133 template<typename IntType_, Index Kind>
134 struct PointIndex
135 {
136 static_assert(std::is_integral<IntType_>::value, "PointIndex requires an integer value type");
137
138 using IntType = IntType_;
139
140 PointIndex(IntType i = IntType(0)): mIndex(i) {}
141
143 template<typename T> explicit PointIndex(T i): mIndex(static_cast<IntType>(i)) {}
144
145 operator IntType() const { return mIndex; }
146
148 template<typename T>
149 PointIndex operator+(T x) { return PointIndex(mIndex + IntType(x)); }
150
151 private:
152 IntType mIndex;
153 };
154
155
156 using PointIndex32 = PointIndex<Index32, 0>;
157 using PointIndex64 = PointIndex<Index64, 0>;
158
159 using PointDataIndex32 = PointIndex<Index32, 1>;
160 using PointDataIndex64 = PointIndex<Index64, 1>;
161
162
164
165
169 template <typename T, template <typename...> class Template>
170 struct IsSpecializationOf: public std::false_type {};
171
172 template <typename... Args, template <typename...> class Template>
173 struct IsSpecializationOf<Template<Args...>, Template>: public std::true_type {};
174
175
177
178
179 template<typename T, bool = IsSpecializationOf<T, math::Vec2>::value ||
180 IsSpecializationOf<T, math::Vec3>::value ||
181 IsSpecializationOf<T, math::Vec4>::value>
182 struct VecTraits
183 {
184 static const bool IsVec = true;
185 static const int Size = T::size;
186 using ElementType = typename T::ValueType;
187 };
188
189 template<typename T>
190 struct VecTraits<T, false>
191 {
192 static const bool IsVec = false;
193 static const int Size = 1;
194 using ElementType = T;
195 };
196
197 template<typename T, bool = IsSpecializationOf<T, math::Quat>::value>
198 struct QuatTraits
199 {
200 static const bool IsQuat = true;
201 static const int Size = T::size;
202 using ElementType = typename T::ValueType;
203 };
204
205 template<typename T>
206 struct QuatTraits<T, false>
207 {
208 static const bool IsQuat = false;
209 static const int Size = 1;
210 using ElementType = T;
211 };
212
213 template<typename T, bool = IsSpecializationOf<T, math::Mat3>::value ||
214 IsSpecializationOf<T, math::Mat4>::value>
215 struct MatTraits
216 {
217 static const bool IsMat = true;
218 static const int Size = T::size;
219 using ElementType = typename T::ValueType;
220 };
221
222 template<typename T>
223 struct MatTraits<T, false>
224 {
225 static const bool IsMat = false;
226 static const int Size = 1;
227 using ElementType = T;
228 };
229
230 template<typename T, bool = VecTraits<T>::IsVec ||
231 QuatTraits<T>::IsQuat ||
232 MatTraits<T>::IsMat>
233 struct ValueTraits
234 {
235 static const bool IsVec = VecTraits<T>::IsVec;
236 static const bool IsQuat = QuatTraits<T>::IsQuat;
237 static const bool IsMat = MatTraits<T>::IsMat;
238 static const bool IsScalar = false;
239 static const int Size = T::size;
240 static const int Elements = IsMat ? Size*Size : Size;
241 using ElementType = typename T::ValueType;
242 };
243
244 template<typename T>
245 struct ValueTraits<T, false>
246 {
247 static const bool IsVec = false;
248 static const bool IsQuat = false;
249 static const bool IsMat = false;
250 static const bool IsScalar = true;
251 static const int Size = 1;
252 static const int Elements = 1;
253 using ElementType = T;
254 };
255
256
258
259
262 template<typename FromType, typename ToType>
263 struct CanConvertType { enum { value = std::is_constructible<ToType, FromType>::value }; };
264
265 // Specializations for vector types, which can be constructed from values
266 // of their own ValueTypes (or values that can be converted to their ValueTypes),
267 // but only explicitly
268 template<typename T> struct CanConvertType<T, math::Vec2<T> > { enum { value = true }; };
269 template<typename T> struct CanConvertType<T, math::Vec3<T> > { enum { value = true }; };
270 template<typename T> struct CanConvertType<T, math::Vec4<T> > { enum { value = true }; };
271 template<typename T> struct CanConvertType<math::Vec2<T>, math::Vec2<T> > { enum {value = true}; };
272 template<typename T> struct CanConvertType<math::Vec3<T>, math::Vec3<T> > { enum {value = true}; };
273 template<typename T> struct CanConvertType<math::Vec4<T>, math::Vec4<T> > { enum {value = true}; };
274 template<typename T0, typename T1>
275 struct CanConvertType<T0, math::Vec2<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
276 template<typename T0, typename T1>
277 struct CanConvertType<T0, math::Vec3<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
278 template<typename T0, typename T1>
279 struct CanConvertType<T0, math::Vec4<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
280 template<> struct CanConvertType<PointIndex32, PointDataIndex32> { enum {value = true}; };
281 template<> struct CanConvertType<PointDataIndex32, PointIndex32> { enum {value = true}; };
282 template<typename T>
283 struct CanConvertType<T, ValueMask> { enum {value = CanConvertType<T, bool>::value}; };
284 template<typename T>
285 struct CanConvertType<ValueMask, T> { enum {value = CanConvertType<bool, T>::value}; };
286
287
289
290
298 template<typename FromType, typename ToType> struct CopyConstness {
299 using Type = typename std::remove_const<ToType>::type;
300 };
301
303 template<typename FromType, typename ToType> struct CopyConstness<const FromType, ToType> {
304 using Type = const ToType;
305 };
307
308
310
311
312 // Add new items to the *end* of this list, and update NUM_GRID_CLASSES.
313 enum GridClass {
314 GRID_UNKNOWN = 0,
315 GRID_LEVEL_SET,
316 GRID_FOG_VOLUME,
317 GRID_STAGGERED
318 };
319 enum { NUM_GRID_CLASSES = GRID_STAGGERED + 1 };
320
321 static const Real LEVEL_SET_HALF_WIDTH = 3;
322
343 enum VecType {
344 VEC_INVARIANT = 0,
345 VEC_COVARIANT,
346 VEC_COVARIANT_NORMALIZE,
347 VEC_CONTRAVARIANT_RELATIVE,
348 VEC_CONTRAVARIANT_ABSOLUTE
349 };
350 enum { NUM_VEC_TYPES = VEC_CONTRAVARIANT_ABSOLUTE + 1 };
351
352
366 enum MergePolicy {
367 MERGE_ACTIVE_STATES = 0,
368 MERGE_NODES,
369 MERGE_ACTIVE_STATES_AND_NODES
370 };
371
372
374
375
376 template<typename T> const char* typeNameAsString() { return typeid(T).name(); }
377 template<> inline const char* typeNameAsString<bool>() { return "bool"; }
378 template<> inline const char* typeNameAsString<ValueMask>() { return "mask"; }
379 template<> inline const char* typeNameAsString<half>() { return "half"; }
380 template<> inline const char* typeNameAsString<float>() { return "float"; }
381 template<> inline const char* typeNameAsString<double>() { return "double"; }
382 template<> inline const char* typeNameAsString<int8_t>() { return "int8"; }
383 template<> inline const char* typeNameAsString<uint8_t>() { return "uint8"; }
384 template<> inline const char* typeNameAsString<int16_t>() { return "int16"; }
385 template<> inline const char* typeNameAsString<uint16_t>() { return "uint16"; }
386 template<> inline const char* typeNameAsString<int32_t>() { return "int32"; }
387 template<> inline const char* typeNameAsString<uint32_t>() { return "uint32"; }
388 template<> inline const char* typeNameAsString<int64_t>() { return "int64"; }
389 template<> inline const char* typeNameAsString<Vec2i>() { return "vec2i"; }
390 template<> inline const char* typeNameAsString<Vec2s>() { return "vec2s"; }
391 template<> inline const char* typeNameAsString<Vec2d>() { return "vec2d"; }
392 template<> inline const char* typeNameAsString<Vec3U8>() { return "vec3u8"; }
393 template<> inline const char* typeNameAsString<Vec3U16>() { return "vec3u16"; }
394 template<> inline const char* typeNameAsString<Vec3i>() { return "vec3i"; }
395 template<> inline const char* typeNameAsString<Vec3f>() { return "vec3s"; }
396 template<> inline const char* typeNameAsString<Vec3d>() { return "vec3d"; }
397 template<> inline const char* typeNameAsString<Vec4i>() { return "vec4i"; }
398 template<> inline const char* typeNameAsString<Vec4f>() { return "vec4s"; }
399 template<> inline const char* typeNameAsString<Vec4d>() { return "vec4d"; }
400 template<> inline const char* typeNameAsString<std::string>() { return "string"; }
401 template<> inline const char* typeNameAsString<Mat3s>() { return "mat3s"; }
402 template<> inline const char* typeNameAsString<Mat3d>() { return "mat3d"; }
403 template<> inline const char* typeNameAsString<Mat4s>() { return "mat4s"; }
404 template<> inline const char* typeNameAsString<Mat4d>() { return "mat4d"; }
405 template<> inline const char* typeNameAsString<math::Quats>() { return "quats"; }
406 template<> inline const char* typeNameAsString<math::Quatd>() { return "quatd"; }
407 template<> inline const char* typeNameAsString<PointIndex32>() { return "ptidx32"; }
408 template<> inline const char* typeNameAsString<PointIndex64>() { return "ptidx64"; }
409 template<> inline const char* typeNameAsString<PointDataIndex32>() { return "ptdataidx32"; }
410 template<> inline const char* typeNameAsString<PointDataIndex64>() { return "ptdataidx64"; }
411
412
414
415
427 template<typename AValueType, typename BValueType = AValueType>
428 class CombineArgs
429 {
430 public:
431 using AValueT = AValueType;
432 using BValueT = BValueType;
433
434 CombineArgs()
435 : mAValPtr(nullptr)
436 , mBValPtr(nullptr)
437 , mResultValPtr(&mResultVal)
438 , mAIsActive(false)
439 , mBIsActive(false)
440 , mResultIsActive(false)
441 {
442 }
443
445 CombineArgs(const AValueType& a, const BValueType& b, AValueType& result,
446 bool aOn = false, bool bOn = false)
447 : mAValPtr(&a)
448 , mBValPtr(&b)
449 , mResultValPtr(&result)
450 , mAIsActive(aOn)
451 , mBIsActive(bOn)
452 {
453 this->updateResultActive();
454 }
455
457 CombineArgs(const AValueType& a, const BValueType& b, bool aOn = false, bool bOn = false)
458 : mAValPtr(&a)
459 , mBValPtr(&b)
460 , mResultValPtr(&mResultVal)
461 , mAIsActive(aOn)
462 , mBIsActive(bOn)
463 {
464 this->updateResultActive();
465 }
466
468 const AValueType& a() const { return *mAValPtr; }
470 const BValueType& b() const { return *mBValPtr; }
472 const AValueType& result() const { return *mResultValPtr; }
474 AValueType& result() { return *mResultValPtr; }
476
478 CombineArgs& setResult(const AValueType& val) { *mResultValPtr = val; return *this; }
479
481 CombineArgs& setARef(const AValueType& a) { mAValPtr = &a; return *this; }
483 CombineArgs& setBRef(const BValueType& b) { mBValPtr = &b; return *this; }
485 CombineArgs& setResultRef(AValueType& val) { mResultValPtr = &val; return *this; }
486
488 bool aIsActive() const { return mAIsActive; }
490 bool bIsActive() const { return mBIsActive; }
492 bool resultIsActive() const { return mResultIsActive; }
493
495 CombineArgs& setAIsActive(bool b) { mAIsActive = b; updateResultActive(); return *this; }
497 CombineArgs& setBIsActive(bool b) { mBIsActive = b; updateResultActive(); return *this; }
499 CombineArgs& setResultIsActive(bool b) { mResultIsActive = b; return *this; }
500
501 protected:
504 void updateResultActive() { mResultIsActive = mAIsActive || mBIsActive; }
505
506 const AValueType* mAValPtr; // pointer to input value from A grid
507 const BValueType* mBValPtr; // pointer to input value from B grid
508 AValueType mResultVal; // computed output value (unused if stored externally)
509 AValueType* mResultValPtr; // pointer to either mResultVal or an external value
510 bool mAIsActive, mBIsActive; // active states of A and B values
511 bool mResultIsActive; // computed active state (default: A active || B active)
512 };
513
514
518 template<typename ValueType, typename CombineOp>
519 struct SwappedCombineOp
520 {
521 SwappedCombineOp(CombineOp& _op): op(_op) {}
522
523 void operator()(CombineArgs<ValueType>& args)
524 {
525 CombineArgs<ValueType> swappedArgs(args.b(), args.a(), args.result(),
526 args.bIsActive(), args.aIsActive());
527 op(swappedArgs);
528 }
529
530 CombineOp& op;
531 };
532
533
535
536
539 class ShallowCopy {};
542 class TopologyCopy {};
544 class DeepCopy {};
546 class Steal {};
548 class PartialCreate {};
549
550 } // namespace OPENVDB_VERSION_NAME
551 } // namespace openvdb
552
553
554 #endif // OPENVDB_TYPES_HAS_BEEN_INCLUDED
openvdb::v8_2::typeNameAsString< Vec3d >
const char * typeNameAsString< Vec3d >()
Definition: openvdb/Types.h:396
openvdb::v8_2::math::Mat3
3x3 matrix class.
Definition: Mat3.h:29
openvdb::v8_2::CombineArgs::setARef
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: openvdb/Types.h:481
openvdb::v8_2::MatTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:219
openvdb::v8_2::typeNameAsString< PointDataIndex32 >
const char * typeNameAsString< PointDataIndex32 >()
Definition: openvdb/Types.h:409
openvdb::v8_2::NUM_GRID_CLASSES
@ NUM_GRID_CLASSES
Definition: openvdb/Types.h:319
openvdb::v8_2::CombineArgs::BValueT
BValueType BValueT
Definition: openvdb/Types.h:432
openvdb::v8_2::CombineArgs::CombineArgs
CombineArgs(const AValueType &a, const BValueType &b, AValueType &result, bool aOn=false, bool bOn=false)
Use this constructor when the result value is stored externally.
Definition: openvdb/Types.h:445
openvdb::v8_2::SwappedCombineOp::operator()
void operator()(CombineArgs< ValueType > &args)
Definition: openvdb/Types.h:523
openvdb::v8_2::VEC_INVARIANT
@ VEC_INVARIANT
Definition: openvdb/Types.h:344
openvdb::v8_2::math::Coord
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:26
openvdb::v8_2::typeNameAsString< int32_t >
const char * typeNameAsString< int32_t >()
Definition: openvdb/Types.h:386
openvdb::v8_2::MERGE_ACTIVE_STATES
@ MERGE_ACTIVE_STATES
Definition: openvdb/Types.h:367
openvdb::v8_2::math::Mat3s
Mat3< float > Mat3s
Definition: Mat3.h:847
openvdb::v8_2::PointIndex::PointIndex
PointIndex(IntType i=IntType(0))
Definition: openvdb/Types.h:140
openvdb::v8_2::StaticPtrCast
SharedPtr< T > StaticPtrCast(const SharedPtr< U > &ptr)
Return a new shared pointer that points to the same object as the given pointer after a static_cast.
Definition: openvdb/Types.h:124
openvdb::v8_2::CombineArgs::setResultIsActive
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: openvdb/Types.h:499
openvdb::v8_2::DynamicPtrCast
SharedPtr< T > DynamicPtrCast(const SharedPtr< U > &ptr)
Return a new shared pointer that is either null or points to the same object as the given pointer aft...
Definition: openvdb/Types.h:114
openvdb::v8_2::CombineArgs::mBValPtr
const BValueType * mBValPtr
Definition: openvdb/Types.h:507
openvdb::v8_2::CombineArgs::setBRef
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: openvdb/Types.h:483
openvdb::v8_2::math::Mat4d
Mat4< double > Mat4d
Definition: Mat4.h:1368
openvdb::v8_2::ShallowCopy
Tag dispatch class that distinguishes shallow copy constructors from deep copy constructors.
Definition: openvdb/Types.h:539
openvdb::v8_2::DeepCopy
Tag dispatch class that distinguishes constructors that deep copy.
Definition: openvdb/Types.h:544
openvdb::v8_2::math::Quatd
Quat< double > Quatd
Definition: Quat.h:626
openvdb::v8_2::VecTraits
Definition: openvdb/Types.h:183
openvdb::v8_2::VecType
VecType
Definition: openvdb/Types.h:343
openvdb::v8_2::CombineArgs::CombineArgs
CombineArgs()
Definition: openvdb/Types.h:434
openvdb::v8_2::typeNameAsString< int64_t >
const char * typeNameAsString< int64_t >()
Definition: openvdb/Types.h:388
openvdb::v8_2::Int
Int32 Int
Definition: openvdb/Types.h:36
openvdb::v8_2::PointIndex::operator+
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: openvdb/Types.h:149
openvdb::v8_2::Int32
int32_t Int32
Definition: openvdb/Types.h:34
openvdb::v8_2::typeNameAsString
const char * typeNameAsString()
Definition: openvdb/Types.h:376
openvdb::v8_2::MergePolicy
MergePolicy
Definition: openvdb/Types.h:366
openvdb::v8_2::CombineArgs::aIsActive
bool aIsActive() const
Definition: openvdb/Types.h:488
openvdb::v8_2::math::Vec4
Definition: Vec4.h:25
openvdb::v8_2::CombineArgs::result
const AValueType & result() const
Get the output value.
Definition: openvdb/Types.h:473
openvdb::v8_2::math::Mat3d
Mat3< double > Mat3d
Definition: Mat3.h:848
openvdb::v8_2::Index
Index32 Index
Definition: openvdb/Types.h:32
openvdb::v8_2::PointIndex
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: openvdb/Types.h:135
openvdb::v8_2::IsSpecializationOf
Helper metafunction used to determine if the first template parameter is a specialization of the clas...
Definition: openvdb/Types.h:170
openvdb::v8_2::CombineArgs::CombineArgs
CombineArgs(const AValueType &a, const BValueType &b, bool aOn=false, bool bOn=false)
Use this constructor when the result value should be stored in this struct.
Definition: openvdb/Types.h:457
openvdb::v8_2::CombineArgs::resultIsActive
bool resultIsActive() const
Definition: openvdb/Types.h:492
version.h
Library and file format version numbers.
openvdb::v8_2::CombineArgs::mBIsActive
bool mBIsActive
Definition: openvdb/Types.h:510
openvdb::v8_2::MERGE_ACTIVE_STATES_AND_NODES
@ MERGE_ACTIVE_STATES_AND_NODES
Definition: openvdb/Types.h:369
openvdb::v8_2::math::Vec3i
Vec3< int32_t > Vec3i
Definition: Vec3.h:665
openvdb::v8_2::typeNameAsString< Mat3s >
const char * typeNameAsString< Mat3s >()
Definition: openvdb/Types.h:401
openvdb::v8_2::TopologyCopy
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: openvdb/Types.h:542
openvdb::v8_2::CombineArgs::mResultIsActive
bool mResultIsActive
Definition: openvdb/Types.h:511
openvdb::v8_2::typeNameAsString< Mat4s >
const char * typeNameAsString< Mat4s >()
Definition: openvdb/Types.h:403
openvdb::v8_2::typeNameAsString< Vec2d >
const char * typeNameAsString< Vec2d >()
Definition: openvdb/Types.h:391
openvdb::v8_2::CombineArgs::b
const BValueType & b() const
Get the B input value.
Definition: openvdb/Types.h:470
Platform.h
openvdb::v8_2::PointIndex::PointIndex
PointIndex(T i)
Explicit type conversion constructor.
Definition: openvdb/Types.h:143
Vec4.h
openvdb::v8_2::typeNameAsString< Mat4d >
const char * typeNameAsString< Mat4d >()
Definition: openvdb/Types.h:404
openvdb::v8_2::CombineArgs::mAValPtr
const AValueType * mAValPtr
Definition: openvdb/Types.h:506
openvdb::v8_2::typeNameAsString< Vec3i >
const char * typeNameAsString< Vec3i >()
Definition: openvdb/Types.h:394
openvdb::v8_2::GRID_LEVEL_SET
@ GRID_LEVEL_SET
Definition: openvdb/Types.h:315
openvdb::v8_2::WeakPtr
std::weak_ptr< T > WeakPtr
Definition: openvdb/Types.h:93
Vec2.h
openvdb::v8_2::math::Vec3< Real >
openvdb::v8_2::QuatTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:210
openvdb::v8_2::math::Vec4i
Vec4< int32_t > Vec4i
Definition: Vec4.h:563
openvdb::v8_2::PointIndex::IntType
IntType_ IntType
Definition: openvdb/Types.h:138
openvdb::v8_2::SwappedCombineOp
Definition: openvdb/Types.h:520
Vec3.h
openvdb::v8_2::VEC_COVARIANT
@ VEC_COVARIANT
Definition: openvdb/Types.h:345
openvdb::v8_2::CombineArgs::setAIsActive
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition: openvdb/Types.h:495
openvdb::v8_2::typeNameAsString< int16_t >
const char * typeNameAsString< int16_t >()
Definition: openvdb/Types.h:384
openvdb::v8_2::Byte
unsigned char Byte
Definition: openvdb/Types.h:37
openvdb::v8_2::typeNameAsString< Vec3f >
const char * typeNameAsString< Vec3f >()
Definition: openvdb/Types.h:395
openvdb::v8_2::ValueTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:241
Math.h
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
openvdb::v8_2::CombineArgs::updateResultActive
void updateResultActive()
Definition: openvdb/Types.h:504
openvdb::v8_2::CanConvertType
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: openvdb/Types.h:263
openvdb::v8_2::Int64
int64_t Int64
Definition: openvdb/Types.h:35
openvdb::v8_2::math::Vec4d
Vec4< double > Vec4d
Definition: Vec4.h:566
openvdb::v8_2::SharedPtr
std::shared_ptr< T > SharedPtr
Definition: openvdb/Types.h:92
openvdb::v8_2::Real
double Real
Definition: openvdb/Types.h:38
openvdb::v8_2::math::BBox< Vec3d >
openvdb::v8_2::math::Vec2d
Vec2< double > Vec2d
Definition: Vec2.h:537
openvdb::v8_2::VecTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:186
openvdb::v8_2::math::Mat4s
Mat4< float > Mat4s
Definition: Mat4.h:1367
openvdb::v8_2::MatTraits
Definition: openvdb/Types.h:216
openvdb::v8_2::MERGE_NODES
@ MERGE_NODES
Definition: openvdb/Types.h:368
openvdb::v8_2::LEVEL_SET_HALF_WIDTH
static const Real LEVEL_SET_HALF_WIDTH
Definition: openvdb/Types.h:321
openvdb::v8_2::typeNameAsString< Vec2s >
const char * typeNameAsString< Vec2s >()
Definition: openvdb/Types.h:390
Mat4.h
openvdb::v8_2::VEC_CONTRAVARIANT_RELATIVE
@ VEC_CONTRAVARIANT_RELATIVE
Definition: openvdb/Types.h:347
openvdb::v8_2::CombineArgs
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: openvdb/Types.h:429
openvdb::v8_2::typeNameAsString< uint32_t >
const char * typeNameAsString< uint32_t >()
Definition: openvdb/Types.h:387
openvdb::v8_2::QuatTraits
Definition: openvdb/Types.h:199
openvdb::v8_2::CombineArgs::mResultValPtr
AValueType * mResultValPtr
Definition: openvdb/Types.h:509
TypeList.h
A TypeList provides a compile time sequence of heterogeneous types which can be accessed,...
openvdb::v8_2::typeNameAsString< uint8_t >
const char * typeNameAsString< uint8_t >()
Definition: openvdb/Types.h:383
openvdb::v8_2::CombineArgs::mResultVal
AValueType mResultVal
Definition: openvdb/Types.h:508
openvdb::v8_2::typeNameAsString< PointIndex32 >
const char * typeNameAsString< PointIndex32 >()
Definition: openvdb/Types.h:407
openvdb::v8_2::SwappedCombineOp::op
CombineOp & op
Definition: openvdb/Types.h:530
openvdb::v8_2::typeNameAsString< float >
const char * typeNameAsString< float >()
Definition: openvdb/Types.h:380
openvdb::v8_2::math::Vec2s
Vec2< float > Vec2s
Definition: Vec2.h:536
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:153
openvdb::v8_2::GRID_STAGGERED
@ GRID_STAGGERED
Definition: openvdb/Types.h:317
openvdb::v8_2::CombineArgs::setResultRef
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: openvdb/Types.h:485
openvdb::v8_2::CombineArgs::a
const AValueType & a() const
Get the A input value.
Definition: openvdb/Types.h:468
openvdb::v8_2::Int16
int16_t Int16
Definition: openvdb/Types.h:33
Mat3.h
openvdb::v8_2::math::Vec3d
Vec3< double > Vec3d
Definition: Vec3.h:668
openvdb::v8_2::ValueTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:253
Quat.h
openvdb::v8_2::typeNameAsString< uint16_t >
const char * typeNameAsString< uint16_t >()
Definition: openvdb/Types.h:385
openvdb::v8_2::QuatTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:202
openvdb::v8_2::CombineArgs::setResult
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: openvdb/Types.h:478
openvdb::v8_2::GridClass
GridClass
Definition: openvdb/Types.h:313
openvdb::v8_2::typeNameAsString< Mat3d >
const char * typeNameAsString< Mat3d >()
Definition: openvdb/Types.h:402
openvdb::v8_2::math::Vec3s
Vec3< float > Vec3s
Definition: Vec3.h:667
openvdb::v8_2::typeNameAsString< bool >
const char * typeNameAsString< bool >()
Definition: openvdb/Types.h:377
openvdb::v8_2::CopyConstness
CopyConstness<T1, T2>::Type is either const T2 or T2 with no const qualifier, depending on whether T1...
Definition: openvdb/Types.h:298
openvdb::v8_2::ValueTraits
Definition: openvdb/Types.h:234
openvdb::v8_2::typeNameAsString< Vec4i >
const char * typeNameAsString< Vec4i >()
Definition: openvdb/Types.h:397
openvdb::v8_2::typeNameAsString< Vec4f >
const char * typeNameAsString< Vec4f >()
Definition: openvdb/Types.h:398
openvdb::v8_2::NUM_VEC_TYPES
@ NUM_VEC_TYPES
Definition: openvdb/Types.h:350
openvdb::v8_2::Index32
uint32_t Index32
Definition: openvdb/Types.h:30
openvdb::v8_2::typeNameAsString< Vec3U16 >
const char * typeNameAsString< Vec3U16 >()
Definition: openvdb/Types.h:393
openvdb::v8_2::CombineArgs::result
AValueType & result()
Definition: openvdb/Types.h:474
openvdb::v8_2::MatTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:227
openvdb::v8_2::GRID_FOG_VOLUME
@ GRID_FOG_VOLUME
Definition: openvdb/Types.h:316
openvdb::v8_2::math::Vec2i
Vec2< int32_t > Vec2i
Definition: Vec2.h:534
openvdb::v8_2::math::Mat4< Real >
openvdb::v8_2::typeNameAsString< half >
const char * typeNameAsString< half >()
Definition: openvdb/Types.h:379
openvdb::v8_2::Index64
uint64_t Index64
Definition: openvdb/Types.h:31
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:101
openvdb::v8_2::math::Quat
Definition: Quat.h:79
openvdb::v8_2::CombineArgs::AValueT
AValueType AValueT
Definition: openvdb/Types.h:431
openvdb::v8_2::GRID_UNKNOWN
@ GRID_UNKNOWN
Definition: openvdb/Types.h:314
openvdb::v8_2::math::Quats
Quat< float > Quats
Definition: Quat.h:625
openvdb::v8_2::math::CoordBBox
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:249
openvdb::v8_2::VEC_CONTRAVARIANT_ABSOLUTE
@ VEC_CONTRAVARIANT_ABSOLUTE
Definition: openvdb/Types.h:348
openvdb::v8_2::CombineArgs::bIsActive
bool bIsActive() const
Definition: openvdb/Types.h:490
BBox.h
openvdb::v8_2::typeNameAsString< Vec3U8 >
const char * typeNameAsString< Vec3U8 >()
Definition: openvdb/Types.h:392
openvdb::v8_2::ValueMask
Definition: openvdb/Types.h:89
openvdb::v8_2::ConstPtrCast
SharedPtr< T > ConstPtrCast(const SharedPtr< U > &ptr)
Return a new shared pointer that points to the same object as the given pointer but with possibly dif...
Definition: openvdb/Types.h:104
openvdb::v8_2::VEC_COVARIANT_NORMALIZE
@ VEC_COVARIANT_NORMALIZE
Definition: openvdb/Types.h:346
openvdb::v8_2::typeNameAsString< Vec4d >
const char * typeNameAsString< Vec4d >()
Definition: openvdb/Types.h:399
openvdb
Definition: openvdb/Exceptions.h:13
openvdb::v8_2::typeNameAsString< ValueMask >
const char * typeNameAsString< ValueMask >()
Definition: openvdb/Types.h:378
openvdb::v8_2::Steal
Tag dispatch class that distinguishes constructors that steal.
Definition: openvdb/Types.h:546
openvdb::v8_2::SwappedCombineOp::SwappedCombineOp
SwappedCombineOp(CombineOp &_op)
Definition: openvdb/Types.h:521
openvdb::v8_2::math::Vec2
Definition: Vec2.h:24
openvdb::v8_2::typeNameAsString< int8_t >
const char * typeNameAsString< int8_t >()
Definition: openvdb/Types.h:382
openvdb::v8_2::typeNameAsString< PointIndex64 >
const char * typeNameAsString< PointIndex64 >()
Definition: openvdb/Types.h:408
openvdb::v8_2::typeNameAsString< double >
const char * typeNameAsString< double >()
Definition: openvdb/Types.h:381
openvdb::v8_2::math::Vec4s
Vec4< float > Vec4s
Definition: Vec4.h:565
openvdb::v8_2::VecTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:194
openvdb::v8_2::CombineArgs::setBIsActive
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: openvdb/Types.h:497
openvdb::v8_2::typeNameAsString< PointDataIndex64 >
const char * typeNameAsString< PointDataIndex64 >()
Definition: openvdb/Types.h:410
openvdb::v8_2::CopyConstness::Type
typename std::remove_const< ToType >::type Type
Definition: openvdb/Types.h:299
openvdb::v8_2::typeNameAsString< Vec2i >
const char * typeNameAsString< Vec2i >()
Definition: openvdb/Types.h:389
openvdb::v8_2::PartialCreate
Tag dispatch class that distinguishes constructors during file input.
Definition: openvdb/Types.h:548
Coord.h