Go to the documentation of this file.
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_)
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_)
205 const float time = 0;
209 vsToWs =
wsToVs.inverse();
212 vsToWs =
wsToVs.inverse();
254 #endif // include guard
const M44d & worldToVoxel() const
Returns a reference to the world to voxel space transform.
#define FIELD3D_NAMESPACE_HEADER_CLOSE
std::vector< MIPFieldWrapper > Vec
std::vector< FieldWrapper > Vec
ValueRemapOp::Ptr valueRemapOpPtr
Optionally, set a ValueRemapOp to remap values.
Contains the MIPField class.
virtual V3f remap(const V3f &value) const =0
Remaps a V3f value.
void setValueRemapOp(ValueRemapOp::Ptr op)
Contains the Field3DFile classes.
bool doWsBoundsOptimization
Field_T::LinearInterp LinearInterp
This class wraps up a single MIP field to make its interpolator and its mapping easily accessible....
const ValueRemapOp * valueRemapOp
M44d osToWs
Optionally, enable doOsToWs to apply a world to object transform before lookups.
Contains the FieldMapping base class and the NullFieldMapping and MatrixFieldMapping subclasses.
void setOsToWs(const M44d &i_osToWs)
ValueRemapOp::Ptr valueRemapOpPtr
Optionally, set a ValueRemapOp to remap values.
MIPFieldWrapper(const typename Field_T::Ptr f)
M44d wsToVs
Optionally, enable wsBounds optimization to use a world axis aligned bounding box in lookups.
Box3d continuousBounds(const Box3i &bbox)
const ValueRemapOp * valueRemapOp
This class wraps up a single field to make its interpolator and its mapping easily accessible....
M44d osToWs
Optionally, enable doOsToWs to apply a world to object transform before lookups.
Contains the FieldInterp base class and some standard interpolation classes.
T max(const T a, const T2 b)
Max operation on mixed types.
void setOsToWs(const M44d &i_osToWs)
The ValueRemapOp class is used when shader-like calculations need to be applied to individual fields ...
const Field3D::FieldMapping * mapping
void setValueRemapOp(ValueRemapOp::Ptr op)
bool doWsBoundsOptimization
Represents the mapping of a field by a matrix transform.
Contains the initIO function.
Contains the DenseField class.
const Field3D::FieldMapping * mapping
Field_T::LinearInterp interp
boost::shared_ptr< LinearInterp > interpPtr
virtual float remap(const float value) const =0
Remaps a float value.
FieldWrapper(const typename Field_T::Ptr f)
FIELD3D_API void print(Severity severity, const std::string &message)
Sends the string to the assigned output, prefixing the message with the severity.
Contains the SparseField class.
void setWsBoundsOptimization(const bool doWsBoundsOptimization_)
Contains MIP-related utility functions.
void setWsBoundsOptimization(const bool doWsBoundsOptimization_)
M44d wsToVs
Optionally, enable wsBounds optimization to use a world axis aligned bounding box in lookups.
boost::shared_ptr< ValueRemapOp > Ptr