mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -175,6 +175,25 @@ public:
|
||||
v[1] > theVec.v[1] ? v[1] : theVec.v[1]);
|
||||
}
|
||||
|
||||
//! Compute component-wise modulus of the vector.
|
||||
NCollection_Vec2 cwiseAbs() const
|
||||
{
|
||||
return NCollection_Vec2 (std::abs (v[0]),
|
||||
std::abs (v[1]));
|
||||
}
|
||||
|
||||
//! Compute maximum component of the vector.
|
||||
Element_t maxComp() const
|
||||
{
|
||||
return v[0] > v[1] ? v[0] : v[1];
|
||||
}
|
||||
|
||||
//! Compute minimum component of the vector.
|
||||
Element_t minComp() const
|
||||
{
|
||||
return v[0] < v[1] ? v[0] : v[1];
|
||||
}
|
||||
|
||||
//! Compute per-component multiplication by scale factor.
|
||||
NCollection_Vec2& operator*= (const Element_t theFactor)
|
||||
{
|
||||
|
@@ -250,6 +250,28 @@ public:
|
||||
v[2] > theVec.v[2] ? v[2] : theVec.v[2]);
|
||||
}
|
||||
|
||||
//! Compute component-wise modulus of the vector.
|
||||
NCollection_Vec3 cwiseAbs() const
|
||||
{
|
||||
return NCollection_Vec3 (std::abs (v[0]),
|
||||
std::abs (v[1]),
|
||||
std::abs (v[2]));
|
||||
}
|
||||
|
||||
//! Compute maximum component of the vector.
|
||||
Element_t maxComp() const
|
||||
{
|
||||
return v[0] > v[1] ? (v[0] > v[2] ? v[0] : v[2])
|
||||
: (v[1] > v[2] ? v[1] : v[2]);
|
||||
}
|
||||
|
||||
//! Compute minimum component of the vector.
|
||||
Element_t minComp() const
|
||||
{
|
||||
return v[0] < v[1] ? (v[0] < v[2] ? v[0] : v[2])
|
||||
: (v[1] < v[2] ? v[1] : v[2]);
|
||||
}
|
||||
|
||||
//! Compute per-component division by scale factor.
|
||||
NCollection_Vec3& operator/= (const Element_t theInvFactor)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user