mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028361: Visualization, TKV3d - buggy behavior of Transformation Persistence compiled on several Linux platforms in optimized mode
The patch fixes transformation persistence for various set of GCC compilers. 1) Optimized template-specialized operator /= for division (causes bugs) of NCollection_Vec4 was replaced with non-specialized version. 2) NCollection_Vec4::xyz() is not used since compiler uses modifiable-reference returning version, which invokes warning of possible strict-aliasing rules violation and leads to incorrect behavior of the reference.
This commit is contained in:
@@ -510,8 +510,8 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
{
|
||||
typename BVH_Box<T, 4>::BVH_VecNt& aCorner = anArrayOfCorners[anIt];
|
||||
aCorner = aTPers * aCorner;
|
||||
aCorner /= aCorner.w();
|
||||
theBoundingBox.Add (aCorner.xyz());
|
||||
aCorner = aCorner / aCorner.w();
|
||||
theBoundingBox.Add (typename BVH_Box<T, 3>::BVH_VecNt (aCorner.x(), aCorner.y(), aCorner.z()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user