1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0031909: Visualization, AIS_Trihedron - replace maps with arrays

Prs3d_DatumAspect, AIS_Trihedron - redundant maps have been replaced by explicitly sized arrays.

AIS_Trihedron::myHasOwnDatumAspect - removed unused class field.

Prs3d_DatumAttribute, Prs3d_DatumParts, Prs3d_DatumAxes - enumeration values
have been renamed to have full name prefix.

vzbufftrihedron - fixed no more necessary Quantity_Color -> Quantity_NameOfColor convertion.
This commit is contained in:
kgv
2020-11-05 12:30:46 +03:00
committed by bugmaster
parent 84d0342cef
commit 24f9d04c72
18 changed files with 477 additions and 479 deletions

View File

@@ -177,9 +177,9 @@ AIS_ViewCube::AIS_ViewCube()
myBoxSideLabels.Bind (V3d_TypeOfOrientation_Zup_Left, "LEFT");
myBoxSideLabels.Bind (V3d_TypeOfOrientation_Zup_Right, "RIGHT");
myAxesLabels.Bind (Prs3d_DP_XAxis, "X");
myAxesLabels.Bind (Prs3d_DP_YAxis, "Y");
myAxesLabels.Bind (Prs3d_DP_ZAxis, "Z");
myAxesLabels.Bind (Prs3d_DatumParts_XAxis, "X");
myAxesLabels.Bind (Prs3d_DatumParts_YAxis, "Y");
myAxesLabels.Bind (Prs3d_DatumParts_ZAxis, "Z");
// define default size
SetSize (70.0);
@@ -580,7 +580,7 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
{
const Standard_Real anAxisSize = mySize + 2.0 * myBoxFacetExtension + myAxesPadding;
const Handle(Prs3d_DatumAspect)& aDatumAspect = myDrawer->DatumAspect();
for (Standard_Integer anAxisIter = Prs3d_DP_XAxis; anAxisIter <= Prs3d_DP_ZAxis; ++anAxisIter)
for (Standard_Integer anAxisIter = Prs3d_DatumParts_XAxis; anAxisIter <= Prs3d_DatumParts_ZAxis; ++anAxisIter)
{
const Prs3d_DatumParts aPart = (Prs3d_DatumParts )anAxisIter;
if (!aDatumAspect->DrawDatumPart (aPart))
@@ -591,9 +591,9 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
gp_Ax1 anAx1;
switch (aPart)
{
case Prs3d_DP_XAxis: anAx1 = gp_Ax1 (aLocation, gp::DX()); break;
case Prs3d_DP_YAxis: anAx1 = gp_Ax1 (aLocation, gp::DY()); break;
case Prs3d_DP_ZAxis: anAx1 = gp_Ax1 (aLocation, gp::DZ()); break;
case Prs3d_DatumParts_XAxis: anAx1 = gp_Ax1 (aLocation, gp::DX()); break;
case Prs3d_DatumParts_YAxis: anAx1 = gp_Ax1 (aLocation, gp::DY()); break;
case Prs3d_DatumParts_ZAxis: anAx1 = gp_Ax1 (aLocation, gp::DZ()); break;
default: break;
}