Field3D
|
#include <FieldGroup.h>
Classes | |
struct | CountFields |
struct | GetIntersections |
struct | GetMinMax |
struct | GetMinMaxMIP |
struct | GrabFields |
struct | MemSize |
struct | Sample |
struct | SampleMIP |
Public Types | |
typedef fusion_ro::as_vector< MPLDenseTypes >::type | DenseTypes |
typedef fusion_ro::as_vector< MPLMIPDenseTypes >::type | MIPDenseTypes |
typedef fusion_ro::as_vector< MPLMIPSparseTypes >::type | MIPSparseTypes |
typedef BaseTypeList_T | MPLBaseTypes |
typedef mpl::transform< MPLBaseTypes, detail::MakeDense< ph::_1 > >::type | MPLDenseTypes |
typedef mpl::transform< MPLBaseTypes, detail::MakeMIPDense< ph::_1 > >::type | MPLMIPDenseTypes |
typedef mpl::transform< MPLBaseTypes, detail::MakeMIPSparse< ph::_1 > >::type | MPLMIPSparseTypes |
typedef mpl::transform< MPLBaseTypes, detail::MakeSparse< ph::_1 > >::type | MPLSparseTypes |
typedef fusion_ro::as_vector< MPLSparseTypes >::type | SparseTypes |
Public Member Functions | |
FieldGroup () | |
Default constructor, does nothing. More... | |
FieldGroup (const Field3D::FieldRes::Vec &fields) | |
Construct from a set of fields. More... | |
const FieldRes::Vec & | fields () const |
Returns a vector of FieldRes::Ptrs to the fields in the group. More... | |
bool | getIntersections (const Ray3d &ray, IntervalVec &intervals) const |
Gets the intersection intervals between the ray and the fields. More... | |
void | getMinMax (const Box3d &wsBounds, float *min, float *max) const |
Returns the min/max range within a given bounding box. More... | |
int | load (const std::string &filename, const std::string &attribute) |
Loads all fields from a given file and optional attribute pattern. More... | |
long long int | memSize () const |
Returns the memory use in bytes for the fields in the group. More... | |
void | sample (const V3d &vsP, float *result, bool isVs) const |
Samples the group of fields at the given point. This call will not include MIP fields, which require a spot size. More... | |
void | sampleMIP (const V3d &vsP, const float wsSpotSize, float *result, bool isVs) const |
Samples all the MIP fields in the group. More... | |
void | setup (const Field3D::FieldRes::Vec &fields) |
size_t | size () const |
The number of fields in the group. More... | |
Static Public Attributes | |
static const int | k_missingFile = -1 |
Used by load() to indicate missing file. More... | |
Private Attributes | |
FieldRes::Vec | m_allFields |
DenseTypes | m_dense |
MIPDenseTypes | m_mipDense |
MIPSparseTypes | m_mipSparse |
SparseTypes | m_sparse |
The FieldGroup is a convenient way to access a collection of heterogeneous fields as one. It will accept any combination of known data structures and template types and efficiently evaluates each one with the optimal interpolator, etc.
Definition at line 224 of file FieldGroup.h.
typedef BaseTypeList_T FieldGroup< BaseTypeList_T, Dims_T >::MPLBaseTypes |
Definition at line 229 of file FieldGroup.h.
typedef mpl::transform< MPLBaseTypes, detail::MakeDense<ph::_1> >::type FieldGroup< BaseTypeList_T, Dims_T >::MPLDenseTypes |
Definition at line 234 of file FieldGroup.h.
typedef mpl::transform< MPLBaseTypes, detail::MakeSparse<ph::_1> >::type FieldGroup< BaseTypeList_T, Dims_T >::MPLSparseTypes |
Definition at line 237 of file FieldGroup.h.
typedef mpl::transform< MPLBaseTypes, detail::MakeMIPDense<ph::_1> >::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPDenseTypes |
Definition at line 240 of file FieldGroup.h.
typedef mpl::transform< MPLBaseTypes, detail::MakeMIPSparse<ph::_1> >::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPSparseTypes |
Definition at line 243 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::DenseTypes |
Definition at line 246 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::SparseTypes |
Definition at line 247 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLMIPDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPDenseTypes |
Definition at line 248 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLMIPSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPSparseTypes |
Definition at line 249 of file FieldGroup.h.
FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( | ) |
FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( | const Field3D::FieldRes::Vec & | fields | ) |
Construct from a set of fields.
Definition at line 330 of file FieldGroup.h.
void FieldGroup< BaseTypeList_T, Dims_T >::setup | ( | const Field3D::FieldRes::Vec & | fields | ) |
Definition at line 339 of file FieldGroup.h.
References FieldGroup< BaseTypeList_T, Dims_T >::load().
int FieldGroup< BaseTypeList_T, Dims_T >::load | ( | const std::string & | filename, |
const std::string & | attribute | ||
) |
Loads all fields from a given file and optional attribute pattern.
Definition at line 356 of file FieldGroup.h.
References Field3DFileBase::getPartitionNames(), and Field3DInputFile::open().
Referenced by FieldGroup< BaseTypeList_T, Dims_T >::setup().
size_t FieldGroup< BaseTypeList_T, Dims_T >::size | ( | ) | const |
The number of fields in the group.
Definition at line 402 of file FieldGroup.h.
References FieldGroup< BaseTypeList_T, Dims_T >::CountFields::count.
void FieldGroup< BaseTypeList_T, Dims_T >::sample | ( | const V3d & | vsP, |
float * | result, | ||
bool | isVs | ||
) | const |
Samples the group of fields at the given point. This call will not include MIP fields, which require a spot size.
Definition at line 416 of file FieldGroup.h.
void FieldGroup< BaseTypeList_T, Dims_T >::sampleMIP | ( | const V3d & | vsP, |
const float | wsSpotSize, | ||
float * | result, | ||
bool | isVs | ||
) | const |
Samples all the MIP fields in the group.
Definition at line 429 of file FieldGroup.h.
References FieldGroup< BaseTypeList_T, Dims_T >::getIntersections().
bool FieldGroup< BaseTypeList_T, Dims_T >::getIntersections | ( | const Ray3d & | ray, |
IntervalVec & | intervals | ||
) | const |
Gets the intersection intervals between the ray and the fields.
Definition at line 444 of file FieldGroup.h.
Referenced by FieldGroup< BaseTypeList_T, Dims_T >::sampleMIP().
void FieldGroup< BaseTypeList_T, Dims_T >::getMinMax | ( | const Box3d & | wsBounds, |
float * | min, | ||
float * | max | ||
) | const |
long long int FieldGroup< BaseTypeList_T, Dims_T >::memSize | ( | ) | const |
Returns the memory use in bytes for the fields in the group.
Definition at line 474 of file FieldGroup.h.
|
inline |
Returns a vector of FieldRes::Ptrs to the fields in the group.
Definition at line 286 of file FieldGroup.h.
|
static |
Used by load() to indicate missing file.
Definition at line 254 of file FieldGroup.h.
|
private |
Definition at line 293 of file FieldGroup.h.
|
private |
Definition at line 294 of file FieldGroup.h.
|
private |
Definition at line 295 of file FieldGroup.h.
|
private |
Definition at line 296 of file FieldGroup.h.
|
private |
Definition at line 298 of file FieldGroup.h.