Field3D
FieldGroup< BaseTypeList_T, Dims_T >::GrabFields Struct Reference

#include <FieldGroup.h>

Public Member Functions

 GrabFields (Field3D::FieldRes::Ptr f, const M44d &osToWs, ValueRemapOp::Ptr op, const bool doWsBoundsOptimization)
 Ctor.
 
template<typename WrapperVec_T >
void operator() (WrapperVec_T &vec) const
 Functor.
 

Private Attributes

bool m_doWsBoundsOptimization
 Enable world space bounds optimization.
 
Field3D::FieldRes::Ptr m_field
 The field to work on. Will be matched against the type of operator().
 
ValueRemapOp::Ptr m_op
 Value remap operator.
 
M44d m_osToWs
 Object to world transform.
 

Detailed Description

template<typename BaseTypeList_T, int Dims_T>
struct FieldGroup< BaseTypeList_T, Dims_T >::GrabFields

Definition at line 899 of file FieldGroup.h.

Constructor & Destructor Documentation

◆ GrabFields()

template<typename BaseTypeList_T , int Dims_T>
FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::GrabFields ( Field3D::FieldRes::Ptr f,
const M44d & osToWs,
ValueRemapOp::Ptr op,
const bool doWsBoundsOptimization )
inline

Ctor.

Definition at line 902 of file FieldGroup.h.

906 : m_field(f), m_osToWs(osToWs), m_op(op),
907 m_doWsBoundsOptimization(doWsBoundsOptimization)
908 { }
#define FIELD3D_MTX_T
Definition StdMathLib.h:99
M44d m_osToWs
Object to world transform.
Definition FieldGroup.h:946
bool m_doWsBoundsOptimization
Enable world space bounds optimization.
Definition FieldGroup.h:950
ValueRemapOp::Ptr m_op
Value remap operator.
Definition FieldGroup.h:948
Field3D::FieldRes::Ptr m_field
The field to work on. Will be matched against the type of operator().
Definition FieldGroup.h:944

Member Function Documentation

◆ operator()()

template<typename BaseTypeList_T , int Dims_T>
template<typename WrapperVec_T >
void FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::operator() ( WrapperVec_T & vec) const
inline

Functor.

Definition at line 911 of file FieldGroup.h.

912 {
913 // Typedefs
914 typedef typename WrapperVec_T::value_type Wrapper_T;
915 typedef typename Wrapper_T::field_type Field_T;
916 typedef typename Field_T::Ptr FieldPtr;
917 // Grab field if type matches
918 if (FieldPtr f =
919 Field3D::field_dynamic_cast<Field_T>(m_field)) {
920 // Add to FieldWrapper vector
921 vec.push_back(f);
922 // Grab just-inserted entry
923 Wrapper_T &entry = vec.back();
924 // Set up transform
925 M44d id;
926 if (m_osToWs != id) {
927 entry.setOsToWs(m_osToWs);
928 }
929
930 // Set toggle to use world axis aligned bounding boxes in
931 // lookups
933 entry.setWsBoundsOptimization(m_doWsBoundsOptimization);
934 }
935
936 // Set up value remap op
937 if (m_op) {
938 entry.setValueRemapOp(m_op);
939 }
940 }
941 }
Imath::M44d M44d
Definition SpiMathLib.h:82

References FIELD3D_MTX_T, FieldGroup< BaseTypeList_T, Dims_T >::m_doWsBoundsOptimization, and FieldGroup< BaseTypeList_T, Dims_T >::m_osToWs.

Member Data Documentation

◆ m_field

template<typename BaseTypeList_T , int Dims_T>
Field3D::FieldRes::Ptr FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::m_field
private

The field to work on. Will be matched against the type of operator().

Definition at line 944 of file FieldGroup.h.

◆ m_osToWs

template<typename BaseTypeList_T , int Dims_T>
M44d FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::m_osToWs
private

Object to world transform.

Definition at line 946 of file FieldGroup.h.

◆ m_op

template<typename BaseTypeList_T , int Dims_T>
ValueRemapOp::Ptr FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::m_op
private

Value remap operator.

Definition at line 948 of file FieldGroup.h.

◆ m_doWsBoundsOptimization

template<typename BaseTypeList_T , int Dims_T>
bool FieldGroup< BaseTypeList_T, Dims_T >::GrabFields::m_doWsBoundsOptimization
private

Enable world space bounds optimization.

Definition at line 950 of file FieldGroup.h.


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