We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6719224 commit 59c23b4Copy full SHA for 59c23b4
openvdb/openvdb/math/Vec3.h
@@ -594,6 +594,20 @@ Abs(const Vec3<T>& v)
594
return Vec3<T>(Abs(v[0]), Abs(v[1]), Abs(v[2]));
595
}
596
597
+template<>
598
+inline auto cwiseAdd(const Vec3<math::internal::half>& v, const float s)
599
+{
600
+ Vec3<math::internal::half> out;
601
+ const math::internal::half* ip = v.asPointer();
602
+ math::internal::half* op = out.asPointer();
603
+ for (unsigned i = 0; i < 3; ++i, ++op, ++ip) {
604
+ OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
605
+ *op = *ip + s;
606
+ OPENVDB_NO_TYPE_CONVERSION_WARNING_END
607
+ }
608
+ return out;
609
+}
610
+
611
/// Orthonormalize vectors v1, v2 and v3 and store back the resulting
612
/// basis e.g. Vec3d::orthonormalize(v1,v2,v3);
613
template <typename T>
0 commit comments