0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input...
[occt.git] / src / AIS / AIS_InteractiveContext.cxx
index ac91d36..3fcae94 100644 (file)
@@ -119,6 +119,7 @@ myDefaultDrawer(new Prs3d_Drawer()),
 myCurLocalIndex(0),
 myCurDetected(0),
 myCurHighlighted(0),
+myPickingStrategy (SelectMgr_PickingStrategy_FirstAcceptable),
 myIsAutoActivateSelMode(Standard_True)
 {
   myStyles[Prs3d_TypeOfHighlight_None]          = myDefaultDrawer;
@@ -1762,17 +1763,6 @@ void AIS_InteractiveContext::redisplayPrsModes (const Handle(AIS_InteractiveObje
   }
 }
 
-//=======================================================================
-//function : SetColor
-//purpose  :
-//=======================================================================
-void AIS_InteractiveContext::SetColor (const Handle(AIS_InteractiveObject)& theIObj,
-                                       const Quantity_NameOfColor           theColor,
-                                       const Standard_Boolean               theToUpdateViewer)
-{
-  SetColor (theIObj, Quantity_Color(theColor), theToUpdateViewer);
-}
-
 //=======================================================================
 //function : SetColor
 //purpose  :
@@ -2014,15 +2004,6 @@ Standard_Boolean AIS_InteractiveContext::HasColor (const Handle(AIS_InteractiveO
   return theIObj->HasColor();
 }
 
-//=======================================================================
-//function : Color
-//purpose  :
-//=======================================================================
-Quantity_NameOfColor AIS_InteractiveContext::Color (const Handle(AIS_InteractiveObject)& theIObj) const
-{
-  return theIObj->Color();
-}
-
 //=======================================================================
 //function : Color
 //purpose  :
@@ -2097,7 +2078,7 @@ void AIS_InteractiveContext::UnsetWidth (const Handle(AIS_InteractiveObject)& th
 //purpose  :
 //=======================================================================
 void AIS_InteractiveContext::SetMaterial (const Handle(AIS_InteractiveObject)& theIObj,
-                                          const Graphic3d_NameOfMaterial       theName,
+                                          const Graphic3d_MaterialAspect&      theMaterial,
                                           const Standard_Boolean               theToUpdateViewer)
 {
   if (theIObj.IsNull())
@@ -2106,7 +2087,7 @@ void AIS_InteractiveContext::SetMaterial (const Handle(AIS_InteractiveObject)& t
   }
 
   setContextToObject (theIObj);
-  theIObj->SetMaterial (theName);
+  theIObj->SetMaterial (theMaterial);
   redisplayPrsRecModes (theIObj, theToUpdateViewer);
 }
 
@@ -2734,10 +2715,10 @@ void AIS_InteractiveContext::InitAttributes()
   Handle(Prs3d_DatumAspect) aTrihAspect = myDefaultDrawer->DatumAspect();
   const Standard_Real aLength = 100.0;
   aTrihAspect->SetAxisLength (aLength, aLength, aLength);
-  const Quantity_NameOfColor aColor = Quantity_NOC_LIGHTSTEELBLUE4;
-  aTrihAspect->FirstAxisAspect() ->SetColor (aColor);
-  aTrihAspect->SecondAxisAspect()->SetColor (aColor);
-  aTrihAspect->ThirdAxisAspect() ->SetColor (aColor);
+  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);
 
   Handle(Prs3d_PlaneAspect) aPlaneAspect = myDefaultDrawer->PlaneAspect();
   const Standard_Real aPlaneLength = 200.0;
@@ -2751,7 +2732,7 @@ void AIS_InteractiveContext::InitAttributes()
 //=======================================================================
 Standard_Real AIS_InteractiveContext::TrihedronSize() const
 {
-  return myDefaultDrawer->DatumAspect()->FirstAxisLength();
+  return myDefaultDrawer->DatumAspect()->AxisLength(Prs3d_DP_XAxis);
 }
 
 //=======================================================================