Field3D
|
#include <FieldGroup.h>
Public Types | |
enum | CompositeOp |
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. | |
MemSize (long long int &memSize) | |
Ctor. | |
long long int | memSize () const |
Returns the memory use in bytes for the fields in the group. | |
template<typename T> | |
void | operator() (const T &vec) const |
Functor. | |
long long int | result () const |
Result. | |
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. | |
Public Attributes | |
long long int * | m_memSize |
Static Public Attributes | |
static const int | k_missingFile |
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. | |
Definition at line 1400 of file FieldGroup.h.
typedef BaseTypeList_T FieldGroup< BaseTypeList_T, Dims_T >::MPLBaseTypes |
Definition at line 308 of file FieldGroup.h.
typedef mpl::transform<MPLBaseTypes,detail::MakeDense<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLDenseTypes |
Definition at line 313 of file FieldGroup.h.
typedef mpl::transform<MPLBaseTypes,detail::MakeSparse<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLSparseTypes |
Definition at line 316 of file FieldGroup.h.
typedef mpl::transform<MPLBaseTypes,detail::MakeMIPDense<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPDenseTypes |
Definition at line 319 of file FieldGroup.h.
typedef mpl::transform<MPLBaseTypes,detail::MakeMIPSparse<ph::_1>>::type FieldGroup< BaseTypeList_T, Dims_T >::MPLMIPSparseTypes |
Definition at line 322 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::DenseTypes |
Definition at line 325 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::SparseTypes |
Definition at line 326 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLMIPDenseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPDenseTypes |
Definition at line 327 of file FieldGroup.h.
typedef fusion_ro::as_vector<MPLMIPSparseTypes>::type FieldGroup< BaseTypeList_T, Dims_T >::MIPSparseTypes |
Definition at line 328 of file FieldGroup.h.
Definition at line 332 of file FieldGroup.h.
|
inline |
|
inline |
Functor.
Definition at line 1408 of file FieldGroup.h.
References m_memSize.
|
inline |
FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( | ) |
Default constructor, does nothing.
Definition at line 346 of file FieldGroup.h.
FieldGroup< BaseTypeList_T, Dims_T >::FieldGroup | ( | const Field3D::FieldRes::Vec & | fields | ) |
Construct from a set of fields.
Definition at line 348 of file FieldGroup.h.
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 355 of file FieldGroup.h.
|
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 360 of file FieldGroup.h.
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.
Definition at line 366 of file FieldGroup.h.
|
virtual |
|
virtual |
Initializes the FieldGroup from a set of fields.
Definition at line 370 of file FieldGroup.h.
|
virtual |
Initializes the FieldGroup from a set of fields with pre-computed min/max representations.
Definition at line 373 of file FieldGroup.h.
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 379 of file FieldGroup.h.
void FieldGroup< BaseTypeList_T, Dims_T >::makeMinMax | ( | const float | resMult | ) |
Make min/max representations of the fields in the group.
Definition at line 381 of file FieldGroup.h.
|
virtual |
size_t FieldGroup< BaseTypeList_T, Dims_T >::sizeMIP | ( | ) | const |
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 388 of file FieldGroup.h.
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 393 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 396 of file FieldGroup.h.
void FieldGroup< BaseTypeList_T, Dims_T >::sampleMultiple | ( | const size_t | n, |
const float * | wsP, | ||
float * | result ) const |
void FieldGroup< BaseTypeList_T, Dims_T >::sampleMIPMultiple | ( | const size_t | n, |
const float * | wsP, | ||
const float * | wsSpotSize, | ||
float * | result ) const |
Box3d FieldGroup< BaseTypeList_T, Dims_T >::wsBounds | ( | ) | const |
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 406 of file FieldGroup.h.
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 408 of file FieldGroup.h.
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 410 of file FieldGroup.h.
|
inline |
Whether the FieldGroup has a pre-filtered min/max representation.
Definition at line 412 of file FieldGroup.h.
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 415 of file FieldGroup.h.
Referenced by MemSize().
|
inline |
Returns a vector of FieldRes::Ptrs to the fields in the group.
Definition at line 417 of file FieldGroup.h.
|
protected |
Set up the min/max MIP representations.
Definition at line 425 of file FieldGroup.h.
long long int* FieldGroup< BaseTypeList_T, Dims_T >::MemSize::m_memSize |
Definition at line 1418 of file FieldGroup.h.
Referenced by MemSize(), operator()(), and result().
|
static |
Used by load() to indicate missing file.
Definition at line 341 of file FieldGroup.h.
|
protected |
Definition at line 430 of file FieldGroup.h.
|
protected |
Definition at line 431 of file FieldGroup.h.
|
protected |
Definition at line 432 of file FieldGroup.h.
|
protected |
Definition at line 432 of file FieldGroup.h.
|
protected |
Definition at line 432 of file FieldGroup.h.
|
protected |
Definition at line 433 of file FieldGroup.h.
|
protected |
Definition at line 433 of file FieldGroup.h.
|
protected |
Definition at line 433 of file FieldGroup.h.
|
protected |
Whether pre-filtered min/max are present.
Definition at line 436 of file FieldGroup.h.
|
protected |
Current object to world transform.
Definition at line 439 of file FieldGroup.h.
|
protected |
Enable world space bounds optimization.
Definition at line 442 of file FieldGroup.h.
|
protected |
Current value remap op. Defaults to null pointer.
Definition at line 445 of file FieldGroup.h.
|
protected |
Stores all the fields owned by the FieldGroup.
Definition at line 448 of file FieldGroup.h.
|
protected |
Stores all the auxiliary fields owned by the FieldGroup.
Definition at line 450 of file FieldGroup.h.