HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
95 /// @brief Return a new shared pointer that points to the same object
96 /// as the given pointer but with possibly different <TT>const</TT>-ness.
97 /// @par Example:
98 /// @code
99 /// FloatGrid::ConstPtr grid = ...;
100 /// FloatGrid::Ptr nonConstGrid = ConstPtrCast<FloatGrid>(grid);
101 /// FloatGrid::ConstPtr constGrid = ConstPtrCast<const FloatGrid>(nonConstGrid);
102 /// @endcode
103 template<typename T, typename U> inline SharedPtr<T>
104 ConstPtrCast(const SharedPtr<U>& ptr) { return std::const_pointer_cast<T, U>(ptr); }
105 
106 /// @brief Return a new shared pointer that is either null or points to
107 /// the same object as the given pointer after a @c dynamic_cast.
108 /// @par Example:
109 /// @code
110 /// GridBase::ConstPtr grid = ...;
111 /// FloatGrid::ConstPtr floatGrid = DynamicPtrCast<const FloatGrid>(grid);
112 /// @endcode
113 template<typename T, typename U> inline SharedPtr<T>
114 DynamicPtrCast(const SharedPtr<U>& ptr) { return std::dynamic_pointer_cast<T, U>(ptr); }
115 
116 /// @brief Return a new shared pointer that points to the same object
117 /// as the given pointer after a @c static_cast.
118 /// @par Example:
119 /// @code
120 /// FloatGrid::Ptr floatGrid = ...;
121 /// GridBase::Ptr grid = StaticPtrCast<GridBase>(floatGrid);
122 /// @endcode
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 
127 ////////////////////////////////////////
128 
129 
130 /// @brief Integer wrapper, required to distinguish PointIndexGrid and
131 /// PointDataGrid from Int32Grid and Int64Grid
132 /// @note @c Kind is a dummy parameter used to create distinct types.
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 
142  /// Explicit type conversion constructor
143  template<typename T> explicit PointIndex(T i): mIndex(static_cast<IntType>(i)) {}
144 
145  operator IntType() const { return mIndex; }
146 
147  /// Needed to support the <tt>(zeroVal<PointIndex>() + val)</tt> idiom.
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 
163 ////////////////////////////////////////
164 
165 
166 /// @brief Helper metafunction used to determine if the first template
167 /// parameter is a specialization of the class template given in the second
168 /// template parameter
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 
176 ////////////////////////////////////////
177 
178 
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 
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 
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 
257 ////////////////////////////////////////
258 
259 
260 /// @brief CanConvertType<FromType, ToType>::value is @c true if a value
261 /// of type @a ToType can be constructed from a value of type @a FromType.
262 template<typename FromType, typename ToType>
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 
288 ////////////////////////////////////////
289 
290 
291 /// @brief CopyConstness<T1, T2>::Type is either <tt>const T2</tt>
292 /// or @c T2 with no @c const qualifier, depending on whether @c T1 is @c const.
293 /// @details For example,
294 /// - CopyConstness<int, int>::Type is @c int
295 /// - CopyConstness<int, const int>::Type is @c int
296 /// - CopyConstness<const int, int>::Type is <tt>const int</tt>
297 /// - CopyConstness<const int, const int>::Type is <tt>const int</tt>
298 template<typename FromType, typename ToType> struct CopyConstness {
300 };
301 
302 /// @cond OPENVDB_TYPES_INTERNAL
303 template<typename FromType, typename ToType> struct CopyConstness<const FromType, ToType> {
304  using Type = const ToType;
305 };
306 /// @endcond
307 
308 
309 ////////////////////////////////////////
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 
323 /// The type of a vector determines how transforms are applied to it:
324 /// <dl>
325 /// <dt><b>Invariant</b>
326 /// <dd>Does not transform (e.g., tuple, uvw, color)
327 ///
328 /// <dt><b>Covariant</b>
329 /// <dd>Apply inverse-transpose transformation: @e w = 0, ignores translation
330 /// (e.g., gradient/normal)
331 ///
332 /// <dt><b>Covariant Normalize</b>
333 /// <dd>Apply inverse-transpose transformation: @e w = 0, ignores translation,
334 /// vectors are renormalized (e.g., unit normal)
335 ///
336 /// <dt><b>Contravariant Relative</b>
337 /// <dd>Apply "regular" transformation: @e w = 0, ignores translation
338 /// (e.g., displacement, velocity, acceleration)
339 ///
340 /// <dt><b>Contravariant Absolute</b>
341 /// <dd>Apply "regular" transformation: @e w = 1, vector translates (e.g., position)
342 /// </dl>
343 enum VecType {
349 };
351 
352 
353 /// Specify how grids should be merged during certain (typically multithreaded) operations.
354 /// <dl>
355 /// <dt><b>MERGE_ACTIVE_STATES</b>
356 /// <dd>The output grid is active wherever any of the input grids is active.
357 ///
358 /// <dt><b>MERGE_NODES</b>
359 /// <dd>The output grid's tree has a node wherever any of the input grids' trees
360 /// has a node, regardless of any active states.
361 ///
362 /// <dt><b>MERGE_ACTIVE_STATES_AND_NODES</b>
363 /// <dd>The output grid is active wherever any of the input grids is active,
364 /// and its tree has a node wherever any of the input grids' trees has a node.
365 /// </dl>
370 };
371 
372 
373 ////////////////////////////////////////
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 
413 ////////////////////////////////////////
414 
415 
416 /// @brief This struct collects both input and output arguments to "grid combiner" functors
417 /// used with the tree::TypedGrid::combineExtended() and combine2Extended() methods.
418 /// AValueType and BValueType are the value types of the two grids being combined.
419 ///
420 /// @see openvdb/tree/Tree.h for usage information.
421 ///
422 /// Setter methods return references to this object, to facilitate the following usage:
423 /// @code
424 /// CombineArgs<float> args;
425 /// myCombineOp(args.setARef(aVal).setBRef(bVal).setAIsActive(true).setBIsActive(false));
426 /// @endcode
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)
438  , mAIsActive(false)
439  , mBIsActive(false)
440  , mResultIsActive(false)
441  {
442  }
443 
444  /// Use this constructor when the result value is stored externally.
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 
456  /// Use this constructor when the result value should be stored in this struct.
457  CombineArgs(const AValueType& a, const BValueType& b, bool aOn = false, bool bOn = false)
458  : mAValPtr(&a)
459  , mBValPtr(&b)
461  , mAIsActive(aOn)
462  , mBIsActive(bOn)
463  {
464  this->updateResultActive();
465  }
466 
467  /// Get the A input value.
468  const AValueType& a() const { return *mAValPtr; }
469  /// Get the B input value.
470  const BValueType& b() const { return *mBValPtr; }
471  //@{
472  /// Get the output value.
473  const AValueType& result() const { return *mResultValPtr; }
474  AValueType& result() { return *mResultValPtr; }
475  //@}
476 
477  /// Set the output value.
478  CombineArgs& setResult(const AValueType& val) { *mResultValPtr = val; return *this; }
479 
480  /// Redirect the A value to a new external source.
481  CombineArgs& setARef(const AValueType& a) { mAValPtr = &a; return *this; }
482  /// Redirect the B value to a new external source.
483  CombineArgs& setBRef(const BValueType& b) { mBValPtr = &b; return *this; }
484  /// Redirect the result value to a new external destination.
485  CombineArgs& setResultRef(AValueType& val) { mResultValPtr = &val; return *this; }
486 
487  /// @return true if the A value is active
488  bool aIsActive() const { return mAIsActive; }
489  /// @return true if the B value is active
490  bool bIsActive() const { return mBIsActive; }
491  /// @return true if the output value is active
492  bool resultIsActive() const { return mResultIsActive; }
493 
494  /// Set the active state of the A value.
495  CombineArgs& setAIsActive(bool b) { mAIsActive = b; updateResultActive(); return *this; }
496  /// Set the active state of the B value.
497  CombineArgs& setBIsActive(bool b) { mBIsActive = b; updateResultActive(); return *this; }
498  /// Set the active state of the output value.
499  CombineArgs& setResultIsActive(bool b) { mResultIsActive = b; return *this; }
500 
501 protected:
502  /// By default, the result value is active if either of the input values is active,
503  /// but this behavior can be overridden by calling setResultIsActive().
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 
515 /// This struct adapts a "grid combiner" functor to swap the A and B grid values
516 /// (e.g., so that if the original functor computes a + 2 * b, the adapted functor
517 /// will compute b + 2 * a).
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 
534 ////////////////////////////////////////
535 
536 
537 /// @brief Tag dispatch class that distinguishes shallow copy constructors
538 /// from deep copy constructors
539 class ShallowCopy {};
540 /// @brief Tag dispatch class that distinguishes topology copy constructors
541 /// from deep copy constructors
542 class TopologyCopy {};
543 /// @brief Tag dispatch class that distinguishes constructors that deep copy
544 class DeepCopy {};
545 /// @brief Tag dispatch class that distinguishes constructors that steal
546 class Steal {};
547 /// @brief Tag dispatch class that distinguishes constructors during file input
548 class PartialCreate {};
549 
550 } // namespace OPENVDB_VERSION_NAME
551 } // namespace openvdb
552 
553 
554 #endif // OPENVDB_TYPES_HAS_BEEN_INCLUDED
const AValueType & result() const
Get the output value.
Definition: Types.h:473
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: Types.h:124
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: Types.h:149
const char * typeNameAsString< ValueMask >()
Definition: Types.h:378
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: Types.h:428
typename T::ValueType ElementType
Definition: Types.h:241
GLsizeiptr size
Definition: glew.h:1681
GLuint const GLchar * name
Definition: glew.h:1814
Tag dispatch class that distinguishes shallow copy constructors from deep copy constructors.
Definition: Types.h:539
const char * typeNameAsString< PointIndex32 >()
Definition: Types.h:407
const Args & args
Definition: printf.h:628
typename T::ValueType ElementType
Definition: Types.h:186
const char * typeNameAsString< int32_t >()
Definition: Types.h:386
GLuint const GLfloat * val
Definition: glew.h:2794
const char * typeNameAsString< Vec3i >()
Definition: Types.h:394
const char * typeNameAsString< uint16_t >()
Definition: Types.h:385
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: Types.h:457
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:9477
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: Types.h:497
const char * typeNameAsString< int8_t >()
Definition: Types.h:382
const char * typeNameAsString< int16_t >()
Definition: Types.h:384
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:167
const char * typeNameAsString< Mat3s >()
Definition: Types.h:401
const char * typeNameAsString< half >()
Definition: Types.h:379
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:25
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:548
const char * typeNameAsString< PointIndex64 >()
Definition: Types.h:408
const char * typeNameAsString< Vec3d >()
Definition: Types.h:396
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: Types.h:104
const char * typeNameAsString< Mat4s >()
Definition: Types.h:403
std::shared_ptr< T > SharedPtr
Definition: Types.h:92
const AValueType & a() const
Get the A input value.
Definition: Types.h:468
const char * typeNameAsString< Vec3U16 >()
Definition: Types.h:393
Helper metafunction used to determine if the first template parameter is a specialization of the clas...
Definition: Types.h:170
const char * typeNameAsString< Vec3f >()
Definition: Types.h:395
const char * typeNameAsString< PointDataIndex32 >()
Definition: Types.h:409
const char * typeNameAsString< uint32_t >()
Definition: Types.h:387
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 hboost::mpl::vector however provides most of its content through using declarations rather than additional typed classes.
std::weak_ptr< T > WeakPtr
Definition: Types.h:93
GLint GLint GLint GLint GLint x
Definition: glew.h:1252
PointIndex(T i)
Explicit type conversion constructor.
Definition: Types.h:143
const char * typeNameAsString< uint8_t >()
Definition: Types.h:383
const char * typeNameAsString< float >()
Definition: Types.h:380
const char * typeNameAsString< Vec2i >()
Definition: Types.h:389
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition: Types.h:495
typename std::remove_const< ToType >::type Type
Definition: Types.h:299
const char * typeNameAsString()
Definition: Types.h:376
const char * typeNameAsString< int64_t >()
Definition: Types.h:388
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:248
Tag dispatch class that distinguishes constructors that steal.
Definition: Types.h:546
CopyConstness<T1, T2>::Type is either const T2 or T2 with no const qualifier, depending on whether T1...
Definition: Types.h:298
const char * typeNameAsString< Vec4d >()
Definition: 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: Types.h:445
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: Types.h:499
const char * typeNameAsString< double >()
Definition: Types.h:381
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: Types.h:263
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: Types.h:114
typename T::ValueType ElementType
Definition: Types.h:219
GLdouble GLdouble GLdouble b
Definition: glew.h:9122
Library and file format version numbers.
const char * typeNameAsString< bool >()
Definition: Types.h:377
AValueType & result()
Get the output value.
Definition: Types.h:474
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: Types.h:483
const void * ptr(const T *p)
Definition: format.h:3292
const char * typeNameAsString< Mat4d >()
Definition: Types.h:404
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: Types.h:485
const char * typeNameAsString< Vec3U8 >()
Definition: Types.h:392
const char * typeNameAsString< Vec2d >()
Definition: Types.h:391
void operator()(CombineArgs< ValueType > &args)
Definition: Types.h:523
unsigned char Byte
Definition: Types.h:37
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: Types.h:481
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: Types.h:134
GLuint64EXT * result
Definition: glew.h:14007
const char * typeNameAsString< Vec4f >()
Definition: Types.h:398
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:542
const BValueType & b() const
Get the B input value.
Definition: Types.h:470
#define const
Definition: zconf.h:214
Tag dispatch class that distinguishes constructors that deep copy.
Definition: Types.h:544
const char * typeNameAsString< Vec4i >()
Definition: Types.h:397
typename T::ValueType ElementType
Definition: Types.h:202
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:113
GLsizei const GLfloat * value
Definition: glew.h:1849
const char * typeNameAsString< PointDataIndex64 >()
Definition: Types.h:410
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: Types.h:478
const char * typeNameAsString< Vec2s >()
Definition: Types.h:390
type
Definition: core.h:528
PointIndex(IntType i=IntType(0))
Definition: Types.h:140
const char * typeNameAsString< Mat3d >()
Definition: Types.h:402