0028895: Visualization, V3d_View::SetComputedMode() - HLR calculation is performed...
[occt.git] / src / PrsMgr / PrsMgr_Presentation.cxx
index d6ca61c..17ff1c2 100644 (file)
@@ -18,6 +18,7 @@
 #include <Graphic3d_DataStructureManager.hxx>
 #include <Graphic3d_Structure.hxx>
 #include <Precision.hxx>
+#include <Prs3d_Drawer.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_Projector.hxx>
 #include <PrsMgr_ModedPresentation.hxx>
@@ -28,7 +29,7 @@
 #include <Standard_Type.hxx>
 #include <Graphic3d_CView.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Presentation,MMgt_TShared)
+IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Presentation, Standard_Transient)
 
 namespace
 {
@@ -125,8 +126,7 @@ void PrsMgr_Presentation::SetVisible (const Standard_Boolean theValue)
 //function : Highlight
 //purpose  :
 //=======================================================================
-void PrsMgr_Presentation::Highlight (const Aspect_TypeOfHighlightMethod theMethod,
-                                     const Quantity_Color&              theColor)
+void PrsMgr_Presentation::Highlight (const Handle(Prs3d_Drawer)& theStyle)
 {
   if (!IsHighlighted())
   {
@@ -134,7 +134,7 @@ void PrsMgr_Presentation::Highlight (const Aspect_TypeOfHighlightMethod theMetho
   }
 
   display (Standard_True);
-  myStructure->Highlight (theMethod, theColor);
+  myStructure->Highlight (theStyle);
 }
 
 //=======================================================================
@@ -287,31 +287,7 @@ Handle(Graphic3d_Structure) PrsMgr_Presentation::Compute (const Handle(Graphic3d
                                                           const Handle(Geom_Transformation)&            theTrsf)
 {
   Handle(Prs3d_Presentation) aPrs3d = new Prs3d_Presentation (myPresentationManager->StructureManager());
-  if (theTrsf->Form() == gp_Translation)
-  {
-    myPresentableObject->Compute (Projector (theProjector), aPrs3d);
-    aPrs3d->SetTransformation (theTrsf);
-    return aPrs3d;
-  }
-
-  // waiting that something is done in gp_Trsf...rob
-  for (Standard_Integer i = 1; i <= 3; ++i)
-  {
-    for (Standard_Integer j = 1; j <= 3; ++j)
-    {
-      if (i != j)
-      {
-        if (Abs (theTrsf->Value (i, j)) > Precision::Confusion())
-        {
-          myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs3d);
-          return aPrs3d;
-        }
-      }
-    }
-  }
-
-  myPresentableObject->Compute (Projector (theProjector), aPrs3d);
-  aPrs3d->SetTransformation (theTrsf);
+  myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs3d);
   return aPrs3d;
 }