FieldGroup< BaseTypeList_T, Dims_T > Class Template Reference

`#include <FieldGroup.h>`

## Classes

struct | CountFields
struct | DoWsBoundsOptimization
struct | GetIntersections
struct | GetMinMax
struct | GetMinMaxMIP
struct | GetMinMaxPrefilt
struct | GetWsBounds
struct | GrabFields
struct | MakeMinMax
struct | MakeMinMaxMIP
struct | MemSize
struct | PointIsect
struct | Sample
struct | SampleMIP
struct | SampleMIPMultiple
struct | SampleMultiple

## Public Types

enum | CompositeOp { Add = 0 , Avg }
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.
| FieldGroup (const Field3D::FieldRes::Vec &fields)
| Construct from a set of fields.
const FieldRes::Vec & | fields () const
| Returns a vector of FieldRes::Ptrs to the fields in the group.
bool | getIntersections (const Ray3d &ray, IntervalVec &intervals) const
| Gets the intersection intervals between the ray and the fields.
void | getMinMax (const Box3d &wsBounds, float *min, float *max) const
| Returns the min/max range within a given bounding box.
bool | hasPrefiltMinMax () const
| Whether the FieldGroup has a pre-filtered min/max representation.
bool | intersects (const V3d &wsP) const
| Whether the given point intersects any of the fields in the FieldGroup.
int | load (const std::string &filename, const std::string &attribute)
| Loads all fields from a given file and optional attribute pattern.
void | makeMinMax (const float resMult)
| Make min/max representations of the fields in the group.
long long int | memSize () const
| Returns the memory use in bytes for the fields in the group.
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.
void | sample (const V3d &wsP, const float wsSpotSize, const float time, float *result, const CompositeOp compOp=Add)
| Unified sampling of the group's fields. Will handle both MIP and non-MIP data with optional compositing functor.
void | sampleMIP (const V3d &vsP, const float wsSpotSize, float *result, bool isVs) const
| Samples all the MIP fields in the group.
void | sampleMIPMultiple (const size_t n, const float *wsP, const float *wsSpotSize, float *result) const
| Samples all the MIP fields in the group.
void | sampleMultiple (const size_t n, const float *wsP, float *result) const
| Samples the fields in the group.
void | setOsToWs (const Imath::M44d &osToWs)
| Sets the current object to world transform. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields.
virtual void | setup (const Field3D::FieldRes::Ptr field)
| Adds a single field to the group.
virtual void | setup (const Field3D::FieldRes::Vec &fields)
| Initializes the FieldGroup from a set of fields.
virtual void | setup (const Field3D::FieldRes::Vec &fields, const Field3D::FieldRes::Vec &minFields, const Field3D::FieldRes::Vec &maxFields)
| Initializes the FieldGroup from a set of fields with pre-computed min/max representations.
void | setValueRemapOp (ValueRemapOp::Ptr op)
| Sets the current ValueRemap operator. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields. By default, no value remapping takes place.
virtual void | setWsBoundsOptimization (const bool doWsBoundsOptimization)
| Enable world axis aligned bounding box in lookups. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields.
virtual size_t | size () const
| The number of fields in the group.
size_t | sizeMIP () const
| The number of MIP fields in the group.
Box3d | wsBounds () const
| Returns the bounds of the group.

## Static Public Attributes

static const int | k_missingFile = -1
| Used by load() to indicate missing file.

## Protected Member Functions

void | setupMinMax (const FieldRes::Vec &minFields, const FieldRes::Vec &maxFields)
| Set up the min/max MIP representations.

## Protected Attributes

FieldRes::Vec | m_allFields
| Stores all the fields owned by the FieldGroup.
FieldRes::Vec | m_auxFields
| Stores all the auxiliary fields owned by the FieldGroup.
DenseTypes | m_dense
bool | m_doWsBoundsOptimization
| Enable world space bounds optimization.
bool | m_hasPrefiltMinMax
| Whether pre-filtered min/max are present.
MIPDenseTypes | m_mipDense
MIPDenseTypes | m_mipDenseMax
MIPDenseTypes | m_mipDenseMin
MIPSparseTypes | m_mipSparse
MIPSparseTypes | m_mipSparseMax
MIPSparseTypes | m_mipSparseMin
M44d | m_osToWs
| Current object to world transform.
SparseTypes | m_sparse
ValueRemapOp::Ptr | m_valueRemapOp
| Current value remap op. Defaults to null pointer.

## Detailed Description

template<typename BaseTypeList_T, int Dims_T>
class FieldGroup< BaseTypeList_T, Dims_T >

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.

FieldGroup also provides efficient min/max queries: If FieldGroup::load() is called, min/max representations of the attributes are read from disk, if available. Otherwise, min/max representations can be constructed by calling FieldGroup::makeMinMax().

The class can also be used to provide basic instancing. By calling setTransform() prior to setup() and load(), an object transform may be applied to each set of fields.

Definition at line 303 of file FieldGroup.h.

## Member Typedef Documentation

## MPLBaseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef BaseTypeList_T FieldGroup< BaseTypeList_T, Dims_T >::MPLBaseTypes

Definition at line 308 of file FieldGroup.h.

## MPLDenseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef mpl::transform<MPLBaseTypes,detail::MakeDense<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLDenseTypes

Definition at line 313 of file FieldGroup.h.

## MPLSparseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef mpl::transform<MPLBaseTypes,detail::MakeSparse<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLSparseTypes

Definition at line 316 of file FieldGroup.h.

## MPLMIPDenseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef mpl::transform<MPLBaseTypes,detail::MakeMIPDense<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPDenseTypes

Definition at line 319 of file FieldGroup.h.

## MPLMIPSparseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef mpl::transform<MPLBaseTypes,detail::MakeMIPSparse<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPSparseTypes

Definition at line 322 of file FieldGroup.h.

## DenseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef fusion_ro::as_vector<MPLDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::DenseTypes

Definition at line 325 of file FieldGroup.h.

## SparseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef fusion_ro::as_vector<MPLSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::SparseTypes

Definition at line 326 of file FieldGroup.h.

## MIPDenseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef fusion_ro::as_vector<MPLMIPDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPDenseTypes

Definition at line 327 of file FieldGroup.h.

## MIPSparseTypes

template<typename BaseTypeList_T, int Dims_T>

typedef fusion_ro::as_vector<MPLMIPSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPSparseTypes

Definition at line 328 of file FieldGroup.h.

## Member Enumeration Documentation

## CompositeOp

template<typename BaseTypeList_T, int Dims_T>

enum FieldGroup::CompositeOp

Enumerator
Add |
Avg |

Definition at line 332 of file FieldGroup.h.

{
Add = 0,
Avg
};
FieldGroup::Add
@ Add
Definition FieldGroup.h:334
FieldGroup::Avg
@ Avg
Definition FieldGroup.h:335

## Constructor & Destructor Documentation

## FieldGroup() [1/2]

template<typename BaseTypeList_T, int Dims_T>

FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( |  | ) |

Default constructor, does nothing.

Definition at line 483 of file FieldGroup.h.

: m_hasPrefiltMinMax(false), m_doWsBoundsOptimization(false)
{ }
FieldGroup::m_doWsBoundsOptimization
bool m_doWsBoundsOptimization
Enable world space bounds optimization.
Definition FieldGroup.h:442
FieldGroup::m_hasPrefiltMinMax
bool m_hasPrefiltMinMax
Whether pre-filtered min/max are present.
Definition FieldGroup.h:436

References m_doWsBoundsOptimization, and m_hasPrefiltMinMax.

## FieldGroup() [2/2]

template<typename BaseTypeList_T, int Dims_T>

FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( | const Field3D::FieldRes::Vec & | fields | ) |

Construct from a set of fields.

Definition at line 490 of file FieldGroup.h.

: m_hasPrefiltMinMax(false), m_doWsBoundsOptimization(false)
{
// Perform setup
setup(fields);
}
FieldGroup::fields
const FieldRes::Vec & fields() const
Returns a vector of FieldRes::Ptrs to the fields in the group.
Definition FieldGroup.h:417
FieldGroup::setup
virtual void setup(const Field3D::FieldRes::Ptr field)
Adds a single field to the group.
Definition FieldGroup.h:538

References fields(), m_doWsBoundsOptimization, m_hasPrefiltMinMax, and setup().

## Member Function Documentation

## setOsToWs()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setOsToWs | ( | const Imath::M44d & | osToWs | ) |

Sets the current object to world transform. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields.

Definition at line 502 of file FieldGroup.h.

{
m_osToWs = osToWs;
}
FieldGroup
Definition FieldGroup.h:304
FieldGroup::m_osToWs
M44d m_osToWs
Current object to world transform.
Definition FieldGroup.h:439

References m_osToWs.

## setWsBoundsOptimization()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setWsBoundsOptimization | ( | const bool | doWsBoundsOptimization | ) |

virtual

Enable world axis aligned bounding box in lookups. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields.

Definition at line 511 of file FieldGroup.h.

{
m_doWsBoundsOptimization = doWsBoundsOptimization;
if (doWsBoundsOptimization) {
DoWsBoundsOptimization op(m_doWsBoundsOptimization);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
}
}
FieldGroup::DoWsBoundsOptimization
Definition FieldGroup.h:957
FieldGroup::m_mipSparse
MIPSparseTypes m_mipSparse
Definition FieldGroup.h:433
FieldGroup::m_dense
DenseTypes m_dense
Definition FieldGroup.h:430
FieldGroup::m_sparse
SparseTypes m_sparse
Definition FieldGroup.h:431
FieldGroup::m_mipDense
MIPDenseTypes m_mipDense
Definition FieldGroup.h:432

References m_dense, m_doWsBoundsOptimization, m_mipDense, m_mipSparse, and m_sparse.

## setValueRemapOp()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setValueRemapOp | ( | ValueRemapOp::Ptr | op | ) |

Sets the current ValueRemap operator. This will be used for subsequent setup() and load() calls. Primarily used when the FieldGroup is employed for instancing of multiple fields. By default, no value remapping takes place.

Note
  It is ok to pass in a null pointer to disable value remapping.

Definition at line 529 of file FieldGroup.h.

{
m_valueRemapOp = op;
}
FieldGroup::m_valueRemapOp
ValueRemapOp::Ptr m_valueRemapOp
Current value remap op. Defaults to null pointer.
Definition FieldGroup.h:445

References m_valueRemapOp.

## setup() [1/3]

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setup | ( | const Field3D::FieldRes::Ptr | field | ) |

virtual

Adds a single field to the group.

Definition at line 538 of file FieldGroup.h.

{
FieldRes::Vec fields, minFields, maxFields;
fields.push_back(field);
// Perform setup
setup(fields, minFields, maxFields);
}

References fields(), and setup().

Referenced by FieldGroup(), load(), setup(), and setup().

## setup() [2/3]

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setup | ( | const Field3D::FieldRes::Vec & | fields | ) |

virtual

Initializes the FieldGroup from a set of fields.

Definition at line 550 of file FieldGroup.h.

{
FieldRes::Vec minFields, maxFields;
// Perform setup
setup(fields, minFields, maxFields);
}

References fields(), and setup().

## setup() [3/3]

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setup | ( | const Field3D::FieldRes::Vec & | fields,
|  | const Field3D::FieldRes::Vec & | minFields,
|  | const Field3D::FieldRes::Vec & | maxFields )

virtual

Initializes the FieldGroup from a set of fields with pre-computed min/max representations.

Definition at line 561 of file FieldGroup.h.

{
// Record fields in m_allFields
m_allFields = fields;
// Pick out primary fields
for (size_t i = 0, end = fields.size(); i < end; ++i) {
GrabFields op(fields[i], m_osToWs, m_valueRemapOp, m_doWsBoundsOptimization);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
}
// Pick out min/max fields
setupMinMax(minFields, maxFields);
}
FieldGroup::GrabFields
Definition FieldGroup.h:900
FieldGroup::setupMinMax
void setupMinMax(const FieldRes::Vec &minFields, const FieldRes::Vec &maxFields)
Set up the min/max MIP representations.
Definition FieldGroup.h:585
FieldGroup::m_allFields
FieldRes::Vec m_allFields
Stores all the fields owned by the FieldGroup.
Definition FieldGroup.h:448

References fields(), m_allFields, m_dense, m_doWsBoundsOptimization, m_mipDense, m_mipSparse, m_osToWs, m_sparse, m_valueRemapOp, and setupMinMax().

## load()

template<typename BaseTypeList_T, int Dims_T>

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.

Returns
  Number of fields loaded, or a negative number if the file failed to open.

Definition at line 619 of file FieldGroup.h.

{
using namespace Field3D;
// Storage for the primary fields
FieldRes::Vec results;
// Storage for the auxiliary fields
FieldRes::Vec minResults, maxResults;
// Track number of fields in group before loading.
const size_t sizeBeforeLoading = size();
// Open each file ---
std::vector<std::string> filenames;
filenames.push_back(filename);
BOOST_FOREACH (const std::string fn, filenames) {
Field3DInputFile in;
if (!in.open(fn)) {
return k_missingFile;
}
// Use partition names to determine if fields should be loaded
std::vector<std::string> names;
in.getPartitionNames(names);
BOOST_FOREACH (const std::string &name, names) {
detail::LoadFieldsParams params(in, name, attribute, results,
minResults, maxResults);
detail::LoadFields<Dims_T> op(params);
mpl::for_each<BaseTypeList_T>(op);
}
}
// Set up from fields
setup(results, minResults, maxResults);
// Done. Return the number of fields that were loaded.
return size() - sizeBeforeLoading;
}
FieldGroup::size
virtual size_t size() const
The number of fields in the group.
Definition FieldGroup.h:689
FieldGroup::k_missingFile
static const int k_missingFile
Used by load() to indicate missing file.
Definition FieldGroup.h:341

References Field3DFileBase::getPartitionNames(), k_missingFile, Field3DInputFile::open(), setup(), and size().

## makeMinMax()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::makeMinMax | ( | const float | resMult | ) |

Make min/max representations of the fields in the group.

Definition at line 668 of file FieldGroup.h.

{
// Storage for the auxiliary fields
FieldRes::Vec minFields, maxFields;
MakeMinMax op(minFields, maxFields, resMult);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
MakeMinMaxMIP opMIP(minFields, maxFields, resMult);
fusion::for_each(m_mipDense, opMIP);
fusion::for_each(m_mipSparse, opMIP);
setupMinMax(minFields, maxFields);
}
FieldGroup::MakeMinMaxMIP
Definition FieldGroup.h:1035
FieldGroup::MakeMinMax
Definition FieldGroup.h:995

References m_dense, m_mipDense, m_mipSparse, m_sparse, and setupMinMax().

## size()

template<typename BaseTypeList_T, int Dims_T>

size_t FieldGroup< BaseTypeList_T, Dims_T >::size | ( |  | ) | const

virtual

The number of fields in the group.

Definition at line 689 of file FieldGroup.h.

{
CountFields op;
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return op.count;
}
FieldGroup::CountFields
Definition FieldGroup.h:978

References FieldGroup< BaseTypeList_T, Dims_T >::CountFields::count, m_dense, m_mipDense, m_mipSparse, and m_sparse.

Referenced by load().

## sizeMIP()

template<typename BaseTypeList_T, int Dims_T>

size_t FieldGroup< BaseTypeList_T, Dims_T >::sizeMIP | ( |  | ) | const

The number of MIP fields in the group.

Definition at line 703 of file FieldGroup.h.

{
CountFields op;
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return op.count;
}

References FieldGroup< BaseTypeList_T, Dims_T >::CountFields::count, m_mipDense, and m_mipSparse.

## sample() [1/2]

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::sample | ( | const V3d & | wsP,
|  | const float | wsSpotSize,
|  | const float | time,
|  | float * | result,
|  | const CompositeOp | compOp = Add )

Unified sampling of the group's fields. Will handle both MIP and non-MIP data with optional compositing functor.

Definition at line 715 of file FieldGroup.h.

{
size_t numHits = 0;
// Handle ordinary fields
Sample op(wsP, result, numHits);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
// Handle MIP fields
SampleMIP mipOp(wsP, wsSpotSize, result, numHits);
fusion::for_each(m_mipDense, mipOp);
fusion::for_each(m_mipSparse, mipOp);
// Check composite op
if (compOp == Add) {
// Nothing
} else {
if (numHits > 1) {
for (size_t i = 0; i < Dims_T; ++i) {
result[i] /= static_cast<float>(numHits);
}
}
}
}
FieldGroup::SampleMIP
Definition FieldGroup.h:1096
FieldGroup::Sample
Definition FieldGroup.h:1075

References Add, m_dense, m_mipDense, m_mipSparse, and m_sparse.

## sample() [2/2]

template<typename BaseTypeList_T, int Dims_T>

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.

Warning
  To be deprecated in favor of sample(wsP, wsSpotSize, time, ...)

Definition at line 749 of file FieldGroup.h.

{
size_t numHits = 0;
Sample op(vsP, result, numHits);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
}

References m_dense, and m_sparse.

## sampleMIP()

template<typename BaseTypeList_T, int Dims_T>

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.

Warning
  To be deprecated in favor of sample(wsP, wsSpotSize, time, ...)

Definition at line 779 of file FieldGroup.h.

{
size_t numHits = 0;
SampleMIP op(vsP, wsSpotSize, result, numHits);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
}

References m_mipDense, and m_mipSparse.

## sampleMultiple()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::sampleMultiple | ( | const size_t | n,
|  | const float * | wsP,
|  | float * | result ) const

Samples the fields in the group.

Definition at line 764 of file FieldGroup.h.

{
size_t numHits = 0;
SampleMultiple op(n, wsP, result, numHits);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
}
FieldGroup::SampleMultiple
Definition FieldGroup.h:1120

References m_dense, and m_sparse.

## sampleMIPMultiple()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::sampleMIPMultiple | ( | const size_t | n,
|  | const float * | wsP,
|  | const float * | wsSpotSize,
|  | float * | result ) const

Samples all the MIP fields in the group.

Definition at line 795 of file FieldGroup.h.

{
size_t numHits = 0;
SampleMIPMultiple op(n, wsP, wsSpotSize, result, numHits);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
}
FieldGroup::SampleMIPMultiple
Definition FieldGroup.h:1143

References m_mipDense, and m_mipSparse.

## wsBounds()

template<typename BaseTypeList_T, int Dims_T>

Box3d FieldGroup< BaseTypeList_T, Dims_T >::wsBounds | ( |  | ) | const

Returns the bounds of the group.

Definition at line 811 of file FieldGroup.h.

{
Box3d wsBounds;
GetWsBounds op(wsBounds);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return wsBounds;
}
FieldGroup::GetWsBounds
Definition FieldGroup.h:1169
FieldGroup::wsBounds
Box3d wsBounds() const
Returns the bounds of the group.
Definition FieldGroup.h:811

References m_dense, m_mipDense, m_mipSparse, m_sparse, and wsBounds().

Referenced by FieldGroup< BaseTypeList_T, Dims_T >::GetMinMax::GetMinMax(), getMinMax(), FieldGroup< BaseTypeList_T, Dims_T >::GetMinMaxMIP::GetMinMaxMIP(), FieldGroup< BaseTypeList_T, Dims_T >::GetMinMaxPrefilt::GetMinMaxPrefilt(), FieldGroup< BaseTypeList_T, Dims_T >::GetWsBounds::GetWsBounds(), and wsBounds().

## intersects()

template<typename BaseTypeList_T, int Dims_T>

bool FieldGroup< BaseTypeList_T, Dims_T >::intersects | ( | const V3d & | wsP | ) | const

Whether the given point intersects any of the fields in the FieldGroup.

Definition at line 826 of file FieldGroup.h.

{
PointIsect op(wsP);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return op.result();
}
FieldGroup::PointIsect
Definition FieldGroup.h:1425

References m_dense, m_mipDense, m_mipSparse, m_sparse, and FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::result().

## getIntersections()

template<typename BaseTypeList_T, int Dims_T>

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 840 of file FieldGroup.h.

{
GetIntersections op(ray, intervals);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return intervals.size() > 0;
}
FieldGroup::GetIntersections
Definition FieldGroup.h:1207

References m_dense, m_mipDense, m_mipSparse, and m_sparse.

## getMinMax()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::getMinMax | ( | const Box3d & | wsBounds,
|  | float * | min,
|  | float * | max ) const

Returns the min/max range within a given bounding box.

Definition at line 855 of file FieldGroup.h.

{
if (m_hasPrefiltMinMax) {
// Pre-filtered types
GetMinMaxPrefilt opMin(wsBounds, min, GetMinMaxPrefilt::Min);
GetMinMaxPrefilt opMax(wsBounds, max, GetMinMaxPrefilt::Max);
fusion::for_each(m_mipDenseMin, opMin);
fusion::for_each(m_mipSparseMin, opMin);
fusion::for_each(m_mipDenseMax, opMax);
fusion::for_each(m_mipSparseMax, opMax);
} else {
// Non-prefiltered types
GetMinMax op(wsBounds, min, max);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
// Non-prefiltered MIP types
GetMinMaxMIP opMIP(wsBounds, min, max);
fusion::for_each(m_mipDense, opMIP);
fusion::for_each(m_mipSparse, opMIP);
}
}
FieldGroup::GetMinMaxMIP
Definition FieldGroup.h:1349
FieldGroup::GetMinMaxPrefilt
Definition FieldGroup.h:1370
FieldGroup::GetMinMaxPrefilt::Max
@ Max
Definition FieldGroup.h:1373
FieldGroup::GetMinMaxPrefilt::Min
@ Min
Definition FieldGroup.h:1372
FieldGroup::GetMinMax
Definition FieldGroup.h:1328
FieldGroup::m_mipDenseMin
MIPDenseTypes m_mipDenseMin
Definition FieldGroup.h:432
FieldGroup::m_mipSparseMax
MIPSparseTypes m_mipSparseMax
Definition FieldGroup.h:433
FieldGroup::m_mipSparseMin
MIPSparseTypes m_mipSparseMin
Definition FieldGroup.h:433
FieldGroup::m_mipDenseMax
MIPDenseTypes m_mipDenseMax
Definition FieldGroup.h:432

References m_dense, m_hasPrefiltMinMax, m_mipDense, m_mipDenseMax, m_mipDenseMin, m_mipSparse, m_mipSparseMax, m_mipSparseMin, m_sparse, FieldGroup< BaseTypeList_T, Dims_T >::GetMinMaxPrefilt::Max, FieldGroup< BaseTypeList_T, Dims_T >::GetMinMaxPrefilt::Min, and wsBounds().

## hasPrefiltMinMax()

template<typename BaseTypeList_T, int Dims_T>

bool FieldGroup< BaseTypeList_T, Dims_T >::hasPrefiltMinMax | ( |  | ) | const

inline

Whether the FieldGroup has a pre-filtered min/max representation.

Definition at line 412 of file FieldGroup.h.

{ return m_hasPrefiltMinMax; }

## memSize()

template<typename BaseTypeList_T, int Dims_T>

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 883 of file FieldGroup.h.

{
long long int result = 0;
MemSize op(result);
fusion::for_each(m_dense, op);
fusion::for_each(m_sparse, op);
fusion::for_each(m_mipDense, op);
fusion::for_each(m_mipSparse, op);
return result;
}
FieldGroup::MemSize
Definition FieldGroup.h:1401

References m_dense, m_mipDense, m_mipSparse, and m_sparse.

Referenced by FieldGroup< BaseTypeList_T, Dims_T >::MemSize::MemSize().

## fields()

template<typename BaseTypeList_T, int Dims_T>

const FieldRes::Vec & FieldGroup< BaseTypeList_T, Dims_T >::fields | ( |  | ) | const

inline

Returns a vector of FieldRes::Ptrs to the fields in the group.

Definition at line 417 of file FieldGroup.h.

{ return m_allFields; }

Referenced by FieldGroup(), setup(), setup(), and setup().

## setupMinMax()

template<typename BaseTypeList_T, int Dims_T>

void FieldGroup< BaseTypeList_T, Dims_T >::setupMinMax | ( | const FieldRes::Vec & | minFields,
|  | const FieldRes::Vec & | maxFields )

protected

Set up the min/max MIP representations.

Definition at line 584 of file FieldGroup.h.

{
// Record minFields and maxFields as auxiliary fields
m_auxFields.insert(m_auxFields.end(), minFields.begin(), minFields.end());
m_auxFields.insert(m_auxFields.end(), maxFields.begin(), maxFields.end());
// Pick out min fields
for (size_t i = 0, end = minFields.size(); i < end; ++i) {
GrabFields op(minFields[i], m_osToWs, m_valueRemapOp, m_doWsBoundsOptimization);
fusion::for_each(m_mipDenseMin, op);
fusion::for_each(m_mipSparseMin, op);
}
// Pick out max fields
for (size_t i = 0, end = maxFields.size(); i < end; ++i) {
GrabFields op(maxFields[i], m_osToWs, m_valueRemapOp, m_doWsBoundsOptimization);
fusion::for_each(m_mipDenseMax, op);
fusion::for_each(m_mipSparseMax, op);
}
// Check if we have pre-filtered fields
CountFields countMinOp, countMaxOp;
fusion::for_each(m_mipDenseMin, countMinOp);
fusion::for_each(m_mipDenseMax, countMaxOp);
fusion::for_each(m_mipSparseMin, countMinOp);
fusion::for_each(m_mipSparseMax, countMaxOp);
if (countMinOp.count > 0 && countMaxOp.count > 0) {
m_hasPrefiltMinMax = true;
}
}
FieldGroup::m_auxFields
FieldRes::Vec m_auxFields
Stores all the auxiliary fields owned by the FieldGroup.
Definition FieldGroup.h:450

References FieldGroup< BaseTypeList_T, Dims_T >::CountFields::count, m_auxFields, m_doWsBoundsOptimization, m_hasPrefiltMinMax, m_mipDenseMax, m_mipDenseMin, m_mipSparseMax, m_mipSparseMin, m_osToWs, and m_valueRemapOp.

Referenced by makeMinMax(), and setup().

## Member Data Documentation

## k_missingFile

template<typename BaseTypeList_T, int Dims_T>

const int FieldGroup< BaseTypeList_T, Dims_T >::k_missingFile = -1

static

Used by load() to indicate missing file.

Definition at line 341 of file FieldGroup.h.

Referenced by load().

## m_dense

template<typename BaseTypeList_T, int Dims_T>

DenseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_dense

protected

Definition at line 430 of file FieldGroup.h.

Referenced by getIntersections(), getMinMax(), intersects(), makeMinMax(), memSize(), sample(), sample(), sampleMultiple(), setup(), setWsBoundsOptimization(), size(), and wsBounds().

## m_sparse

template<typename BaseTypeList_T, int Dims_T>

SparseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_sparse

protected

Definition at line 431 of file FieldGroup.h.

Referenced by getIntersections(), getMinMax(), intersects(), makeMinMax(), memSize(), sample(), sample(), sampleMultiple(), setup(), setWsBoundsOptimization(), size(), and wsBounds().

## m_mipDense

template<typename BaseTypeList_T, int Dims_T>

MIPDenseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipDense

protected

Definition at line 432 of file FieldGroup.h.

Referenced by getIntersections(), getMinMax(), intersects(), makeMinMax(), memSize(), sample(), sampleMIP(), sampleMIPMultiple(), setup(), setWsBoundsOptimization(), size(), sizeMIP(), and wsBounds().

## m_mipDenseMin

template<typename BaseTypeList_T, int Dims_T>

MIPDenseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipDenseMin

protected

Definition at line 432 of file FieldGroup.h.

Referenced by getMinMax(), and setupMinMax().

## m_mipDenseMax

template<typename BaseTypeList_T, int Dims_T>

MIPDenseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipDenseMax

protected

Definition at line 432 of file FieldGroup.h.

Referenced by getMinMax(), and setupMinMax().

## m_mipSparse

template<typename BaseTypeList_T, int Dims_T>

MIPSparseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipSparse

protected

Definition at line 433 of file FieldGroup.h.

Referenced by getIntersections(), getMinMax(), intersects(), makeMinMax(), memSize(), sample(), sampleMIP(), sampleMIPMultiple(), setup(), setWsBoundsOptimization(), size(), sizeMIP(), and wsBounds().

## m_mipSparseMin

template<typename BaseTypeList_T, int Dims_T>

MIPSparseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipSparseMin

protected

Definition at line 433 of file FieldGroup.h.

Referenced by getMinMax(), and setupMinMax().

## m_mipSparseMax

template<typename BaseTypeList_T, int Dims_T>

MIPSparseTypes FieldGroup< BaseTypeList_T, Dims_T >::m_mipSparseMax

protected

Definition at line 433 of file FieldGroup.h.

Referenced by getMinMax(), and setupMinMax().

## m_hasPrefiltMinMax

template<typename BaseTypeList_T, int Dims_T>

bool FieldGroup< BaseTypeList_T, Dims_T >::m_hasPrefiltMinMax

protected

Whether pre-filtered min/max are present.

Definition at line 436 of file FieldGroup.h.

Referenced by FieldGroup(), FieldGroup(), getMinMax(), and setupMinMax().

## m_osToWs

template<typename BaseTypeList_T, int Dims_T>

M44d FieldGroup< BaseTypeList_T, Dims_T >::m_osToWs

protected

Current object to world transform.

Definition at line 439 of file FieldGroup.h.

Referenced by setOsToWs(), setup(), and setupMinMax().

## m_doWsBoundsOptimization

template<typename BaseTypeList_T, int Dims_T>

bool FieldGroup< BaseTypeList_T, Dims_T >::m_doWsBoundsOptimization

protected

Enable world space bounds optimization.

Definition at line 442 of file FieldGroup.h.

Referenced by FieldGroup(), FieldGroup(), setup(), setupMinMax(), and setWsBoundsOptimization().

## m_valueRemapOp

template<typename BaseTypeList_T, int Dims_T>

ValueRemapOp::Ptr FieldGroup< BaseTypeList_T, Dims_T >::m_valueRemapOp

protected

Current value remap op. Defaults to null pointer.

Definition at line 445 of file FieldGroup.h.

Referenced by setup(), setupMinMax(), and setValueRemapOp().

## m_allFields

template<typename BaseTypeList_T, int Dims_T>

FieldRes::Vec FieldGroup< BaseTypeList_T, Dims_T >::m_allFields

protected

Stores all the fields owned by the FieldGroup.

Definition at line 448 of file FieldGroup.h.

Referenced by setup().

## m_auxFields

template<typename BaseTypeList_T, int Dims_T>

FieldRes::Vec FieldGroup< BaseTypeList_T, Dims_T >::m_auxFields

protected

Stores all the auxiliary fields owned by the FieldGroup.

Definition at line 450 of file FieldGroup.h.

Referenced by setupMinMax().

The documentation for this class was generated from the following file:

- export/FieldGroup.h