1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0030131: Foundation Classes - support of Linear builder for 2D BVH trees

BVH_LinearBuilder and BVH_RadixSorter now accept N==2.
NCollection_Vec2/3/4 - added missing division by vec operators.
This commit is contained in:
osa
2018-09-11 21:56:14 +03:00
committed by bugmaster
parent 7604a15365
commit d0bcf7aa9b
6 changed files with 76 additions and 29 deletions

View File

@@ -290,6 +290,15 @@ public:
return *this;
}
//! Compute per-component division.
NCollection_Vec3& operator/= (const NCollection_Vec3& theRight)
{
v[0] /= theRight.v[0];
v[1] /= theRight.v[1];
v[2] /= theRight.v[2];
return *this;
}
//! Compute per-component division by scale factor.
NCollection_Vec3 operator/ (const Element_t theInvFactor) const
{
@@ -297,6 +306,14 @@ public:
return aResult /= theInvFactor;
}
//! Compute per-component division.
friend NCollection_Vec3 operator/ (const NCollection_Vec3& theLeft,
const NCollection_Vec3& theRight)
{
NCollection_Vec3 aResult = NCollection_Vec3 (theLeft);
return aResult /= theRight;
}
//! Computes the dot product.
Element_t Dot (const NCollection_Vec3& theOther) const
{