Skip to content

Commit 8da2a9c

Browse files
Merged changes from SESI for compatibility with C++11 compilers.
1 parent 1188a7d commit 8da2a9c

30 files changed

+936
-363
lines changed

openvdb/CHANGES

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ Version 2.2.0 - In development
66
GridSampler, DualGridSampler, et al.
77
- Modified tools::DualGridSampler so it is more consistent with
88
tools::GridSampler.
9-
- Added selection of iso-value to the LevelSetRayIntersector and
10-
openvdb_render.
9+
- Added an option to the LevelSetRayIntersector and to vdb_render
10+
to specify the isovalue of the level set.
11+
- Added methods to the LevelSetRayIntersector to return the time of
12+
intersection along a world or index ray.
13+
- tools::cpt(), tools::curl(), tools::laplacian(), tools::meanCurvature()
14+
and tools::normalize() now output grids with appropriate vector types
15+
(covariant, contravariant, etc.).
1116
- Added a Grid::topologyDifference() method.
1217
- Added topology union, intersection and difference operations to
1318
the Combine SOP. These operations combine the active voxel topologies
@@ -17,7 +22,19 @@ Version 2.2.0 - In development
1722
- The Fill SOP now allows the fill region bounds to be specified either in
1823
index space (as before), in world space, or using the bounds of geometry
1924
connected to an optional new reference input.
25+
- Added an option to the Transform SOP to apply the transform to the
26+
voxel values of vector-valued grids, in accordance with those grids'
27+
Vector Type metadata settings.
28+
- Added toggle to specify offet in the "Offset Level Set" SOP in world or
29+
voxel units.
30+
- Added a Vector Type menu to the Vector Merge SOP.
31+
- Removed the masking options in the Renormalize SOP (since it's not
32+
supported yet).
33+
- Fixed a bug in the mean curvature computation that could produce a nan
34+
in regions with constant values.
2035
- Fixed build issue reported for Clang 3.2.
36+
- Made various changes for compatibility with C++11 compilers.
37+
[Contributed by SESI]
2138

2239
API changes:
2340
- tools::DualGridSampler is no longer templated on the target grid type,

openvdb/Grid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ typedef boost::shared_ptr<GridCPtrSet> GridCPtrSetPtr;
417417
/// @brief Predicate functor that returns @c true for grids that have a specified name
418418
struct OPENVDB_API GridNamePred
419419
{
420-
GridNamePred(const Name& name): name(name) {}
420+
GridNamePred(const Name& _name): name(_name) {}
421421
bool operator()(const GridBase::ConstPtr& g) const { return g && g->getName() == name; }
422422
Name name;
423423
};

openvdb/Platform.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@
5555
#define OPENVDB_CHECK_GCC(MAJOR, MINOR) 0
5656
#endif
5757

58+
/// Macro for determining if there are sufficient C++0x/C++11 features
59+
#ifdef __INTEL_COMPILER
60+
#ifdef __INTEL_CXX11_MODE__
61+
#define OPENVDB_HAS_CXX11 1
62+
#endif
63+
#elif defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus > 199711L)
64+
#define OPENVDB_HAS_CXX11 1
65+
#elif defined(_MSC_VER)
66+
#if (_MSC_VER >= 1700)
67+
#define OPENVDB_HAS_CXX11 1
68+
#endif
69+
#endif
70+
#if defined(__GNUC__) && !OPENVDB_CHECK_GCC(4, 4)
71+
// ICC uses GCC's standard library headers, so even if the ICC version
72+
// is recent enough for C++11, the GCC version might not be.
73+
#undef OPENVDB_HAS_CXX11
74+
#endif
75+
5876
/// For compilers that need templated function specializations to have
5977
/// storage qualifiers, we need to declare the specializations as static inline.
6078
/// Otherwise, we'll get linker errors about multiply defined symbols.

openvdb/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class CombineArgs
306306
template<typename ValueType, typename CombineOp>
307307
struct SwappedCombineOp
308308
{
309-
SwappedCombineOp(CombineOp& op): op(op) {}
309+
SwappedCombineOp(CombineOp& _op): op(_op) {}
310310

311311
void operator()(CombineArgs<ValueType>& args)
312312
{

openvdb/doc/changes.txt

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@
1212
@vdblink::tools::DualGridSampler DualGridSampler@endlink, et al.
1313
- Modified @vdblink::tools::DualGridSampler DualGridSampler@endlink so
1414
it is more consistent with @vdblink::tools::GridSampler GridSampler@endlink.
15-
- Added selection of iso-value to the
15+
- Added an option to the
1616
@vdblink::tools::LevelSetRayIntersector LevelSetRayIntersector@endlink
17-
and openvdb_render.
17+
and to @c vdb_render to specify the isovalue of the level set.
18+
- Added methods to the
19+
@vdblink::tools::LevelSetRayIntersector LevelSetRayIntersector@endlink
20+
to return the time of intersection along a world or index ray.
21+
- The @vdblink::tools::cpt() cpt@endlink, @vdblink::tools::curl() curl@endlink,
22+
@vdblink::tools::laplacian() laplacian@endlink,
23+
@vdblink::tools::meanCurvature() meanCurvature@endlink
24+
and @vdblink::tools::normalize() normalize@endlink tools now output grids
25+
with appropriate @vdblink::VecType vector types@endlink
26+
(covariant, contravariant, etc.).
1827
- Added a
1928
@vdblink::Grid::topologyDifference() Grid::topologyDifference@endlink method.
2029
- Added topology union, intersection and difference operations to
@@ -25,7 +34,18 @@
2534
- The Fill SOP now allows the fill region bounds to be specified either in
2635
index space (as before), in world space, or using the bounds of geometry
2736
connected to an optional new reference input.
37+
- Added an option to the Transform SOP to apply the transform to the voxel
38+
values of vector-valued grids, in accordance with those grids&rsquo;
39+
Vector Type metadata settings.
40+
- Added toggle to specify offet in the "Offset Level Set" SOP in world or voxel units.
41+
- Added a Vector Type menu to the Vector Merge SOP.
42+
- Removed the masking options in the Renormalize SOP (since it's not supported
43+
yet).
44+
- Fixed a bug in the mean curvature computation that could produce a nan
45+
in regions with constant values.
2846
- Fixed build issue reported for Clang 3.2.
47+
- Made various changes for compatibility with C++11 compilers.
48+
<I>[Contributed by SESI]</I>
2949

3050
@par
3151
API changes:

openvdb/math/Mat4.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ class Mat4: public Mat<4, T>
7575
template<typename Source>
7676
Mat4(Source *a)
7777
{
78-
register int i;
79-
80-
for (i = 0; i < 16; i++) {
78+
for (int i = 0; i < 16; i++) {
8179
MyBase::mm[i] = a[i];
8280
}
8381
}

0 commit comments

Comments
 (0)