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

0025885: Visualization, ray tracing - Improve layer processing

Move Ray-tracing core from OpenGl_Workspace to OpenGl_View.
This patch also contains a number of useful architectural changes.
This commit is contained in:
dbp
2015-04-09 08:58:10 +03:00
committed by bugmaster
parent 5b055f07b3
commit 91c60b5790
14 changed files with 1568 additions and 1427 deletions

View File

@@ -302,6 +302,33 @@ public:
v[3] > theVec.v[3] ? v[3] : theVec.v[3]);
}
//! Compute component-wise modulus of the vector.
NCollection_Vec4 cwiseAbs() const
{
return NCollection_Vec4 (std::abs (v[0]),
std::abs (v[1]),
std::abs (v[2]),
std::abs (v[3]));
}
//! Compute maximum component of the vector.
Element_t maxComp() const
{
const Element_t aMax1 = v[0] > v[1] ? v[0] : v[1];
const Element_t aMax2 = v[2] > v[3] ? v[2] : v[3];
return aMax1 > aMax2 ? aMax1 : aMax2;
}
//! Compute minimum component of the vector.
Element_t minComp() const
{
const Element_t aMin1 = v[0] < v[1] ? v[0] : v[1];
const Element_t aMin2 = v[2] < v[3] ? v[2] : v[3];
return aMin1 < aMin2 ? aMin1 : aMin2;
}
//! Compute per-component division by scale factor.
NCollection_Vec4& operator/= (const Element_t theInvFactor)
{