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

0030791: Visualization - possibility to display materials by different hatching style for clipping

# move capping style from presentation into drawer
# crash in capping by setting projection as
# several hatch templates
This commit is contained in:
nds
2019-09-04 00:49:54 +03:00
parent 4d6db8fb0c
commit 3a8ba84200
16 changed files with 507 additions and 390 deletions

View File

@@ -293,8 +293,11 @@ namespace
const gp_Dir aPlaneUp (aPlaneMat.GetValue (0, 2), aPlaneMat.GetValue (1, 2), aPlaneMat.GetValue (2, 2));
const gp_Dir& aCameraUp = aCamera->Up();
const gp_Vec aCameraPln = aPlaneSide.Dot (aCameraUp) * aPlaneSide + aPlaneUp.Dot (aCameraUp) * aPlaneUp;
const gp_Dir& aCameraDir = aCamera->Direction();
aRotateAngle = static_cast<Standard_ShortReal> (aCameraPln.AngleWithRef (aPlaneUp, aCameraDir) / M_PI * 180.0);
if (aCameraPln.Magnitude() > Precision::Confusion())
{
const gp_Dir& aCameraDir = aCamera->Direction();
aRotateAngle = static_cast<Standard_ShortReal> (aCameraPln.AngleWithRef (aPlaneUp, aCameraDir) / M_PI * 180.0);
}
}
aHatchAngle = aRotateAngle;