1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -336,6 +336,16 @@ public:
return *this;
}
//! Compute per-component division.
NCollection_Vec4& operator/= (const NCollection_Vec4& theRight)
{
v[0] /= theRight.v[0];
v[1] /= theRight.v[1];
v[2] /= theRight.v[2];
v[3] /= theRight.v[3];
return *this;
}
//! Compute per-component division by scale factor.
NCollection_Vec4 operator/ (const Element_t theInvFactor)
{
@@ -343,6 +353,14 @@ public:
return aResult /= theInvFactor;
}
//! Compute per-component division.
friend NCollection_Vec4 operator/ (const NCollection_Vec4& theLeft,
const NCollection_Vec4& theRight)
{
NCollection_Vec4 aResult = NCollection_Vec4 (theLeft);
return aResult /= theRight;
}
private:
Element_t v[4]; //!< define the vector as array to avoid structure alignment issues