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

@@ -95,7 +95,7 @@ namespace
theDrawer->FreeBoundaryAspect()->SetColor (theColor);
theDrawer->UnFreeBoundaryAspect()->SetColor (theColor);
theDrawer->PointAspect()->SetColor (theColor);
for (Standard_Integer aPartIter = 0; aPartIter < Prs3d_DP_None; ++aPartIter)
for (Standard_Integer aPartIter = 0; aPartIter < Prs3d_DatumParts_None; ++aPartIter)
{
if (Handle(Prs3d_LineAspect) aLineAsp = theDrawer->DatumAspect()->LineAspect ((Prs3d_DatumParts )aPartIter))
{
@@ -2197,9 +2197,9 @@ void AIS_InteractiveContext::InitAttributes()
const Standard_Real aLength = 100.0;
aTrihAspect->SetAxisLength (aLength, aLength, aLength);
const Quantity_Color aColor = Quantity_NOC_LIGHTSTEELBLUE4;
aTrihAspect->LineAspect(Prs3d_DP_XAxis)->SetColor (aColor);
aTrihAspect->LineAspect(Prs3d_DP_YAxis)->SetColor (aColor);
aTrihAspect->LineAspect(Prs3d_DP_ZAxis)->SetColor (aColor);
aTrihAspect->LineAspect(Prs3d_DatumParts_XAxis)->SetColor (aColor);
aTrihAspect->LineAspect(Prs3d_DatumParts_YAxis)->SetColor (aColor);
aTrihAspect->LineAspect(Prs3d_DatumParts_ZAxis)->SetColor (aColor);
Handle(Prs3d_PlaneAspect) aPlaneAspect = myDefaultDrawer->PlaneAspect();
const Standard_Real aPlaneLength = 200.0;
@@ -2213,7 +2213,7 @@ void AIS_InteractiveContext::InitAttributes()
//=======================================================================
Standard_Real AIS_InteractiveContext::TrihedronSize() const
{
return myDefaultDrawer->DatumAspect()->AxisLength(Prs3d_DP_XAxis);
return myDefaultDrawer->DatumAspect()->AxisLength(Prs3d_DatumParts_XAxis);
}
//=======================================================================