OpenVDB: Types.h Source File

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Types.h
Go to the documentation of this file.
1 //
3 // Copyright (c) 2012-2015 DreamWorks Animation LLC
4 //
5 // All rights reserved. This software is distributed under the
6 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
7 //
8 // Redistributions of source code must retain the above copyright
9 // and license notice and the following restrictions and disclaimer.
10 //
11 // * Neither the name of DreamWorks Animation nor the names of
12 // its contributors may be used to endorse or promote products derived
13 // from this software without specific prior written permission.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
20 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 // IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
27 // LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
28 //
30
31 #ifndef OPENVDB_TYPES_HAS_BEEN_INCLUDED
32 #define OPENVDB_TYPES_HAS_BEEN_INCLUDED
33
34 #include "version.h"
35 #include "Platform.h"
36 #include <OpenEXR/half.h>
37 #include <openvdb/math/Math.h>
38 #include <openvdb/math/BBox.h>
39 #include <openvdb/math/Quat.h>
40 #include <openvdb/math/Vec2.h>
41 #include <openvdb/math/Vec3.h>
42 #include <openvdb/math/Vec4.h>
43 #include <openvdb/math/Mat3.h>
44 #include <openvdb/math/Mat4.h>
45 #include <openvdb/math/Coord.h>
46 #include <boost/type_traits/is_convertible.hpp>
47 #include <boost/type_traits/is_integral.hpp>
48 #include <boost/static_assert.hpp>
49
50
51 namespace openvdb {
52 OPENVDB_USE_VERSION_NAMESPACE
53 namespace OPENVDB_VERSION_NAME {
54
55 // One-dimensional scalar types
56 typedef uint32_t Index32;
57 typedef uint64_t Index64;
58 typedef Index32 Index;
59 typedef int16_t Int16;
60 typedef int32_t Int32;
61 typedef int64_t Int64;
62 typedef Int32 Int;
63 typedef unsigned char Byte;
64 typedef double Real;
65
66 // Two-dimensional vector types
67 typedef math::Vec2<Real> Vec2R;
68 typedef math::Vec2<Index32> Vec2I;
69 typedef math::Vec2<float> Vec2f;
70 typedef math::Vec2<half> Vec2H;
71 using math::Vec2i;
72 using math::Vec2s;
73 using math::Vec2d;
74
75 // Three-dimensional vector types
76 typedef math::Vec3<Real> Vec3R;
77 typedef math::Vec3<Index32> Vec3I;
78 typedef math::Vec3<float> Vec3f;
79 typedef math::Vec3<half> Vec3H;
80 using math::Vec3i;
81 using math::Vec3s;
82 using math::Vec3d;
83
84 using math::Coord;
85 using math::CoordBBox;
86 typedef math::BBox<Vec3d> BBoxd;
87
88 // Four-dimensional vector types
89 typedef math::Vec4<Real> Vec4R;
90 typedef math::Vec4<Index32> Vec4I;
91 typedef math::Vec4<float> Vec4f;
92 typedef math::Vec4<half> Vec4H;
93 using math::Vec4i;
94 using math::Vec4s;
95 using math::Vec4d;
96
97 // Three-dimensional matrix types
98 typedef math::Mat3<Real> Mat3R;
99
100 // Four-dimensional matrix types
101 typedef math::Mat4<Real> Mat4R;
102 typedef math::Mat4<double> Mat4d;
103 typedef math::Mat4<float> Mat4s;
104
105 // Quaternions
106 typedef math::Quat<Real> QuatR;
107
108
110
111
115 template<typename IntType_, Index Kind>
116 struct PointIndex
117 {
118 BOOST_STATIC_ASSERT(boost::is_integral<IntType_>::value);
119
120 typedef IntType_ IntType;
121
122 PointIndex(IntType i = IntType(0)): mIndex(i) {}
123
124 operator IntType() const { return mIndex; }
125
127 template<typename T>
128 PointIndex operator+(T x) { return PointIndex(mIndex + IntType(x)); }
129
130 private:
131 IntType mIndex;
132 };
133
134
135 typedef PointIndex<Index32, 0> PointIndex32;
136 typedef PointIndex<Index64, 0> PointIndex64;
137
138 typedef PointIndex<Index32, 1> PointDataIndex32;
139 typedef PointIndex<Index64, 1> PointDataIndex64;
140
141
143
144
145 template<typename T> struct VecTraits {
146 static const bool IsVec = false;
147 static const int Size = 1;
148 typedef T ElementType;
149 };
150 template<typename T> struct VecTraits<math::Vec2<T> > {
151 static const bool IsVec = true;
152 static const int Size = 2;
153 typedef T ElementType;
154 };
155 template<typename T> struct VecTraits<math::Vec3<T> > {
156 static const bool IsVec = true;
157 static const int Size = 3;
158 typedef T ElementType;
159 };
160 template<typename T> struct VecTraits<math::Vec4<T> > {
161 static const bool IsVec = true;
162 static const int Size = 4;
163 typedef T ElementType;
164 };
165
166
168
169
179 template<typename FromType, typename ToType>
180 struct CanConvertType { enum { value = boost::is_convertible<FromType, ToType>::value }; };
181
182 // Specializations for vector types, which can be constructed from values
183 // of their own ValueTypes (or values that can be converted to their ValueTypes),
184 // but only explicitly
185 template<typename T> struct CanConvertType<T, math::Vec2<T> > { enum { value = true }; };
186 template<typename T> struct CanConvertType<T, math::Vec3<T> > { enum { value = true }; };
187 template<typename T> struct CanConvertType<T, math::Vec4<T> > { enum { value = true }; };
188 template<typename T> struct CanConvertType<math::Vec2<T>, math::Vec2<T> > { enum {value = true}; };
189 template<typename T> struct CanConvertType<math::Vec3<T>, math::Vec3<T> > { enum {value = true}; };
190 template<typename T> struct CanConvertType<math::Vec4<T>, math::Vec4<T> > { enum {value = true}; };
191 template<typename T0, typename T1>
192 struct CanConvertType<T0, math::Vec2<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
193 template<typename T0, typename T1>
194 struct CanConvertType<T0, math::Vec3<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
195 template<typename T0, typename T1>
196 struct CanConvertType<T0, math::Vec4<T1> > { enum { value = CanConvertType<T0, T1>::value }; };
197 template<> struct CanConvertType<PointIndex32, PointDataIndex32> { enum {value = true}; };
198 template<> struct CanConvertType<PointDataIndex32, PointIndex32> { enum {value = true}; };
199
201
202
203 // Add new items to the *end* of this list, and update NUM_GRID_CLASSES.
204 enum GridClass {
205 GRID_UNKNOWN = 0,
206 GRID_LEVEL_SET,
207 GRID_FOG_VOLUME,
208 GRID_STAGGERED
209 };
210 enum { NUM_GRID_CLASSES = GRID_STAGGERED + 1 };
211
212 static const Real LEVEL_SET_HALF_WIDTH = 3;
213
234 enum VecType {
235 VEC_INVARIANT = 0,
236 VEC_COVARIANT,
237 VEC_COVARIANT_NORMALIZE,
238 VEC_CONTRAVARIANT_RELATIVE,
239 VEC_CONTRAVARIANT_ABSOLUTE
240 };
241 enum { NUM_VEC_TYPES = VEC_CONTRAVARIANT_ABSOLUTE + 1 };
242
243
257 enum MergePolicy {
258 MERGE_ACTIVE_STATES = 0,
259 MERGE_NODES,
260 MERGE_ACTIVE_STATES_AND_NODES
261 };
262
263
265
266
267 template<typename T> const char* typeNameAsString() { return typeid(T).name(); }
268 template<> inline const char* typeNameAsString<bool>() { return "bool"; }
269 template<> inline const char* typeNameAsString<float>() { return "float"; }
270 template<> inline const char* typeNameAsString<double>() { return "double"; }
271 template<> inline const char* typeNameAsString<int32_t>() { return "int32"; }
272 template<> inline const char* typeNameAsString<uint32_t>() { return "uint32"; }
273 template<> inline const char* typeNameAsString<int64_t>() { return "int64"; }
274 template<> inline const char* typeNameAsString<Vec2i>() { return "vec2i"; }
275 template<> inline const char* typeNameAsString<Vec2s>() { return "vec2s"; }
276 template<> inline const char* typeNameAsString<Vec2d>() { return "vec2d"; }
277 template<> inline const char* typeNameAsString<Vec3i>() { return "vec3i"; }
278 template<> inline const char* typeNameAsString<Vec3f>() { return "vec3s"; }
279 template<> inline const char* typeNameAsString<Vec3d>() { return "vec3d"; }
280 template<> inline const char* typeNameAsString<std::string>() { return "string"; }
281 template<> inline const char* typeNameAsString<Mat4s>() { return "mat4s"; }
282 template<> inline const char* typeNameAsString<Mat4d>() { return "mat4d"; }
283 template<> inline const char* typeNameAsString<PointIndex32>() { return "ptidx32"; }
284 template<> inline const char* typeNameAsString<PointIndex64>() { return "ptidx64"; }
285 template<> inline const char* typeNameAsString<PointDataIndex32>() { return "ptdataidx32"; }
286 template<> inline const char* typeNameAsString<PointDataIndex64>() { return "ptdataidx64"; }
287
288
290
291
303 template<typename AValueType, typename BValueType = AValueType>
304 class CombineArgs
305 {
306 public:
307 typedef AValueType AValueT;
308 typedef BValueType BValueT;
309
310 CombineArgs():
311 mAValPtr(NULL), mBValPtr(NULL), mResultValPtr(&mResultVal),
312 mAIsActive(false), mBIsActive(false), mResultIsActive(false)
313 {}
314
316 CombineArgs(const AValueType& a, const BValueType& b, AValueType& result,
317 bool aOn = false, bool bOn = false):
318 mAValPtr(&a), mBValPtr(&b), mResultValPtr(&result),
319 mAIsActive(aOn), mBIsActive(bOn)
320 { updateResultActive(); }
321
323 CombineArgs(const AValueType& a, const BValueType& b, bool aOn = false, bool bOn = false):
324 mAValPtr(&a), mBValPtr(&b), mResultValPtr(&mResultVal),
325 mAIsActive(aOn), mBIsActive(bOn)
326 { updateResultActive(); }
327
329 const AValueType& a() const { return *mAValPtr; }
331 const BValueType& b() const { return *mBValPtr; }
333 const AValueType& result() const { return *mResultValPtr; }
335 AValueType& result() { return *mResultValPtr; }
337
339 CombineArgs& setResult(const AValueType& val) { *mResultValPtr = val; return *this; }
340
342 CombineArgs& setARef(const AValueType& a) { mAValPtr = &a; return *this; }
344 CombineArgs& setBRef(const BValueType& b) { mBValPtr = &b; return *this; }
346 CombineArgs& setResultRef(AValueType& val) { mResultValPtr = &val; return *this; }
347
349 bool aIsActive() const { return mAIsActive; }
351 bool bIsActive() const { return mBIsActive; }
353 bool resultIsActive() const { return mResultIsActive; }
354
356 CombineArgs& setAIsActive(bool b) { mAIsActive = b; updateResultActive(); return *this; }
358 CombineArgs& setBIsActive(bool b) { mBIsActive = b; updateResultActive(); return *this; }
360 CombineArgs& setResultIsActive(bool b) { mResultIsActive = b; return *this; }
361
362 protected:
365 void updateResultActive() { mResultIsActive = mAIsActive || mBIsActive; }
366
367 const AValueType* mAValPtr; // pointer to input value from A grid
368 const BValueType* mBValPtr; // pointer to input value from B grid
369 AValueType mResultVal; // computed output value (unused if stored externally)
370 AValueType* mResultValPtr; // pointer to either mResultVal or an external value
371 bool mAIsActive, mBIsActive; // active states of A and B values
372 bool mResultIsActive; // computed active state (default: A active || B active)
373 };
374
375
379 template<typename ValueType, typename CombineOp>
380 struct SwappedCombineOp
381 {
382 SwappedCombineOp(CombineOp& _op): op(_op) {}
383
384 void operator()(CombineArgs<ValueType>& args)
385 {
386 CombineArgs<ValueType> swappedArgs(args.b(), args.a(), args.result(),
387 args.bIsActive(), args.aIsActive());
388 op(swappedArgs);
389 }
390
391 CombineOp& op;
392 };
393
394
396
397
411 enum CopyPolicy { CP_NEW, CP_SHARE, CP_COPY };
412
413
414 // Dummy class that distinguishes shallow copy constructors from
415 // deep copy constructors
416 class ShallowCopy {};
417 // Dummy class that distinguishes topology copy constructors from
418 // deep copy constructors
419 class TopologyCopy {};
420 // Dummy class that distinguishes constructors during file input
421 class PartialCreate {};
422
423 } // namespace OPENVDB_VERSION_NAME
424 } // namespace openvdb
425
426
427 #if defined(__ICC)
428
429 // Use these defines to bracket a region of code that has safe static accesses.
430 // Keep the region as small as possible.
431 #define OPENVDB_START_THREADSAFE_STATIC_REFERENCE __pragma(warning(disable:1710))
432 #define OPENVDB_FINISH_THREADSAFE_STATIC_REFERENCE __pragma(warning(default:1710))
433 #define OPENVDB_START_THREADSAFE_STATIC_WRITE __pragma(warning(disable:1711))
434 #define OPENVDB_FINISH_THREADSAFE_STATIC_WRITE __pragma(warning(default:1711))
435 #define OPENVDB_START_THREADSAFE_STATIC_ADDRESS __pragma(warning(disable:1712))
436 #define OPENVDB_FINISH_THREADSAFE_STATIC_ADDRESS __pragma(warning(default:1712))
437
438 // Use these defines to bracket a region of code that has unsafe static accesses.
439 // Keep the region as small as possible.
440 #define OPENVDB_START_NON_THREADSAFE_STATIC_REFERENCE __pragma(warning(disable:1710))
441 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_REFERENCE __pragma(warning(default:1710))
442 #define OPENVDB_START_NON_THREADSAFE_STATIC_WRITE __pragma(warning(disable:1711))
443 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_WRITE __pragma(warning(default:1711))
444 #define OPENVDB_START_NON_THREADSAFE_STATIC_ADDRESS __pragma(warning(disable:1712))
445 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_ADDRESS __pragma(warning(default:1712))
446
447 // Simpler version for one-line cases
448 #define OPENVDB_THREADSAFE_STATIC_REFERENCE(CODE) \
449 __pragma(warning(disable:1710)); CODE; __pragma(warning(default:1710))
450 #define OPENVDB_THREADSAFE_STATIC_WRITE(CODE) \
451 __pragma(warning(disable:1711)); CODE; __pragma(warning(default:1711))
452 #define OPENVDB_THREADSAFE_STATIC_ADDRESS(CODE) \
453 __pragma(warning(disable:1712)); CODE; __pragma(warning(default:1712))
454
455 #else // GCC does not support these compiler warnings
456
457 #define OPENVDB_START_THREADSAFE_STATIC_REFERENCE
458 #define OPENVDB_FINISH_THREADSAFE_STATIC_REFERENCE
459 #define OPENVDB_START_THREADSAFE_STATIC_WRITE
460 #define OPENVDB_FINISH_THREADSAFE_STATIC_WRITE
461 #define OPENVDB_START_THREADSAFE_STATIC_ADDRESS
462 #define OPENVDB_FINISH_THREADSAFE_STATIC_ADDRESS
463
464 #define OPENVDB_START_NON_THREADSAFE_STATIC_REFERENCE
465 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_REFERENCE
466 #define OPENVDB_START_NON_THREADSAFE_STATIC_WRITE
467 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_WRITE
468 #define OPENVDB_START_NON_THREADSAFE_STATIC_ADDRESS
469 #define OPENVDB_FINISH_NON_THREADSAFE_STATIC_ADDRESS
470
471 #define OPENVDB_THREADSAFE_STATIC_REFERENCE(CODE) CODE
472 #define OPENVDB_THREADSAFE_STATIC_WRITE(CODE) CODE
473 #define OPENVDB_THREADSAFE_STATIC_ADDRESS(CODE) CODE
474
475 #endif // defined(__ICC)
476
477 #endif // OPENVDB_TYPES_HAS_BEEN_INCLUDED
478
479 // Copyright (c) 2012-2015 DreamWorks Animation LLC
480 // All rights reserved. This software is distributed under the
481 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
openvdb::v3_1_0::CombineArgs::result
AValueType & result()
Get the output value.
Definition: Types.h:335
openvdb::v3_1_0::math::Vec2
Definition: Vec2.h:48
openvdb::v3_1_0::math::Mat3
3x3 matrix class.
Definition: Mat3.h:54
openvdb::v3_1_0::Index
Index32 Index
Definition: Types.h:58
openvdb::v3_1_0::typeNameAsString< Mat4d >
const char * typeNameAsString< Mat4d >()
Definition: Types.h:282
openvdb::v3_1_0::CombineArgs::b
const BValueType & b() const
Get the B input value.
Definition: Types.h:331
Vec2.h
openvdb::v3_1_0::Vec4f
math::Vec4< float > Vec4f
Definition: Types.h:91
openvdb::v3_1_0::CP_COPY
Definition: Types.h:411
openvdb::v3_1_0::PointIndex64
PointIndex< Index64, 0 > PointIndex64
Definition: Types.h:136
openvdb::v3_1_0::CombineArgs::setBRef
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: Types.h:344
Vec3.h
openvdb::v3_1_0::Byte
unsigned char Byte
Definition: Types.h:63
openvdb::v3_1_0::PointIndex::PointIndex
PointIndex(IntType i=IntType(0))
Definition: Types.h:122
Math.h
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
openvdb::v3_1_0::typeNameAsString< Vec3i >
const char * typeNameAsString< Vec3i >()
Definition: Types.h:277
openvdb::v3_1_0::VecTraits::ElementType
T ElementType
Definition: Types.h:148
Coord.h
openvdb::v3_1_0::PointIndex::operator+
PointIndex operator+(T x)
Needed to support the (zeroVal<PointIndex>() + val) idiom.
Definition: Types.h:128
openvdb::v3_1_0::math::Vec4d
Vec4< double > Vec4d
Definition: Vec4.h:576
openvdb::v3_1_0::typeNameAsString< Vec2i >
const char * typeNameAsString< Vec2i >()
Definition: Types.h:274
openvdb::v3_1_0::CombineArgs::resultIsActive
bool resultIsActive() const
Definition: Types.h:353
openvdb::v3_1_0::Vec3R
math::Vec3< Real > Vec3R
Definition: Types.h:76
openvdb::v3_1_0::typeNameAsString< uint32_t >
const char * typeNameAsString< uint32_t >()
Definition: Types.h:272
openvdb::v3_1_0::Vec3f
math::Vec3< float > Vec3f
Definition: Types.h:78
openvdb::v3_1_0::MergePolicy
MergePolicy
Definition: Types.h:257
openvdb::v3_1_0::Vec2H
math::Vec2< half > Vec2H
Definition: Types.h:70
openvdb::v3_1_0::math::Vec4i
Vec4< int32_t > Vec4i
Definition: Vec4.h:573
openvdb::v3_1_0::typeNameAsString< float >
const char * typeNameAsString< float >()
Definition: Types.h:269
openvdb::v3_1_0::Index32
uint32_t Index32
Definition: Types.h:56
openvdb::v3_1_0::VecTraits
Definition: Types.h:145
Mat4.h
openvdb::v3_1_0::GRID_UNKNOWN
Definition: Types.h:205
openvdb::v3_1_0::Vec2f
math::Vec2< float > Vec2f
Definition: Types.h:69
openvdb::v3_1_0::math::Coord
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:47
openvdb::v3_1_0::Vec2R
math::Vec2< Real > Vec2R
Definition: Types.h:67
openvdb::v3_1_0::math::Vec2i
Vec2< int32_t > Vec2i
Definition: Vec2.h:532
openvdb::v3_1_0::Vec4H
math::Vec4< half > Vec4H
Definition: Types.h:92
openvdb::v3_1_0::Mat4R
math::Mat4< Real > Mat4R
Definition: Types.h:101
openvdb::v3_1_0::GRID_FOG_VOLUME
Definition: Types.h:207
openvdb::v3_1_0::CombineArgs::CombineArgs
CombineArgs()
Definition: Types.h:310
openvdb::v3_1_0::CombineArgs::bIsActive
bool bIsActive() const
Definition: Types.h:351
BBox.h
Mat3.h
openvdb::v3_1_0::math::Vec4
Definition: Mat4.h:51
Quat.h
openvdb::v3_1_0::NUM_GRID_CLASSES
Definition: Types.h:210
openvdb::v3_1_0::math::Vec3i
Vec3< int32_t > Vec3i
Definition: Vec3.h:640
openvdb::v3_1_0::typeNameAsString< PointDataIndex32 >
const char * typeNameAsString< PointDataIndex32 >()
Definition: Types.h:285
openvdb::v3_1_0::CombineArgs::AValueT
AValueType AValueT
Definition: Types.h:307
openvdb::v3_1_0::CombineArgs::mResultValPtr
AValueType * mResultValPtr
Definition: Types.h:370
openvdb::v3_1_0::VecTraits< math::Vec3< T > >::ElementType
T ElementType
Definition: Types.h:158
openvdb::v3_1_0::PointIndex
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: Types.h:116
openvdb::v3_1_0::VecTraits< math::Vec4< T > >::ElementType
T ElementType
Definition: Types.h:163
openvdb::v3_1_0::Int64
int64_t Int64
Definition: Types.h:61
openvdb::v3_1_0::CombineArgs::a
const AValueType & a() const
Get the A input value.
Definition: Types.h:329
openvdb::v3_1_0::GridClass
GridClass
Definition: Types.h:204
openvdb::v3_1_0::Mat4d
math::Mat4< double > Mat4d
Definition: Types.h:102
openvdb::v3_1_0::VEC_INVARIANT
Definition: Types.h:235
openvdb::v3_1_0::SwappedCombineOp::operator()
void operator()(CombineArgs< ValueType > &args)
Definition: Types.h:384
openvdb::v3_1_0::BBoxd
math::BBox< Vec3d > BBoxd
Definition: Types.h:86
openvdb::v3_1_0::typeNameAsString< PointIndex32 >
const char * typeNameAsString< PointIndex32 >()
Definition: Types.h:283
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
Definition: version.h:43
openvdb::v3_1_0::Vec2I
math::Vec2< Index32 > Vec2I
Definition: Types.h:68
openvdb::v3_1_0::CombineArgs::setResultRef
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition: Types.h:346
openvdb::v3_1_0::QuatR
math::Quat< Real > QuatR
Definition: Types.h:106
openvdb::v3_1_0::typeNameAsString< Vec3d >
const char * typeNameAsString< Vec3d >()
Definition: Types.h:279
openvdb::v3_1_0::typeNameAsString< int32_t >
const char * typeNameAsString< int32_t >()
Definition: Types.h:271
openvdb::v3_1_0::Mat4s
math::Mat4< float > Mat4s
Definition: Types.h:103
openvdb::v3_1_0::VecTraits< math::Vec2< T > >::ElementType
T ElementType
Definition: Types.h:153
openvdb::v3_1_0::typeNameAsString< PointIndex64 >
const char * typeNameAsString< PointIndex64 >()
Definition: Types.h:284
openvdb::v3_1_0::CombineArgs::setARef
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: Types.h:342
openvdb::v3_1_0::math::Vec3< Real >
openvdb::v3_1_0::VecType
VecType
Definition: Types.h:234
openvdb::v3_1_0::CombineArgs::mBValPtr
const BValueType * mBValPtr
Definition: Types.h:368
openvdb::v3_1_0::SwappedCombineOp::SwappedCombineOp
SwappedCombineOp(CombineOp &_op)
Definition: Types.h:382
openvdb::v3_1_0::math::Vec4s
Vec4< float > Vec4s
Definition: Vec4.h:575
openvdb::v3_1_0::NUM_VEC_TYPES
Definition: Types.h:241
openvdb
Definition: Exceptions.h:39
openvdb::v3_1_0::CombineArgs::mAValPtr
const AValueType * mAValPtr
Definition: Types.h:367
openvdb::v3_1_0::VEC_CONTRAVARIANT_ABSOLUTE
Definition: Types.h:239
openvdb::v3_1_0::TopologyCopy
Definition: Types.h:419
openvdb::v3_1_0::CP_SHARE
Definition: Types.h:411
openvdb::v3_1_0::typeNameAsString< Vec2d >
const char * typeNameAsString< Vec2d >()
Definition: Types.h:276
openvdb::v3_1_0::CombineArgs::setResult
CombineArgs & setResult(const AValueType &val)
Set the output value.
Definition: Types.h:339
openvdb::v3_1_0::CombineArgs::setResultIsActive
CombineArgs & setResultIsActive(bool b)
Set the active state of the output value.
Definition: Types.h:360
openvdb::v3_1_0::typeNameAsString< Mat4s >
const char * typeNameAsString< Mat4s >()
Definition: Types.h:281
openvdb::v3_1_0::SwappedCombineOp
Definition: Types.h:380
openvdb::v3_1_0::math::Vec3d
Vec3< double > Vec3d
Definition: Vec3.h:643
openvdb::v3_1_0::GRID_LEVEL_SET
Definition: Types.h:206
openvdb::v3_1_0::CombineArgs::mResultIsActive
bool mResultIsActive
Definition: Types.h:372
openvdb::v3_1_0::math::BBox< Vec3d >
version.h
openvdb::v3_1_0::Int
Int32 Int
Definition: Types.h:62
openvdb::v3_1_0::CombineArgs::result
const AValueType & result() const
Get the output value.
Definition: Types.h:334
openvdb::v3_1_0::MERGE_NODES
Definition: Types.h:259
openvdb::v3_1_0::CombineArgs::BValueT
BValueType BValueT
Definition: Types.h:308
openvdb::v3_1_0::CombineArgs::mBIsActive
bool mBIsActive
Definition: Types.h:371
openvdb::v3_1_0::CombineArgs::setBIsActive
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition: Types.h:358
openvdb::v3_1_0::typeNameAsString< bool >
const char * typeNameAsString< bool >()
Definition: Types.h:268
openvdb::v3_1_0::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: Types.h:316
openvdb::v3_1_0::math::Quat
Definition: Mat.h:145
openvdb::v3_1_0::VEC_COVARIANT_NORMALIZE
Definition: Types.h:237
openvdb::v3_1_0::Real
double Real
Definition: Types.h:64
openvdb::v3_1_0::Vec3H
math::Vec3< half > Vec3H
Definition: Types.h:79
openvdb::v3_1_0::CombineArgs
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: Types.h:304
openvdb::v3_1_0::CombineArgs::setAIsActive
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition: Types.h:356
openvdb::v3_1_0::Int32
int32_t Int32
Definition: Types.h:60
openvdb::v3_1_0::Index64
uint64_t Index64
Definition: Types.h:57
openvdb::v3_1_0::typeNameAsString< Vec2s >
const char * typeNameAsString< Vec2s >()
Definition: Types.h:275
openvdb::v3_1_0::Vec3I
math::Vec3< Index32 > Vec3I
Definition: Types.h:77
openvdb::v3_1_0::CopyPolicy
CopyPolicy
Definition: Types.h:411
openvdb::v3_1_0::ShallowCopy
Definition: Types.h:416
openvdb::v3_1_0::Int16
int16_t Int16
Definition: Types.h:59
openvdb::v3_1_0::CombineArgs::updateResultActive
void updateResultActive()
Definition: Types.h:365
openvdb::v3_1_0::Vec4I
math::Vec4< Index32 > Vec4I
Definition: Types.h:90
openvdb::v3_1_0::math::Mat4< Real >
openvdb::v3_1_0::VEC_CONTRAVARIANT_RELATIVE
Definition: Types.h:238
openvdb::v3_1_0::typeNameAsString< PointDataIndex64 >
const char * typeNameAsString< PointDataIndex64 >()
Definition: Types.h:286
openvdb::v3_1_0::VEC_COVARIANT
Definition: Types.h:236
openvdb::v3_1_0::typeNameAsString< int64_t >
const char * typeNameAsString< int64_t >()
Definition: Types.h:273
openvdb::v3_1_0::typeNameAsString
const char * typeNameAsString()
Definition: Types.h:267
openvdb::v3_1_0::CombineArgs::aIsActive
bool aIsActive() const
Definition: Types.h:349
openvdb::v3_1_0::CanConvertType
CanConvertType<FromType, ToType>::value is true if a value of type ToType can be constructed from a v...
Definition: Types.h:180
openvdb::v3_1_0::math::Vec2s
Vec2< float > Vec2s
Definition: Vec2.h:534
openvdb::v3_1_0::PointDataIndex64
PointIndex< Index64, 1 > PointDataIndex64
Definition: Types.h:139
openvdb::v3_1_0::PartialCreate
Definition: Types.h:421
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:71
openvdb::v3_1_0::CombineArgs::mResultVal
AValueType mResultVal
Definition: Types.h:369
openvdb::v3_1_0::typeNameAsString< Vec3f >
const char * typeNameAsString< Vec3f >()
Definition: Types.h:278
openvdb::v3_1_0::typeNameAsString< double >
const char * typeNameAsString< double >()
Definition: Types.h:270
openvdb::v3_1_0::math::Vec3s
Vec3< float > Vec3s
Definition: Vec3.h:642
openvdb::v3_1_0::PointIndex32
PointIndex< Index32, 0 > PointIndex32
Definition: Types.h:135
openvdb::v3_1_0::Vec4R
math::Vec4< Real > Vec4R
Definition: Types.h:89
openvdb::v3_1_0::PointIndex::IntType
IntType_ IntType
Definition: Types.h:120
openvdb::v3_1_0::GRID_STAGGERED
Definition: Types.h:208
openvdb::v3_1_0::LEVEL_SET_HALF_WIDTH
static const Real LEVEL_SET_HALF_WIDTH
Definition: Types.h:212
openvdb::v3_1_0::MERGE_ACTIVE_STATES
Definition: Types.h:258
openvdb::v3_1_0::math::CoordBBox
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:252
openvdb::v3_1_0::math::Vec2d
Vec2< double > Vec2d
Definition: Vec2.h:535
openvdb::v3_1_0::SwappedCombineOp::op
CombineOp & op
Definition: Types.h:391
openvdb::v3_1_0::CP_NEW
Definition: Types.h:411
openvdb::v3_1_0::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: Types.h:323
openvdb::v3_1_0::Mat3R
math::Mat3< Real > Mat3R
Definition: Types.h:98
Platform.h
openvdb::v3_1_0::MERGE_ACTIVE_STATES_AND_NODES
Definition: Types.h:260
Vec4.h
openvdb::v3_1_0::PointDataIndex32
PointIndex< Index32, 1 > PointDataIndex32
Definition: Types.h:138