| 230 | /// @return @c false if the grid type is unknown or unhandled. |
| 231 | template<typename TransformType, typename OpType> |
| 232 | bool |
| 233 | processTypedMap(TransformType& transform, OpType& op) |
| 234 | { |
| 235 | using namespace openvdb; |
| 236 | |
| 237 | const Name mapType = transform.mapType(); |
| 238 | if (mapType == UniformScaleMap::mapType()) { |
| 239 | doProcessTypedMap<UniformScaleMap, OpType>(transform, op); |
| 240 | |
| 241 | } else if (mapType == UniformScaleTranslateMap::mapType()) { |
| 242 | doProcessTypedMap<UniformScaleTranslateMap, OpType>(transform, op); |
| 243 | |
| 244 | } else if (mapType == ScaleMap::mapType()) { |
| 245 | doProcessTypedMap<ScaleMap, OpType>(transform, op); |
| 246 | |
| 247 | } else if (mapType == ScaleTranslateMap::mapType()) { |
| 248 | doProcessTypedMap<ScaleTranslateMap, OpType>(transform, op); |
| 249 | |
| 250 | } else if (mapType == UnitaryMap::mapType()) { |
| 251 | doProcessTypedMap<UnitaryMap, OpType>(transform, op); |
| 252 | |
| 253 | } else if (mapType == AffineMap::mapType()) { |
| 254 | doProcessTypedMap<AffineMap, OpType>(transform, op); |
| 255 | |
| 256 | } else if (mapType == TranslationMap::mapType()) { |
| 257 | doProcessTypedMap<TranslationMap, OpType>(transform, op); |
| 258 | |
| 259 | } else if (mapType == NonlinearFrustumMap::mapType()) { |
| 260 | doProcessTypedMap<NonlinearFrustumMap, OpType>(transform, op); |
| 261 | } else { |
| 262 | return false; |
| 263 | } |
| 264 | return true; |
| 265 | } |
| 266 | |
| 267 | } // namespace math |
| 268 | } // namespace OPENVDB_VERSION_NAME |