6 #ifndef OPENVDB_TOOLS_VECTORTRANSFORMER_HAS_BEEN_INCLUDED 7 #define OPENVDB_TOOLS_VECTORTRANSFORMER_HAS_BEEN_INCLUDED 14 #include <type_traits> 25 template<
typename Gr
idType>
39 template<
typename TreeIterT>
void operator()(
const TreeIterT& it)
const 42 it.setValue(mat.transformH(v));
50 template<
typename TreeIterT>
54 it.setValue(mat.transform3x3(v));
62 template<
typename TreeIterT>
66 v = mat.transform3x3(v);
77 template<
typename Gr
idType>
inline 78 typename std::enable_if<!VecTraits<typename GridType::ValueType>::IsVec,
void>::type
85 template<
typename Gr
idType>
inline 86 typename std::enable_if<VecTraits<typename GridType::ValueType>::IsVec,
void>::type
89 if (!grid.isInWorldSpace())
return;
91 const VecType vecType = grid.getVectorType();
102 foreach(grid.beginValueAll(),
MatMul(invmat));
108 foreach(grid.beginValueAll(),
MatMul(mat));
124 template<
typename Gr
idType>
128 doTransformVectors<GridType>(grid, mat);
137 #ifdef OPENVDB_USE_EXPLICIT_INSTANTIATION 139 #ifdef OPENVDB_INSTANTIATE_VECTORTRANSFORMER 143 #define _FUNCTION(TreeT) \ 144 void transformVectors(Grid<TreeT>&, const Mat4d&) 148 #endif // OPENVDB_USE_EXPLICIT_INSTANTIATION 155 #endif // OPENVDB_TOOLS_VECTORTRANSFORMER_HAS_BEEN_INCLUDED
Mat4< double > Mat4d
Definition: Mat4.h:1368
#define OPENVDB_THROW(exception, message)
Definition: Exceptions.h:74
Mat4 inverse(T tolerance=0) const
Definition: Mat4.h:499
Definition: Exceptions.h:13
GridType
List of types that are currently supported by NanoVDB.
Definition: NanoVDB.h:216
VecType
Definition: Types.h:444
Definition: Exceptions.h:64
Mat4 transpose() const
Definition: Mat4.h:486
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
#define OPENVDB_VEC3_TREE_INSTANTIATE(Function)
Definition: version.h.in:149
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:202