3 #ifndef __F3DUTIL_FIELDWRAPPER_H__ 4 #define __F3DUTIL_FIELDWRAPPER_H__ 9 #include <OpenEXR/ImathMatrixAlgo.h> 45 typedef boost::shared_ptr<ValueRemapOp>
Ptr;
50 virtual float remap(
const float value)
const = 0;
62 template <
typename Field_T>
66 typedef std::vector<FieldWrapper>
Vec;
85 if (!Imath::extractScaling(
osToWs, ws,
false)) {
86 Msg::print(
"WARNING: FieldGroup/FieldWrapper: " 87 "Couldn't extract world scale from object-to-world " 88 "transform. Defaulting to 1.0.");
102 if (!doWsBoundsOptimization_)
106 dynamic_cast<const MatrixFieldMapping*>(
mapping);
108 const float time = 0;
112 vsToWs =
wsToVs.inverse();
115 vsToWs =
wsToVs.inverse();
156 template <
typename Field_T>
160 typedef std::vector<MIPFieldWrapper>
Vec;
182 if (!Imath::extractScaling(
osToWs, ws,
false)) {
183 Msg::print(
"WARNING: FieldGroup/FieldWrapper: " 184 "Couldn't extract world scale from object-to-world " 185 "transform. Defaulting to 1.0.");
199 if (!doWsBoundsOptimization_)
203 dynamic_cast<const MatrixFieldMapping*>(
mapping);
205 const float time = 0;
209 vsToWs =
wsToVs.inverse();
212 vsToWs =
wsToVs.inverse();
254 #endif // include guard #define FIELD3D_NAMESPACE_HEADER_CLOSE
M44d wsToVs
Optionally, enable wsBounds optimization to use a world axis aligned bounding box in lookups.
void setOsToWs(const M44d &i_osToWs)
Contains the Field3DFile classesOSS sanitized.
MIPFieldWrapper(const typename Field_T::Ptr f)
boost::shared_ptr< ValueRemapOp > Ptr
Contains the DenseField class.
ValueRemapOp::Ptr valueRemapOpPtr
Optionally, set a ValueRemapOp to remap values.
Field_T::LinearInterp interp
void setWsBoundsOptimization(const bool doWsBoundsOptimization_)
std::vector< FieldWrapper > Vec
FIELD3D_API void print(Severity severity, const std::string &message)
Sends the string to the assigned output, prefixing the message with the severity.
void setWsBoundsOptimization(const bool doWsBoundsOptimization_)
bool doWsBoundsOptimization
std::vector< MIPFieldWrapper > Vec
const Field3D::FieldMapping * mapping
This class wraps up a single field to make its interpolator and its mapping easily accessible....
Contains the FieldInterp base class and some standard interpolation classes.
boost::shared_ptr< LinearInterp > interpPtr
T max(const T a, const T2 b)
Max operation on mixed types.
bool doWsBoundsOptimization
virtual float remap(const float value) const =0
Remaps a float value.
const ValueRemapOp * valueRemapOp
ValueRemapOp::Ptr valueRemapOpPtr
Optionally, set a ValueRemapOp to remap values.
Field_T::LinearInterp LinearInterp
Contains the FieldMapping base class and the NullFieldMapping and MatrixFieldMapping subclasses.
M44d wsToVs
Optionally, enable wsBounds optimization to use a world axis aligned bounding box in lookups.
const ValueRemapOp * valueRemapOp
This class wraps up a single MIP field to make its interpolator and its mapping easily accessible....
The ValueRemapOp class is used when shader-like calculations need to be applied to individual fields ...
Contains the initIO function.
Contains MIP-related utility functions.
M44d osToWs
Optionally, enable doOsToWs to apply a world to object transform before lookups.
Contains the SparseField class.
const Field3D::FieldMapping * mapping
void setValueRemapOp(ValueRemapOp::Ptr op)
void setValueRemapOp(ValueRemapOp::Ptr op)
FieldWrapper(const typename Field_T::Ptr f)
Represents the mapping of a field by a matrix transform.
Box3d continuousBounds(const Box3i &bbox)
const M44d & worldToVoxel() const
Returns a reference to the world to voxel space transform.
Contains the MIPField class.
void setOsToWs(const M44d &i_osToWs)
M44d osToWs
Optionally, enable doOsToWs to apply a world to object transform before lookups.