Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit b3d02ca

Browse files
committed
Adding MIP offset calculation. Bumping version to 1.7.1
1 parent 9fbe088 commit b3d02ca

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

apps/f3dmakemip/main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,14 @@ void makeMIP(typename Field<Data_T>::Ptr field, const Options &options,
252252
cout << " Filtering \"" << field->name << ":" << field->attribute
253253
<< "\" (" << field->classType() << ")" << endl;
254254

255+
const V3i offset = computeOffset(*field);
256+
255257
// Handle dense fields
256258
if (DenseType *dense = dynamic_cast<DenseType*>(field.get())) {
257259
// MIP
258260
typename MIPDenseType::Ptr mip =
259261
makeMIP<MIPDenseType, TriangleFilter>
260-
(*dense, options.minRes, options.numThreads);
262+
(*dense, options.minRes, offset, options.numThreads);
261263
writeField<Data_T>(mip, out);
262264
// Min/Max
263265
if (options.doMinMax) {
@@ -278,7 +280,7 @@ void makeMIP(typename Field<Data_T>::Ptr field, const Options &options,
278280
// MIP
279281
typename MIPSparseType::Ptr mip =
280282
makeMIP<MIPSparseType, TriangleFilter>
281-
(*sparse, options.minRes, options.numThreads);
283+
(*sparse, options.minRes, offset, options.numThreads);
282284
writeField<Data_T>(mip, out);
283285
// Min/Max
284286
if (options.doMinMax) {
@@ -299,7 +301,7 @@ void makeMIP(typename Field<Data_T>::Ptr field, const Options &options,
299301
// MIP
300302
typename MIPDenseType::Ptr mip =
301303
makeMIP<MIPDenseType, TriangleFilter>
302-
(*dense->concreteMipLevel(0), options.minRes, options.numThreads);
304+
(*dense->concreteMipLevel(0), options.minRes, offset, options.numThreads);
303305
writeField<Data_T>(mip, out);
304306
// Min/Max
305307
if (options.doMinMax) {
@@ -319,7 +321,7 @@ void makeMIP(typename Field<Data_T>::Ptr field, const Options &options,
319321
if (MIPSparseType *sparse = dynamic_cast<MIPSparseType*>(field.get())) {
320322
// MIP
321323
typename MIPSparseType::Ptr mip = makeMIP<MIPSparseType, TriangleFilter>
322-
(*sparse->concreteMipLevel(0), options.minRes, options.numThreads);
324+
(*sparse->concreteMipLevel(0), options.minRes, offset, options.numThreads);
323325
writeField<Data_T>(mip, out);
324326
// Min/Max
325327
if (options.doMinMax) {

export/Resample.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ struct TriangleFilter : public Filter
292292
return 1.0f * m_width;
293293
}
294294
template <typename Value_T>
295-
static void op(Value_T &accumValue, const Value_T value)
295+
static void op(Value_T &/*accumValue*/, const Value_T /*value*/)
296296
{ /* No-op */ }
297297
private:
298298
const float m_width;

export/ns.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#define FIELD3D_MAJOR_VER 1
3939
#define FIELD3D_MINOR_VER 7
40-
#define FIELD3D_MICRO_VER 0
40+
#define FIELD3D_MICRO_VER 1
4141

4242
#define FIELD3D_VERSION_NS v1_7
4343

0 commit comments

Comments
 (0)