/usr/include/Field3D/FieldWrapper.h is in libfield3d-dev 1.6.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | //----------------------------------------------------------------------------//
#ifndef __F3DUTIL_FIELDWRAPPER_H__
#define __F3DUTIL_FIELDWRAPPER_H__
//------------------------------------------------------------------------------
// Field3D includes
#include <lava/field3d15/DenseField.h>
#include <lava/field3d15/Field3DFile.h>
#include <lava/field3d15/FieldInterp.h>
#include <lava/field3d15/InitIO.h>
#include <lava/field3d15/MIPField.h>
#include <lava/field3d15/MIPUtil.h>
#include <lava/field3d15/SparseField.h>
// Project includes
#include "FieldSampler.h"
//----------------------------------------------------------------------------//
#include "ns.h"
FIELD3D_NAMESPACE_OPEN
//------------------------------------------------------------------------------
// FieldWrapper
//------------------------------------------------------------------------------
//! This class wraps up a single field to make its interpolator and its
//! mapping easily accessible. The 'Vec' typedef gives access to a std::vector.
template <typename Field_T>
struct FieldWrapper
{
typedef Field_T field_type;
typedef std::vector<FieldWrapper> Vec;
FieldWrapper(const typename Field_T::Ptr f)
: field(f.get()),
fieldPtr(f),
mapping(f->mapping().get()),
vsBounds(continuousBounds(f->dataWindow()))
{ }
typename Field_T::LinearInterp interp;
const Field_T *field;
typename Field_T::Ptr fieldPtr;
const Field3D::FieldMapping *mapping;
Box3d vsBounds;
};
//------------------------------------------------------------------------------
// MIPFieldWrapper
//------------------------------------------------------------------------------
//! This class wraps up a single MIP field to make its interpolator and its
//! mapping easily accessible. The 'Vec' typedef gives access to a std::vector.
template <typename Field_T>
struct MIPFieldWrapper
{
typedef Field_T field_type;
typedef std::vector<MIPFieldWrapper> Vec;
typedef typename Field_T::LinearInterp LinearInterp;
MIPFieldWrapper(const typename Field_T::Ptr f)
: interpPtr(new LinearInterp(*f)),
field(f.get()),
fieldPtr(f),
mapping(f->mapping().get()),
vsBounds(continuousBounds(f->dataWindow()))
{
interp = interpPtr.get();
}
boost::shared_ptr<LinearInterp> interpPtr;
LinearInterp *interp;
const Field_T *field;
typename Field_T::Ptr fieldPtr;
const Field3D::FieldMapping *mapping;
Box3d vsBounds;
};
//----------------------------------------------------------------------------//
FIELD3D_NAMESPACE_HEADER_CLOSE
//------------------------------------------------------------------------------
#endif // include guard
//------------------------------------------------------------------------------
|