OpenVDB  8.0.1
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 {
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
45 using math::Vec2i;
46 using math::Vec2s;
47 using math::Vec2d;
48 
49 // Three-dimensional vector types
56 using math::Vec3i;
57 using math::Vec3s;
58 using math::Vec3d;
59 
60 using math::Coord;
61 using math::CoordBBox;
63 
64 // Four-dimensional vector types
69 using math::Vec4i;
70 using math::Vec4s;
71 using math::Vec4d;
72 
73 // Three-dimensional matrix types
75 using math::Mat3s;
76 using math::Mat3d;
77 
78 // Four-dimensional matrix types
80 using math::Mat4s;
81 using math::Mat4d;
82 
83 // Quaternions
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>
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 
158 
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 ||
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>
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 ||
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 ||
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>
284 template<typename T>
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 {
318 };
320 
321 static const Real LEVEL_SET_HALF_WIDTH = 3;
322 
343 enum VecType {
349 };
351 
352 
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>
429 {
430 public:
431  using AValueT = AValueType;
432  using BValueT = BValueType;
433 
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>
520 {
521  SwappedCombineOp(CombineOp& _op): op(_op) {}
522 
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
bool mResultIsActive
Definition: openvdb/Types.h:511
const char * typeNameAsString< bool >()
Definition: openvdb/Types.h:377
Definition: openvdb/Types.h:215
Helper metafunction used to determine if the first template parameter is a specialization of the clas...
Definition: openvdb/Types.h:170
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: openvdb/Types.h:481
Quat< float > Quats
Definition: Quat.h:625
const char * typeNameAsString< Vec2i >()
Definition: openvdb/Types.h:389
double Real
Definition: openvdb/Types.h:38
const AValueType & a() const
Get the A input value.
Definition: openvdb/Types.h:468
CombineOp & op
Definition: openvdb/Types.h:530
const char * typeNameAsString< Mat3s >()
Definition: openvdb/Types.h:401
Vec3< int32_t > Vec3i
Definition: Vec3.h:665
const char * typeNameAsString< ValueMask >()
Definition: openvdb/Types.h:378
Vec2< float > Vec2s
Definition: Vec2.h:536
Definition: openvdb/Types.h:317
T ElementType
Definition: openvdb/Types.h:227
PointIndex(IntType i=IntType(0))
Definition: openvdb/Types.h:140
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: openvdb/Types.h:542
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
bool bIsActive() const
Definition: openvdb/Types.h:490
Mat4< double > Mat4d
Definition: Mat4.h:1368
const BValueType * mBValPtr
Definition: openvdb/Types.h:507
std::weak_ptr< T > WeakPtr
Definition: openvdb/Types.h:93
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: openvdb/Types.h:263
PointIndex(T i)
Explicit type conversion constructor.
Definition: openvdb/Types.h:143
const char * typeNameAsString< int16_t >()
Definition: openvdb/Types.h:384
const char * typeNameAsString< Vec2s >()
Definition: openvdb/Types.h:390
const char * typeNameAsString< Vec3U16 >()
Definition: openvdb/Types.h:393
T ElementType
Definition: openvdb/Types.h:194
int16_t Int16
Definition: openvdb/Types.h:33
3x3 matrix class.
Definition: Mat3.h:28
Definition: openvdb/Types.h:315
Definition: openvdb/Types.h:319
const char * typeNameAsString< uint32_t >()
Definition: openvdb/Types.h:387
Vec4< double > Vec4d
Definition: Vec4.h:566
uint64_t Index64
Definition: openvdb/Types.h:31
Definition: openvdb/Types.h:344
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: openvdb/Types.h:149
int32_t Int32
Definition: openvdb/Types.h:34
bool aIsActive() const
Definition: openvdb/Types.h:488
Definition: openvdb/Types.h:316
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: openvdb/Types.h:428
Vec3< double > Vec3d
Definition: Vec3.h:668
AValueType * mResultValPtr
Definition: openvdb/Types.h:509
bool mBIsActive
Definition: openvdb/Types.h:510
Definition: openvdb/Types.h:348
VecType
Definition: openvdb/Types.h:343
void operator()(CombineArgs< ValueType > &args)
Definition: openvdb/Types.h:523
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:25
Definition: openvdb/Types.h:233
static const Real LEVEL_SET_HALF_WIDTH
Definition: openvdb/Types.h:321
Definition: openvdb/Types.h:368
Definition: openvdb/Types.h:367
Mat3< double > Mat3d
Definition: Mat3.h:848
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
CopyConstness<T1, T2>::Type is either const T2 or T2 with no const qualifier, depending on whether T1...
Definition: openvdb/Types.h:298
const char * typeNameAsString()
Definition: openvdb/Types.h:376
AValueType mResultVal
Definition: openvdb/Types.h:508
T ElementType
Definition: openvdb/Types.h:253
bool resultIsActive() const
Definition: openvdb/Types.h:492
Vec2< int32_t > Vec2i
Definition: Vec2.h:534
typename T::ValueType ElementType
Definition: openvdb/Types.h:241
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: openvdb/Types.h:478
Definition: openvdb/Types.h:198
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: openvdb/Types.h:485
typename T::ValueType ElementType
Definition: openvdb/Types.h:186
Definition: openvdb/Types.h:345
const char * typeNameAsString< uint16_t >()
Definition: openvdb/Types.h:385
Definition: openvdb/Types.h:347
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: openvdb/Types.h:483
const AValueType & result() const
Get the output value.
Definition: openvdb/Types.h:473
Int32 Int
Definition: openvdb/Types.h:36
Definition: openvdb/Types.h:519
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:101
const char * typeNameAsString< Vec2d >()
Definition: openvdb/Types.h:391
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
Definition: openvdb/Types.h:350
AValueType AValueT
Definition: openvdb/Types.h:431
GridClass
Definition: openvdb/Types.h:313
const char * typeNameAsString< Vec4f >()
Definition: openvdb/Types.h:398
Vec4< float > Vec4s
Definition: Vec4.h:565
const char * typeNameAsString< half >()
Definition: openvdb/Types.h:379
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: openvdb/Types.h:134
const char * typeNameAsString< Mat4s >()
Definition: openvdb/Types.h:403
uint32_t Index32
Definition: openvdb/Types.h:30
typename T::ValueType ElementType
Definition: openvdb/Types.h:202
Quat< double > Quatd
Definition: Quat.h:626
const char * typeNameAsString< Mat4d >()
Definition: openvdb/Types.h:404
Definition: openvdb/Types.h:346
Vec4< int32_t > Vec4i
Definition: Vec4.h:563
Definition: openvdb/Exceptions.h:13
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: openvdb/Types.h:497
unsigned char Byte
Definition: openvdb/Types.h:37
Definition: openvdb/Types.h:314
const char * typeNameAsString< Vec3f >()
Definition: openvdb/Types.h:395
const char * typeNameAsString< Mat3d >()
Definition: openvdb/Types.h:402
Definition: Vec2.h:23
const BValueType & b() const
Get the B input value.
Definition: openvdb/Types.h:470
Definition: openvdb/Types.h:369
const char * typeNameAsString< Vec3U8 >()
Definition: openvdb/Types.h:392
const char * typeNameAsString< int32_t >()
Definition: openvdb/Types.h:386
const char * typeNameAsString< PointDataIndex64 >()
Definition: openvdb/Types.h:410
IntType_ IntType
Definition: openvdb/Types.h:138
const AValueType * mAValPtr
Definition: openvdb/Types.h:506
typename std::remove_const< ToType >::type Type
Definition: openvdb/Types.h:299
void updateResultActive()
Definition: openvdb/Types.h:504
Library and file format version numbers.
Definition: Mat.h:186
const char * typeNameAsString< Vec3i >()
Definition: openvdb/Types.h:394
A TypeList provides a compile time sequence of heterogeneous types which can be accessed, transformed and executed over in various ways. It incorporates a subset of functionality similar to boost::mpl::vector however provides most of its content through using declarations rather than additional typed classes.
Vec2< double > Vec2d
Definition: Vec2.h:537
int64_t Int64
Definition: openvdb/Types.h:35
Tag dispatch class that distinguishes constructors that deep copy.
Definition: openvdb/Types.h:544
SwappedCombineOp(CombineOp &_op)
Definition: openvdb/Types.h:521
Definition: openvdb/Types.h:89
const char * typeNameAsString< Vec3d >()
Definition: openvdb/Types.h:396
Tag dispatch class that distinguishes shallow copy constructors from deep copy constructors.
Definition: openvdb/Types.h:539
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition: openvdb/Types.h:495
Definition: openvdb/Types.h:182
const char * typeNameAsString< PointIndex32 >()
Definition: openvdb/Types.h:407
const char * typeNameAsString< int64_t >()
Definition: openvdb/Types.h:388
typename T::ValueType ElementType
Definition: openvdb/Types.h:219
CombineArgs()
Definition: openvdb/Types.h:434
const char * typeNameAsString< double >()
Definition: openvdb/Types.h:381
Mat4< float > Mat4s
Definition: Mat4.h:1367
const char * typeNameAsString< PointIndex64 >()
Definition: openvdb/Types.h:408
T ElementType
Definition: openvdb/Types.h:210
Tag dispatch class that distinguishes constructors during file input.
Definition: openvdb/Types.h:548
const char * typeNameAsString< int8_t >()
Definition: openvdb/Types.h:382
std::shared_ptr< T > SharedPtr
Definition: openvdb/Types.h:92
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
const char * typeNameAsString< PointDataIndex32 >()
Definition: openvdb/Types.h:409
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:153
const char * typeNameAsString< uint8_t >()
Definition: openvdb/Types.h:383
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: openvdb/Types.h:499
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
const char * typeNameAsString< Vec4d >()
Definition: openvdb/Types.h:399
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
Mat3< float > Mat3s
Definition: Mat3.h:847
Tag dispatch class that distinguishes constructors that steal.
Definition: openvdb/Types.h:546
Definition: Mat4.h:24
Vec3< float > Vec3s
Definition: Vec3.h:667
MergePolicy
Definition: openvdb/Types.h:366
AValueType & result()
Get the output value.
Definition: openvdb/Types.h:474
BValueType BValueT
Definition: openvdb/Types.h:432
Index32 Index
Definition: openvdb/Types.h:32
const char * typeNameAsString< float >()
Definition: openvdb/Types.h:380
const char * typeNameAsString< Vec4i >()
Definition: openvdb/Types.h:397
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:248