0024473: TKMath, BVH - introduce template-based package for Bounding volume hierarchy...
[occt.git] / src / NCollection / NCollection_Vec3.hxx
index f6ff42b..fdc9bad 100644 (file)
@@ -234,6 +234,22 @@ public:
     return aCopyVec3;
   }
 
+  //! Compute component-wise minimum of two vectors.
+  NCollection_Vec3 cwiseMin (const NCollection_Vec3& theVec) const
+  {
+    return NCollection_Vec3 (Min (v[0], theVec.v[0]),
+                             Min (v[1], theVec.v[1]),
+                             Min (v[2], theVec.v[2]));
+  }
+
+  //! Compute component-wise maximum of two vectors.
+  NCollection_Vec3 cwiseMax (const NCollection_Vec3& theVec) const
+  {
+    return NCollection_Vec3 (Max (v[0], theVec.v[0]),
+                             Max (v[1], theVec.v[1]),
+                             Max (v[2], theVec.v[2]));
+  }
+
   //! Compute per-component division by scale factor.
   NCollection_Vec3& operator/= (const Element_t theInvFactor)
   {