OpenVDB: Types.h Source File

OpenVDB 8.1.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
11 #ifdef OPENVDB_USE_IMATH_HALF
12 #include <OpenEXR/half.h>
13 namespace openvdb {
14 OPENVDB_USE_VERSION_NAMESPACE
15 namespace OPENVDB_VERSION_NAME {
16 namespace math {
17 using half = half;
18 }}}
19 #else
20 #include <openvdb/math/Half.h>
21 namespace openvdb {
22 OPENVDB_USE_VERSION_NAMESPACE
23 namespace OPENVDB_VERSION_NAME {
24 namespace math {
25 using half = internal::half;
26 }}}
27 #endif
28
29 #include <openvdb/math/Math.h>
30 #include <openvdb/math/BBox.h>
31 #include <openvdb/math/Quat.h>
32 #include <openvdb/math/Vec2.h>
33 #include <openvdb/math/Vec3.h>
34 #include <openvdb/math/Vec4.h>
35 #include <openvdb/math/Mat3.h>
36 #include <openvdb/math/Mat4.h>
37 #include <openvdb/math/Coord.h>
38 #include <cstdint>
39 #include <memory>
40 #include <type_traits>
41
42
43 namespace openvdb {
44 OPENVDB_USE_VERSION_NAMESPACE
45 namespace OPENVDB_VERSION_NAME {
46
47 // One-dimensional scalar types
48 using Index32 = uint32_t;
49 using Index64 = uint64_t;
50 using Index = Index32;
51 using Int16 = int16_t;
52 using Int32 = int32_t;
53 using Int64 = int64_t;
54 using Int = Int32;
55 using Byte = unsigned char;
56 using Real = double;
57
58 // Two-dimensional vector types
59 using Vec2R = math::Vec2<Real>;
60 using Vec2I = math::Vec2<Index32>;
61 using Vec2f = math::Vec2<float>;
62 using Vec2H = math::Vec2<math::half>;
63 using math::Vec2i;
64 using math::Vec2s;
65 using math::Vec2d;
66
67 // Three-dimensional vector types
68 using Vec3R = math::Vec3<Real>;
69 using Vec3I = math::Vec3<Index32>;
70 using Vec3f = math::Vec3<float>;
71 using Vec3H = math::Vec3<math::half>;
72 using Vec3U8 = math::Vec3<uint8_t>;
73 using Vec3U16 = math::Vec3<uint16_t>;
74 using math::Vec3i;
75 using math::Vec3s;
76 using math::Vec3d;
77
78 using math::Coord;
79 using math::CoordBBox;
80 using BBoxd = math::BBox<Vec3d>;
81
82 // Four-dimensional vector types
83 using Vec4R = math::Vec4<Real>;
84 using Vec4I = math::Vec4<Index32>;
85 using Vec4f = math::Vec4<float>;
86 using Vec4H = math::Vec4<math::half>;
87 using math::Vec4i;
88 using math::Vec4s;
89 using math::Vec4d;
90
91 // Three-dimensional matrix types
92 using Mat3R = math::Mat3<Real>;
93 using math::Mat3s;
94 using math::Mat3d;
95
96 // Four-dimensional matrix types
97 using Mat4R = math::Mat4<Real>;
98 using math::Mat4s;
99 using math::Mat4d;
100
101 // Quaternions
102 using QuatR = math::Quat<Real>;
103 using math::Quats;
104 using math::Quatd;
105
106 // Dummy type for a voxel with a binary mask value, e.g. the active state
107 class ValueMask {};
108
109 // Use STL shared pointers from OpenVDB 4 on.
110 template<typename T> using SharedPtr = std::shared_ptr<T>;
111 template<typename T> using WeakPtr = std::weak_ptr<T>;
112
121 template<typename T, typename U> inline SharedPtr<T>
122 ConstPtrCast(const SharedPtr<U>& ptr) { return std::const_pointer_cast<T, U>(ptr); }
123
131 template<typename T, typename U> inline SharedPtr<T>
132 DynamicPtrCast(const SharedPtr<U>& ptr) { return std::dynamic_pointer_cast<T, U>(ptr); }
133
141 template<typename T, typename U> inline SharedPtr<T>
142 StaticPtrCast(const SharedPtr<U>& ptr) { return std::static_pointer_cast<T, U>(ptr); }
143
144
146
147
151 template<typename IntType_, Index Kind>
152 struct PointIndex
153 {
154 static_assert(std::is_integral<IntType_>::value, "PointIndex requires an integer value type");
155
156 using IntType = IntType_;
157
158 PointIndex(IntType i = IntType(0)): mIndex(i) {}
159
161 template<typename T> explicit PointIndex(T i): mIndex(static_cast<IntType>(i)) {}
162
163 operator IntType() const { return mIndex; }
164
166 template<typename T>
167 PointIndex operator+(T x) { return PointIndex(mIndex + IntType(x)); }
168
169 private:
170 IntType mIndex;
171 };
172
173
174 using PointIndex32 = PointIndex<Index32, 0>;
175 using PointIndex64 = PointIndex<Index64, 0>;
176
177 using PointDataIndex32 = PointIndex<Index32, 1>;
178 using PointDataIndex64 = PointIndex<Index64, 1>;
179
180
182
183
187 template <typename T, template <typename...> class Template>
188 struct IsSpecializationOf: public std::false_type {};
189
190 template <typename... Args, template <typename...> class Template>
191 struct IsSpecializationOf<Template<Args...>, Template>: public std::true_type {};
192
193
195
196
197 template<typename T, bool = IsSpecializationOf<T, math::Vec2>::value ||
198 IsSpecializationOf<T, math::Vec3>::value ||
199 IsSpecializationOf<T, math::Vec4>::value>
200 struct VecTraits
201 {
202 static const bool IsVec = true;
203 static const int Size = T::size;
204 using ElementType = typename T::ValueType;
205 };
206
207 template<typename T>
208 struct VecTraits<T, false>
209 {
210 static const bool IsVec = false;
211 static const int Size = 1;
212 using ElementType = T;
213 };
214
215 template<typename T, bool = IsSpecializationOf<T, math::Quat>::value>
216 struct QuatTraits
217 {
218 static const bool IsQuat = true;
219 static const int Size = T::size;
220 using ElementType = typename T::ValueType;
221 };
222
223 template<typename T>
224 struct QuatTraits<T, false>
225 {
226 static const bool IsQuat = false;
227 static const int Size = 1;
228 using ElementType = T;
229 };
230
231 template<typename T, bool = IsSpecializationOf<T, math::Mat3>::value ||
232 IsSpecializationOf<T, math::Mat4>::value>
233 struct MatTraits
234 {
235 static const bool IsMat = true;
236 static const int Size = T::size;
237 using ElementType = typename T::ValueType;
238 };
239
240 template<typename T>
241 struct MatTraits<T, false>
242 {
243 static const bool IsMat = false;
244 static const int Size = 1;
245 using ElementType = T;
246 };
247
248 template<typename T, bool = VecTraits<T>::IsVec ||
249 QuatTraits<T>::IsQuat ||
250 MatTraits<T>::IsMat>
251 struct ValueTraits
252 {
253 static const bool IsVec = VecTraits<T>::IsVec;
254 static const bool IsQuat = QuatTraits<T>::IsQuat;
255 static const bool IsMat = MatTraits<T>::IsMat;
256 static const bool IsScalar = false;
257 static const int Size = T::size;
258 static const int Elements = IsMat ? Size*Size : Size;
259 using ElementType = typename T::ValueType;
260 };
261
262 template<typename T>
263 struct ValueTraits<T, false>
264 {
265 static const bool IsVec = false;
266 static const bool IsQuat = false;
267 static const bool IsMat = false;
268 static const bool IsScalar = true;
269 static const int Size = 1;
270 static const int Elements = 1;
271 using ElementType = T;
272 };
273
274
276
277
280 template<typename FromType, typename ToType>
281 struct CanConvertType { enum { value = std::is_constructible<ToType, FromType>::value }; };
282
283 // Specializations for vector types, which can be constructed from values
284 // of their own ValueTypes (or values that can be converted to their ValueTypes),
285 // but only explicitly
286 template<typename T> struct CanConvertType<T, math::Vec2<T> > { enum { value = true }; };
287 template<typename T> struct CanConvertType<T, math::Vec3<T> > { enum { value = true }; };
288 template<typename T> struct CanConvertType<T, math::Vec4<T> > { enum { value = true }; };
289 template<typename T> struct CanConvertType<math::Vec2<T>, math::Vec2<T> > { enum {value = true}; };
290 template<typename T> struct CanConvertType<math::Vec3<T>, math::Vec3<T> > { enum {value = true}; };
291 template<typename T> struct CanConvertType<math::Vec4<T>, math::Vec4<T> > { enum {value = true}; };
292 template<typename T0, typename T1>
293 struct CanConvertType<T0, math::Vec2<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
294 template<typename T0, typename T1>
295 struct CanConvertType<T0, math::Vec3<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
296 template<typename T0, typename T1>
297 struct CanConvertType<T0, math::Vec4<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
298 template<> struct CanConvertType<PointIndex32, PointDataIndex32> { enum {value = true}; };
299 template<> struct CanConvertType<PointDataIndex32, PointIndex32> { enum {value = true}; };
300 template<typename T>
301 struct CanConvertType<T, ValueMask> { enum {value = CanConvertType<T, bool>::value}; };
302 template<typename T>
303 struct CanConvertType<ValueMask, T> { enum {value = CanConvertType<bool, T>::value}; };
304
305
307
308
316 template<typename FromType, typename ToType> struct CopyConstness {
317 using Type = typename std::remove_const<ToType>::type;
318 };
319
321 template<typename FromType, typename ToType> struct CopyConstness<const FromType, ToType> {
322 using Type = const ToType;
323 };
325
326
328
329
330 // Add new items to the *end* of this list, and update NUM_GRID_CLASSES.
331 enum GridClass {
332 GRID_UNKNOWN = 0,
333 GRID_LEVEL_SET,
334 GRID_FOG_VOLUME,
335 GRID_STAGGERED
336 };
337 enum { NUM_GRID_CLASSES = GRID_STAGGERED + 1 };
338
339 static const Real LEVEL_SET_HALF_WIDTH = 3;
340
361 enum VecType {
362 VEC_INVARIANT = 0,
363 VEC_COVARIANT,
364 VEC_COVARIANT_NORMALIZE,
365 VEC_CONTRAVARIANT_RELATIVE,
366 VEC_CONTRAVARIANT_ABSOLUTE
367 };
368 enum { NUM_VEC_TYPES = VEC_CONTRAVARIANT_ABSOLUTE + 1 };
369
370
384 enum MergePolicy {
385 MERGE_ACTIVE_STATES = 0,
386 MERGE_NODES,
387 MERGE_ACTIVE_STATES_AND_NODES
388 };
389
390
392
393
394 template<typename T> const char* typeNameAsString() { return typeid(T).name(); }
395 template<> inline const char* typeNameAsString<bool>() { return "bool"; }
396 template<> inline const char* typeNameAsString<ValueMask>() { return "mask"; }
397 template<> inline const char* typeNameAsString<math::half>() { return "half"; }
398 template<> inline const char* typeNameAsString<float>() { return "float"; }
399 template<> inline const char* typeNameAsString<double>() { return "double"; }
400 template<> inline const char* typeNameAsString<int8_t>() { return "int8"; }
401 template<> inline const char* typeNameAsString<uint8_t>() { return "uint8"; }
402 template<> inline const char* typeNameAsString<int16_t>() { return "int16"; }
403 template<> inline const char* typeNameAsString<uint16_t>() { return "uint16"; }
404 template<> inline const char* typeNameAsString<int32_t>() { return "int32"; }
405 template<> inline const char* typeNameAsString<uint32_t>() { return "uint32"; }
406 template<> inline const char* typeNameAsString<int64_t>() { return "int64"; }
407 template<> inline const char* typeNameAsString<Vec2i>() { return "vec2i"; }
408 template<> inline const char* typeNameAsString<Vec2s>() { return "vec2s"; }
409 template<> inline const char* typeNameAsString<Vec2d>() { return "vec2d"; }
410 template<> inline const char* typeNameAsString<Vec3U8>() { return "vec3u8"; }
411 template<> inline const char* typeNameAsString<Vec3U16>() { return "vec3u16"; }
412 template<> inline const char* typeNameAsString<Vec3i>() { return "vec3i"; }
413 template<> inline const char* typeNameAsString<Vec3f>() { return "vec3s"; }
414 template<> inline const char* typeNameAsString<Vec3d>() { return "vec3d"; }
415 template<> inline const char* typeNameAsString<Vec4i>() { return "vec4i"; }
416 template<> inline const char* typeNameAsString<Vec4f>() { return "vec4s"; }
417 template<> inline const char* typeNameAsString<Vec4d>() { return "vec4d"; }
418 template<> inline const char* typeNameAsString<std::string>() { return "string"; }
419 template<> inline const char* typeNameAsString<Mat3s>() { return "mat3s"; }
420 template<> inline const char* typeNameAsString<Mat3d>() { return "mat3d"; }
421 template<> inline const char* typeNameAsString<Mat4s>() { return "mat4s"; }
422 template<> inline const char* typeNameAsString<Mat4d>() { return "mat4d"; }
423 template<> inline const char* typeNameAsString<math::Quats>() { return "quats"; }
424 template<> inline const char* typeNameAsString<math::Quatd>() { return "quatd"; }
425 template<> inline const char* typeNameAsString<PointIndex32>() { return "ptidx32"; }
426 template<> inline const char* typeNameAsString<PointIndex64>() { return "ptidx64"; }
427 template<> inline const char* typeNameAsString<PointDataIndex32>() { return "ptdataidx32"; }
428 template<> inline const char* typeNameAsString<PointDataIndex64>() { return "ptdataidx64"; }
429
430
432
433
445 template<typename AValueType, typename BValueType = AValueType>
446 class CombineArgs
447 {
448 public:
449 using AValueT = AValueType;
450 using BValueT = BValueType;
451
452 CombineArgs()
453 : mAValPtr(nullptr)
454 , mBValPtr(nullptr)
455 , mResultValPtr(&mResultVal)
456 , mAIsActive(false)
457 , mBIsActive(false)
458 , mResultIsActive(false)
459 {
460 }
461
463 CombineArgs(const AValueType& a, const BValueType& b, AValueType& result,
464 bool aOn = false, bool bOn = false)
465 : mAValPtr(&a)
466 , mBValPtr(&b)
467 , mResultValPtr(&result)
468 , mAIsActive(aOn)
469 , mBIsActive(bOn)
470 {
471 this->updateResultActive();
472 }
473
475 CombineArgs(const AValueType& a, const BValueType& b, bool aOn = false, bool bOn = false)
476 : mAValPtr(&a)
477 , mBValPtr(&b)
478 , mResultValPtr(&mResultVal)
479 , mAIsActive(aOn)
480 , mBIsActive(bOn)
481 {
482 this->updateResultActive();
483 }
484
486 const AValueType& a() const { return *mAValPtr; }
488 const BValueType& b() const { return *mBValPtr; }
490 const AValueType& result() const { return *mResultValPtr; }
492 AValueType& result() { return *mResultValPtr; }
494
496 CombineArgs& setResult(const AValueType& val) { *mResultValPtr = val; return *this; }
497
499 CombineArgs& setARef(const AValueType& a) { mAValPtr = &a; return *this; }
501 CombineArgs& setBRef(const BValueType& b) { mBValPtr = &b; return *this; }
503 CombineArgs& setResultRef(AValueType& val) { mResultValPtr = &val; return *this; }
504
506 bool aIsActive() const { return mAIsActive; }
508 bool bIsActive() const { return mBIsActive; }
510 bool resultIsActive() const { return mResultIsActive; }
511
513 CombineArgs& setAIsActive(bool b) { mAIsActive = b; updateResultActive(); return *this; }
515 CombineArgs& setBIsActive(bool b) { mBIsActive = b; updateResultActive(); return *this; }
517 CombineArgs& setResultIsActive(bool b) { mResultIsActive = b; return *this; }
518
519 protected:
522 void updateResultActive() { mResultIsActive = mAIsActive || mBIsActive; }
523
524 const AValueType* mAValPtr; // pointer to input value from A grid
525 const BValueType* mBValPtr; // pointer to input value from B grid
526 AValueType mResultVal; // computed output value (unused if stored externally)
527 AValueType* mResultValPtr; // pointer to either mResultVal or an external value
528 bool mAIsActive, mBIsActive; // active states of A and B values
529 bool mResultIsActive; // computed active state (default: A active || B active)
530 };
531
532
536 template<typename ValueType, typename CombineOp>
537 struct SwappedCombineOp
538 {
539 SwappedCombineOp(CombineOp& _op): op(_op) {}
540
541 void operator()(CombineArgs<ValueType>& args)
542 {
543 CombineArgs<ValueType> swappedArgs(args.b(), args.a(), args.result(),
544 args.bIsActive(), args.aIsActive());
545 op(swappedArgs);
546 }
547
548 CombineOp& op;
549 };
550
551
553
554
557 class ShallowCopy {};
560 class TopologyCopy {};
562 class DeepCopy {};
564 class Steal {};
566 class PartialCreate {};
567
568 } // namespace OPENVDB_VERSION_NAME
569 } // namespace openvdb
570
571
572 #endif // OPENVDB_TYPES_HAS_BEEN_INCLUDED
BBox.h
Coord.h
Half.h
Mat3.h
Mat4.h
Math.h
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
Platform.h
Quat.h
TypeList.h
A TypeList provides a compile time sequence of heterogeneous types which can be accessed,...
Vec2.h
Vec3.h
Vec4.h
openvdb::v8_1::CombineArgs
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: openvdb/Types.h:447
openvdb::v8_1::CombineArgs::setResult
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: openvdb/Types.h:496
openvdb::v8_1::CombineArgs::bIsActive
bool bIsActive() const
Definition: openvdb/Types.h:508
openvdb::v8_1::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:463
openvdb::v8_1::CombineArgs::mAIsActive
bool mAIsActive
Definition: openvdb/Types.h:528
openvdb::v8_1::CombineArgs::mResultValPtr
AValueType * mResultValPtr
Definition: openvdb/Types.h:527
openvdb::v8_1::CombineArgs::updateResultActive
void updateResultActive()
Definition: openvdb/Types.h:522
openvdb::v8_1::CombineArgs::mAValPtr
const AValueType * mAValPtr
Definition: openvdb/Types.h:524
openvdb::v8_1::CombineArgs::mResultVal
AValueType mResultVal
Definition: openvdb/Types.h:526
openvdb::v8_1::CombineArgs::aIsActive
bool aIsActive() const
Definition: openvdb/Types.h:506
openvdb::v8_1::CombineArgs::setResultRef
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: openvdb/Types.h:503
openvdb::v8_1::CombineArgs::a
const AValueType & a() const
Get the A input value.
Definition: openvdb/Types.h:486
openvdb::v8_1::CombineArgs::setBIsActive
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: openvdb/Types.h:515
openvdb::v8_1::CombineArgs::mBValPtr
const BValueType * mBValPtr
Definition: openvdb/Types.h:525
openvdb::v8_1::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:475
openvdb::v8_1::CombineArgs::setARef
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: openvdb/Types.h:499
openvdb::v8_1::CombineArgs::b
const BValueType & b() const
Get the B input value.
Definition: openvdb/Types.h:488
openvdb::v8_1::CombineArgs::setAIsActive
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition: openvdb/Types.h:513
openvdb::v8_1::CombineArgs::result
const AValueType & result() const
Get the output value.
Definition: openvdb/Types.h:491
openvdb::v8_1::CombineArgs::AValueT
AValueType AValueT
Definition: openvdb/Types.h:449
openvdb::v8_1::CombineArgs::result
AValueType & result()
Definition: openvdb/Types.h:492
openvdb::v8_1::CombineArgs::resultIsActive
bool resultIsActive() const
Definition: openvdb/Types.h:510
openvdb::v8_1::CombineArgs::setBRef
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: openvdb/Types.h:501
openvdb::v8_1::CombineArgs::mResultIsActive
bool mResultIsActive
Definition: openvdb/Types.h:529
openvdb::v8_1::CombineArgs::BValueT
BValueType BValueT
Definition: openvdb/Types.h:450
openvdb::v8_1::CombineArgs::CombineArgs
CombineArgs()
Definition: openvdb/Types.h:452
openvdb::v8_1::CombineArgs::setResultIsActive
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: openvdb/Types.h:517
openvdb::v8_1::DeepCopy
Tag dispatch class that distinguishes constructors that deep copy.
Definition: openvdb/Types.h:562
openvdb::v8_1::PartialCreate
Tag dispatch class that distinguishes constructors during file input.
Definition: openvdb/Types.h:566
openvdb::v8_1::ShallowCopy
Tag dispatch class that distinguishes shallow copy constructors from deep copy constructors.
Definition: openvdb/Types.h:557
openvdb::v8_1::Steal
Tag dispatch class that distinguishes constructors that steal.
Definition: openvdb/Types.h:564
openvdb::v8_1::TopologyCopy
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: openvdb/Types.h:560
openvdb::v8_1::ValueMask
Definition: openvdb/Types.h:107
openvdb::v8_1::math::BBox< Vec3d >
openvdb::v8_1::math::CoordBBox
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:249
openvdb::v8_1::math::Coord
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:26
openvdb::v8_1::math::Mat3
3x3 matrix class.
Definition: Mat3.h:29
openvdb::v8_1::math::Mat4< Real >
openvdb::v8_1::math::Quat
Definition: Quat.h:79
openvdb::v8_1::math::Vec2
Definition: Vec2.h:24
openvdb::v8_1::math::Vec3< Real >
openvdb::v8_1::math::Vec4
Definition: Vec4.h:25
openvdb::v8_1::math::internal::half
Definition: Half.h:99
openvdb::v8_1::math::Vec2i
Vec2< int32_t > Vec2i
Definition: Vec2.h:534
openvdb::v8_1::math::Mat4s
Mat4< float > Mat4s
Definition: Mat4.h:1367
openvdb::v8_1::math::Vec2d
Vec2< double > Vec2d
Definition: Vec2.h:537
openvdb::v8_1::math::Mat3d
Mat3< double > Mat3d
Definition: Mat3.h:848
openvdb::v8_1::math::Vec2s
Vec2< float > Vec2s
Definition: Vec2.h:536
openvdb::v8_1::math::Vec4s
Vec4< float > Vec4s
Definition: Vec4.h:565
openvdb::v8_1::math::Mat3s
Mat3< float > Mat3s
Definition: Mat3.h:847
openvdb::v8_1::math::Vec3d
Vec3< double > Vec3d
Definition: Vec3.h:668
openvdb::v8_1::math::Mat4d
Mat4< double > Mat4d
Definition: Mat4.h:1368
openvdb::v8_1::math::Vec4i
Vec4< int32_t > Vec4i
Definition: Vec4.h:563
openvdb::v8_1::math::Quatd
Quat< double > Quatd
Definition: Quat.h:626
openvdb::v8_1::math::half
internal::half half
Definition: openvdb/Types.h:25
openvdb::v8_1::math::Vec3i
Vec3< int32_t > Vec3i
Definition: Vec3.h:665
openvdb::v8_1::math::Vec4d
Vec4< double > Vec4d
Definition: Vec4.h:566
openvdb::v8_1::math::Quats
Quat< float > Quats
Definition: Quat.h:625
openvdb::v8_1::math::Vec3s
Vec3< float > Vec3s
Definition: Vec3.h:667
openvdb::v8_1::LEVEL_SET_HALF_WIDTH
static const Real LEVEL_SET_HALF_WIDTH
Definition: openvdb/Types.h:339
openvdb::v8_1::NUM_GRID_CLASSES
@ NUM_GRID_CLASSES
Definition: openvdb/Types.h:337
openvdb::v8_1::typeNameAsString< double >
const char * typeNameAsString< double >()
Definition: openvdb/Types.h:399
openvdb::v8_1::typeNameAsString< Mat4s >
const char * typeNameAsString< Mat4s >()
Definition: openvdb/Types.h:421
openvdb::v8_1::typeNameAsString< PointIndex32 >
const char * typeNameAsString< PointIndex32 >()
Definition: openvdb/Types.h:425
openvdb::v8_1::typeNameAsString< uint32_t >
const char * typeNameAsString< uint32_t >()
Definition: openvdb/Types.h:405
openvdb::v8_1::Index
Index32 Index
Definition: openvdb/Types.h:50
openvdb::v8_1::typeNameAsString< Vec2i >
const char * typeNameAsString< Vec2i >()
Definition: openvdb/Types.h:407
openvdb::v8_1::typeNameAsString< PointIndex64 >
const char * typeNameAsString< PointIndex64 >()
Definition: openvdb/Types.h:426
openvdb::v8_1::typeNameAsString< uint16_t >
const char * typeNameAsString< uint16_t >()
Definition: openvdb/Types.h:403
openvdb::v8_1::Int16
int16_t Int16
Definition: openvdb/Types.h:51
openvdb::v8_1::typeNameAsString< Mat3s >
const char * typeNameAsString< Mat3s >()
Definition: openvdb/Types.h:419
openvdb::v8_1::typeNameAsString< Mat3d >
const char * typeNameAsString< Mat3d >()
Definition: openvdb/Types.h:420
openvdb::v8_1::typeNameAsString< Vec4f >
const char * typeNameAsString< Vec4f >()
Definition: openvdb/Types.h:416
openvdb::v8_1::Byte
unsigned char Byte
Definition: openvdb/Types.h:55
openvdb::v8_1::Real
double Real
Definition: openvdb/Types.h:56
openvdb::v8_1::typeNameAsString< Vec2d >
const char * typeNameAsString< Vec2d >()
Definition: openvdb/Types.h:409
openvdb::v8_1::GridClass
GridClass
Definition: openvdb/Types.h:331
openvdb::v8_1::GRID_FOG_VOLUME
@ GRID_FOG_VOLUME
Definition: openvdb/Types.h:334
openvdb::v8_1::GRID_STAGGERED
@ GRID_STAGGERED
Definition: openvdb/Types.h:335
openvdb::v8_1::GRID_LEVEL_SET
@ GRID_LEVEL_SET
Definition: openvdb/Types.h:333
openvdb::v8_1::GRID_UNKNOWN
@ GRID_UNKNOWN
Definition: openvdb/Types.h:332
openvdb::v8_1::Int64
int64_t Int64
Definition: openvdb/Types.h:53
openvdb::v8_1::Int
Int32 Int
Definition: openvdb/Types.h:54
openvdb::v8_1::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:122
openvdb::v8_1::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:142
openvdb::v8_1::typeNameAsString< int32_t >
const char * typeNameAsString< int32_t >()
Definition: openvdb/Types.h:404
openvdb::v8_1::WeakPtr
std::weak_ptr< T > WeakPtr
Definition: openvdb/Types.h:111
openvdb::v8_1::typeNameAsString< int64_t >
const char * typeNameAsString< int64_t >()
Definition: openvdb/Types.h:406
openvdb::v8_1::typeNameAsString< PointDataIndex32 >
const char * typeNameAsString< PointDataIndex32 >()
Definition: openvdb/Types.h:427
openvdb::v8_1::typeNameAsString< Vec2s >
const char * typeNameAsString< Vec2s >()
Definition: openvdb/Types.h:408
openvdb::v8_1::typeNameAsString< Vec4d >
const char * typeNameAsString< Vec4d >()
Definition: openvdb/Types.h:417
openvdb::v8_1::typeNameAsString< Vec3d >
const char * typeNameAsString< Vec3d >()
Definition: openvdb/Types.h:414
openvdb::v8_1::typeNameAsString< ValueMask >
const char * typeNameAsString< ValueMask >()
Definition: openvdb/Types.h:396
openvdb::v8_1::typeNameAsString< int16_t >
const char * typeNameAsString< int16_t >()
Definition: openvdb/Types.h:402
openvdb::v8_1::typeNameAsString< Vec3U8 >
const char * typeNameAsString< Vec3U8 >()
Definition: openvdb/Types.h:410
openvdb::v8_1::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:132
openvdb::v8_1::typeNameAsString< uint8_t >
const char * typeNameAsString< uint8_t >()
Definition: openvdb/Types.h:401
openvdb::v8_1::typeNameAsString< float >
const char * typeNameAsString< float >()
Definition: openvdb/Types.h:398
openvdb::v8_1::Index32
uint32_t Index32
Definition: openvdb/Types.h:48
openvdb::v8_1::typeNameAsString
const char * typeNameAsString()
Definition: openvdb/Types.h:394
openvdb::v8_1::typeNameAsString< PointDataIndex64 >
const char * typeNameAsString< PointDataIndex64 >()
Definition: openvdb/Types.h:428
openvdb::v8_1::typeNameAsString< Vec4i >
const char * typeNameAsString< Vec4i >()
Definition: openvdb/Types.h:415
openvdb::v8_1::typeNameAsString< int8_t >
const char * typeNameAsString< int8_t >()
Definition: openvdb/Types.h:400
openvdb::v8_1::Int32
int32_t Int32
Definition: openvdb/Types.h:52
openvdb::v8_1::typeNameAsString< Vec3U16 >
const char * typeNameAsString< Vec3U16 >()
Definition: openvdb/Types.h:411
openvdb::v8_1::Index64
uint64_t Index64
Definition: openvdb/Types.h:49
openvdb::v8_1::SharedPtr
std::shared_ptr< T > SharedPtr
Definition: openvdb/Types.h:110
openvdb::v8_1::MergePolicy
MergePolicy
Definition: openvdb/Types.h:384
openvdb::v8_1::MERGE_ACTIVE_STATES
@ MERGE_ACTIVE_STATES
Definition: openvdb/Types.h:385
openvdb::v8_1::MERGE_NODES
@ MERGE_NODES
Definition: openvdb/Types.h:386
openvdb::v8_1::MERGE_ACTIVE_STATES_AND_NODES
@ MERGE_ACTIVE_STATES_AND_NODES
Definition: openvdb/Types.h:387
openvdb::v8_1::NUM_VEC_TYPES
@ NUM_VEC_TYPES
Definition: openvdb/Types.h:368
openvdb::v8_1::typeNameAsString< Vec3i >
const char * typeNameAsString< Vec3i >()
Definition: openvdb/Types.h:412
openvdb::v8_1::VecType
VecType
Definition: openvdb/Types.h:361
openvdb::v8_1::VEC_CONTRAVARIANT_ABSOLUTE
@ VEC_CONTRAVARIANT_ABSOLUTE
Definition: openvdb/Types.h:366
openvdb::v8_1::VEC_CONTRAVARIANT_RELATIVE
@ VEC_CONTRAVARIANT_RELATIVE
Definition: openvdb/Types.h:365
openvdb::v8_1::VEC_COVARIANT
@ VEC_COVARIANT
Definition: openvdb/Types.h:363
openvdb::v8_1::VEC_COVARIANT_NORMALIZE
@ VEC_COVARIANT_NORMALIZE
Definition: openvdb/Types.h:364
openvdb::v8_1::VEC_INVARIANT
@ VEC_INVARIANT
Definition: openvdb/Types.h:362
openvdb::v8_1::typeNameAsString< Vec3f >
const char * typeNameAsString< Vec3f >()
Definition: openvdb/Types.h:413
openvdb::v8_1::typeNameAsString< bool >
const char * typeNameAsString< bool >()
Definition: openvdb/Types.h:395
openvdb::v8_1::typeNameAsString< Mat4d >
const char * typeNameAsString< Mat4d >()
Definition: openvdb/Types.h:422
openvdb
Definition: openvdb/Exceptions.h:13
openvdb::v8_1::CanConvertType
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: openvdb/Types.h:281
openvdb::v8_1::CopyConstness
CopyConstness<T1, T2>::Type is either const T2 or T2 with no const qualifier, depending on whether T1...
Definition: openvdb/Types.h:316
openvdb::v8_1::CopyConstness::Type
typename std::remove_const< ToType >::type Type
Definition: openvdb/Types.h:317
openvdb::v8_1::IsSpecializationOf
Helper metafunction used to determine if the first template parameter is a specialization of the clas...
Definition: openvdb/Types.h:188
openvdb::v8_1::MatTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:245
openvdb::v8_1::MatTraits
Definition: openvdb/Types.h:234
openvdb::v8_1::MatTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:237
openvdb::v8_1::PointIndex
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: openvdb/Types.h:153
openvdb::v8_1::PointIndex::PointIndex
PointIndex(T i)
Explicit type conversion constructor.
Definition: openvdb/Types.h:161
openvdb::v8_1::PointIndex::PointIndex
PointIndex(IntType i=IntType(0))
Definition: openvdb/Types.h:158
openvdb::v8_1::PointIndex::operator+
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: openvdb/Types.h:167
openvdb::v8_1::PointIndex::IntType
IntType_ IntType
Definition: openvdb/Types.h:156
openvdb::v8_1::QuatTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:228
openvdb::v8_1::QuatTraits
Definition: openvdb/Types.h:217
openvdb::v8_1::QuatTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:220
openvdb::v8_1::SwappedCombineOp
Definition: openvdb/Types.h:538
openvdb::v8_1::SwappedCombineOp::SwappedCombineOp
SwappedCombineOp(CombineOp &_op)
Definition: openvdb/Types.h:539
openvdb::v8_1::SwappedCombineOp::operator()
void operator()(CombineArgs< ValueType > &args)
Definition: openvdb/Types.h:541
openvdb::v8_1::SwappedCombineOp::op
CombineOp & op
Definition: openvdb/Types.h:548
openvdb::v8_1::ValueTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:271
openvdb::v8_1::ValueTraits
Definition: openvdb/Types.h:252
openvdb::v8_1::ValueTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:259
openvdb::v8_1::VecTraits< T, false >::ElementType
T ElementType
Definition: openvdb/Types.h:212
openvdb::v8_1::VecTraits
Definition: openvdb/Types.h:201
openvdb::v8_1::VecTraits::ElementType
typename T::ValueType ElementType
Definition: openvdb/Types.h:204
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:178