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 
11 #ifdef OPENVDB_USE_IMATH_HALF
12 #include <OpenEXR/half.h>
13 namespace openvdb {
15 namespace OPENVDB_VERSION_NAME {
16 namespace math {
17 using half = half;
18 }}}
19 #else
20 #include <openvdb/math/Half.h>
21 namespace openvdb {
23 namespace OPENVDB_VERSION_NAME {
24 namespace math {
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 {
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
63 using math::Vec2i;
64 using math::Vec2s;
65 using math::Vec2d;
66 
67 // Three-dimensional vector types
74 using math::Vec3i;
75 using math::Vec3s;
76 using math::Vec3d;
77 
78 using math::Coord;
79 using math::CoordBBox;
81 
82 // Four-dimensional vector types
87 using math::Vec4i;
88 using math::Vec4s;
89 using math::Vec4d;
90 
91 // Three-dimensional matrix types
93 using math::Mat3s;
94 using math::Mat3d;
95 
96 // Four-dimensional matrix types
98 using math::Mat4s;
99 using math::Mat4d;
100 
101 // Quaternions
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 
113 /// @brief Return a new shared pointer that points to the same object
114 /// as the given pointer but with possibly different <TT>const</TT>-ness.
115 /// @par Example:
116 /// @code
117 /// FloatGrid::ConstPtr grid = ...;
118 /// FloatGrid::Ptr nonConstGrid = ConstPtrCast<FloatGrid>(grid);
119 /// FloatGrid::ConstPtr constGrid = ConstPtrCast<const FloatGrid>(nonConstGrid);
120 /// @endcode
121 template<typename T, typename U> inline SharedPtr<T>
122 ConstPtrCast(const SharedPtr<U>& ptr) { return std::const_pointer_cast<T, U>(ptr); }
123 
124 /// @brief Return a new shared pointer that is either null or points to
125 /// the same object as the given pointer after a @c dynamic_cast.
126 /// @par Example:
127 /// @code
128 /// GridBase::ConstPtr grid = ...;
129 /// FloatGrid::ConstPtr floatGrid = DynamicPtrCast<const FloatGrid>(grid);
130 /// @endcode
131 template<typename T, typename U> inline SharedPtr<T>
132 DynamicPtrCast(const SharedPtr<U>& ptr) { return std::dynamic_pointer_cast<T, U>(ptr); }
133 
134 /// @brief Return a new shared pointer that points to the same object
135 /// as the given pointer after a @c static_cast.
136 /// @par Example:
137 /// @code
138 /// FloatGrid::Ptr floatGrid = ...;
139 /// GridBase::Ptr grid = StaticPtrCast<GridBase>(floatGrid);
140 /// @endcode
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 
145 ////////////////////////////////////////
146 
147 
148 /// @brief Integer wrapper, required to distinguish PointIndexGrid and
149 /// PointDataGrid from Int32Grid and Int64Grid
150 /// @note @c Kind is a dummy parameter used to create distinct types.
151 template<typename IntType_, Index Kind>
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 
160  /// Explicit type conversion constructor
161  template<typename T> explicit PointIndex(T i): mIndex(static_cast<IntType>(i)) {}
162 
163  operator IntType() const { return mIndex; }
164 
165  /// Needed to support the <tt>(zeroVal<PointIndex>() + val)</tt> idiom.
166  template<typename T>
167  PointIndex operator+(T x) { return PointIndex(mIndex + IntType(x)); }
168 
169 private:
170  IntType mIndex;
171 };
172 
173 
176 
179 
180 
181 ////////////////////////////////////////
182 
183 
184 /// @brief Helper metafunction used to determine if the first template
185 /// parameter is a specialization of the class template given in the second
186 /// template parameter
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 
194 ////////////////////////////////////////
195 
196 
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 
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 
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 ||
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 
275 ////////////////////////////////////////
276 
277 
278 /// @brief CanConvertType<FromType, ToType>::value is @c true if a value
279 /// of type @a ToType can be constructed from a value of type @a FromType.
280 template<typename FromType, typename ToType>
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>
302 template<typename T>
304 
305 
306 ////////////////////////////////////////
307 
308 
309 /// @brief CopyConstness<T1, T2>::Type is either <tt>const T2</tt>
310 /// or @c T2 with no @c const qualifier, depending on whether @c T1 is @c const.
311 /// @details For example,
312 /// - CopyConstness<int, int>::Type is @c int
313 /// - CopyConstness<int, const int>::Type is @c int
314 /// - CopyConstness<const int, int>::Type is <tt>const int</tt>
315 /// - CopyConstness<const int, const int>::Type is <tt>const int</tt>
316 template<typename FromType, typename ToType> struct CopyConstness {
318 };
319 
320 /// @cond OPENVDB_DOCS_INTERNAL
321 template<typename FromType, typename ToType> struct CopyConstness<const FromType, ToType> {
322  using Type = const ToType;
323 };
324 /// @endcond
325 
326 
327 ////////////////////////////////////////
328 
329 
330 // Add new items to the *end* of this list, and update NUM_GRID_CLASSES.
331 enum GridClass {
336 };
338 
339 static const Real LEVEL_SET_HALF_WIDTH = 3;
340 
341 /// The type of a vector determines how transforms are applied to it:
342 /// <dl>
343 /// <dt><b>Invariant</b>
344 /// <dd>Does not transform (e.g., tuple, uvw, color)
345 ///
346 /// <dt><b>Covariant</b>
347 /// <dd>Apply inverse-transpose transformation: @e w = 0, ignores translation
348 /// (e.g., gradient/normal)
349 ///
350 /// <dt><b>Covariant Normalize</b>
351 /// <dd>Apply inverse-transpose transformation: @e w = 0, ignores translation,
352 /// vectors are renormalized (e.g., unit normal)
353 ///
354 /// <dt><b>Contravariant Relative</b>
355 /// <dd>Apply "regular" transformation: @e w = 0, ignores translation
356 /// (e.g., displacement, velocity, acceleration)
357 ///
358 /// <dt><b>Contravariant Absolute</b>
359 /// <dd>Apply "regular" transformation: @e w = 1, vector translates (e.g., position)
360 /// </dl>
361 enum VecType {
367 };
369 
370 
371 /// Specify how grids should be merged during certain (typically multithreaded) operations.
372 /// <dl>
373 /// <dt><b>MERGE_ACTIVE_STATES</b>
374 /// <dd>The output grid is active wherever any of the input grids is active.
375 ///
376 /// <dt><b>MERGE_NODES</b>
377 /// <dd>The output grid's tree has a node wherever any of the input grids' trees
378 /// has a node, regardless of any active states.
379 ///
380 /// <dt><b>MERGE_ACTIVE_STATES_AND_NODES</b>
381 /// <dd>The output grid is active wherever any of the input grids is active,
382 /// and its tree has a node wherever any of the input grids' trees has a node.
383 /// </dl>
388 };
389 
390 
391 ////////////////////////////////////////
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 
431 ////////////////////////////////////////
432 
433 
434 /// @brief This struct collects both input and output arguments to "grid combiner" functors
435 /// used with the tree::TypedGrid::combineExtended() and combine2Extended() methods.
436 /// AValueType and BValueType are the value types of the two grids being combined.
437 ///
438 /// @see openvdb/tree/Tree.h for usage information.
439 ///
440 /// Setter methods return references to this object, to facilitate the following usage:
441 /// @code
442 /// CombineArgs<float> args;
443 /// myCombineOp(args.setARef(aVal).setBRef(bVal).setAIsActive(true).setBIsActive(false));
444 /// @endcode
445 template<typename AValueType, typename BValueType = AValueType>
447 {
448 public:
449  using AValueT = AValueType;
450  using BValueT = BValueType;
451 
453  : mAValPtr(nullptr)
454  , mBValPtr(nullptr)
456  , mAIsActive(false)
457  , mBIsActive(false)
458  , mResultIsActive(false)
459  {
460  }
461 
462  /// Use this constructor when the result value is stored externally.
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 
474  /// Use this constructor when the result value should be stored in this struct.
475  CombineArgs(const AValueType& a, const BValueType& b, bool aOn = false, bool bOn = false)
476  : mAValPtr(&a)
477  , mBValPtr(&b)
479  , mAIsActive(aOn)
480  , mBIsActive(bOn)
481  {
482  this->updateResultActive();
483  }
484 
485  /// Get the A input value.
486  const AValueType& a() const { return *mAValPtr; }
487  /// Get the B input value.
488  const BValueType& b() const { return *mBValPtr; }
489  //@{
490  /// Get the output value.
491  const AValueType& result() const { return *mResultValPtr; }
492  AValueType& result() { return *mResultValPtr; }
493  //@}
494 
495  /// Set the output value.
496  CombineArgs& setResult(const AValueType& val) { *mResultValPtr = val; return *this; }
497 
498  /// Redirect the A value to a new external source.
499  CombineArgs& setARef(const AValueType& a) { mAValPtr = &a; return *this; }
500  /// Redirect the B value to a new external source.
501  CombineArgs& setBRef(const BValueType& b) { mBValPtr = &b; return *this; }
502  /// Redirect the result value to a new external destination.
503  CombineArgs& setResultRef(AValueType& val) { mResultValPtr = &val; return *this; }
504 
505  /// @return true if the A value is active
506  bool aIsActive() const { return mAIsActive; }
507  /// @return true if the B value is active
508  bool bIsActive() const { return mBIsActive; }
509  /// @return true if the output value is active
510  bool resultIsActive() const { return mResultIsActive; }
511 
512  /// Set the active state of the A value.
513  CombineArgs& setAIsActive(bool b) { mAIsActive = b; updateResultActive(); return *this; }
514  /// Set the active state of the B value.
515  CombineArgs& setBIsActive(bool b) { mBIsActive = b; updateResultActive(); return *this; }
516  /// Set the active state of the output value.
517  CombineArgs& setResultIsActive(bool b) { mResultIsActive = b; return *this; }
518 
519 protected:
520  /// By default, the result value is active if either of the input values is active,
521  /// but this behavior can be overridden by calling setResultIsActive().
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 
533 /// This struct adapts a "grid combiner" functor to swap the A and B grid values
534 /// (e.g., so that if the original functor computes a + 2 * b, the adapted functor
535 /// will compute b + 2 * a).
536 template<typename ValueType, typename CombineOp>
538 {
539  SwappedCombineOp(CombineOp& _op): op(_op) {}
540 
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 
552 ////////////////////////////////////////
553 
554 
555 /// @brief Tag dispatch class that distinguishes shallow copy constructors
556 /// from deep copy constructors
557 class ShallowCopy {};
558 /// @brief Tag dispatch class that distinguishes topology copy constructors
559 /// from deep copy constructors
560 class TopologyCopy {};
561 /// @brief Tag dispatch class that distinguishes constructors that deep copy
562 class DeepCopy {};
563 /// @brief Tag dispatch class that distinguishes constructors that steal
564 class Steal {};
565 /// @brief Tag dispatch class that distinguishes constructors during file input
566 class PartialCreate {};
567 
568 } // namespace OPENVDB_VERSION_NAME
569 } // namespace openvdb
570 
571 
572 #endif // OPENVDB_TYPES_HAS_BEEN_INCLUDED
const AValueType & result() const
Get the output value.
Definition: Types.h:491
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:142
type
Definition: core.h:977
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: Types.h:167
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
const char * typeNameAsString< ValueMask >()
Definition: Types.h:396
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: Types.h:446
typename T::ValueType ElementType
Definition: Types.h:259
Tag dispatch class that distinguishes shallow copy constructors from deep copy constructors.
Definition: Types.h:557
const char * typeNameAsString< PointIndex32 >()
Definition: Types.h:425
typename T::ValueType ElementType
Definition: Types.h:204
const char * typeNameAsString< int32_t >()
Definition: Types.h:404
const char * typeNameAsString< Vec3i >()
Definition: Types.h:412
const char * typeNameAsString< uint16_t >()
Definition: Types.h:403
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:475
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: Types.h:515
const char * typeNameAsString< int8_t >()
Definition: Types.h:400
const char * typeNameAsString< int16_t >()
Definition: Types.h:402
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:178
const char * typeNameAsString< Mat3s >()
Definition: Types.h:419
GLuint const GLchar * name
Definition: glcorearb.h:785
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:24
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:566
const char * typeNameAsString< PointIndex64 >()
Definition: Types.h:426
const char * typeNameAsString< Vec3d >()
Definition: Types.h:414
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:122
const char * typeNameAsString< Mat4s >()
Definition: Types.h:421
GLint GLenum GLint x
Definition: glcorearb.h:408
GLsizeiptr size
Definition: glcorearb.h:663
std::shared_ptr< T > SharedPtr
Definition: Types.h:110
const AValueType & a() const
Get the A input value.
Definition: Types.h:486
const char * typeNameAsString< Vec3U16 >()
Definition: Types.h:411
Helper metafunction used to determine if the first template parameter is a specialization of the clas...
Definition: Types.h:188
const char * typeNameAsString< Vec3f >()
Definition: Types.h:413
const char * typeNameAsString< PointDataIndex32 >()
Definition: Types.h:427
GLuint64EXT * result
Definition: glew.h:14311
const char * typeNameAsString< uint32_t >()
Definition: Types.h:405
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:111
PointIndex(T i)
Explicit type conversion constructor.
Definition: Types.h:161
const char * typeNameAsString< uint8_t >()
Definition: Types.h:401
const char * typeNameAsString< float >()
Definition: Types.h:398
const char * typeNameAsString< Vec2i >()
Definition: Types.h:407
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:513
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
typename std::remove_const< ToType >::type Type
Definition: Types.h:317
const char * typeNameAsString()
Definition: Types.h:394
const char * typeNameAsString< int64_t >()
Definition: Types.h:406
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:247
Tag dispatch class that distinguishes constructors that steal.
Definition: Types.h:564
CopyConstness<T1, T2>::Type is either const T2 or T2 with no const qualifier, depending on whether T1...
Definition: Types.h:316
const char * typeNameAsString< Vec4d >()
Definition: Types.h:417
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:463
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: Types.h:517
const char * typeNameAsString< double >()
Definition: Types.h:399
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: Types.h:281
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:132
typename T::ValueType ElementType
Definition: Types.h:237
GLuint GLfloat * val
Definition: glcorearb.h:1607
Library and file format version numbers.
const char * typeNameAsString< bool >()
Definition: Types.h:395
AValueType & result()
Get the output value.
Definition: Types.h:492
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: Types.h:501
const void * ptr(const T *p)
Definition: format.h:3603
const char * typeNameAsString< Mat4d >()
Definition: Types.h:422
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: Types.h:503
const char * typeNameAsString< Vec3U8 >()
Definition: Types.h:410
const char * typeNameAsString< Vec2d >()
Definition: Types.h:409
void operator()(CombineArgs< ValueType > &args)
Definition: Types.h:541
GLsizei const GLfloat * value
Definition: glcorearb.h:823
unsigned char Byte
Definition: Types.h:55
**If you just want to fire and args
Definition: thread.h:615
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: Types.h:499
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: Types.h:152
const char * typeNameAsString< Vec4f >()
Definition: Types.h:416
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:560
const BValueType & b() const
Get the B input value.
Definition: Types.h:488
#define const
Definition: zconf.h:214
Tag dispatch class that distinguishes constructors that deep copy.
Definition: Types.h:562
const char * typeNameAsString< Vec4i >()
Definition: Types.h:415
typename T::ValueType ElementType
Definition: Types.h:220
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:114
Definition: half.h:91
const char * typeNameAsString< PointDataIndex64 >()
Definition: Types.h:428
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: Types.h:496
const char * typeNameAsString< Vec2s >()
Definition: Types.h:408
PointIndex(IntType i=IntType(0))
Definition: Types.h:158
const char * typeNameAsString< Mat3d >()
Definition: Types.h:420