0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / samples / mfc / standard / Common / User_Cylinder.cxx
index c62dba8..6803bc7 100755 (executable)
@@ -4,7 +4,7 @@
 
 // Implementation of Handle and type mgt
 //
-IMPLEMENT_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject)
+
 IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
 
 #include "ColoredMeshDlg.h"
@@ -12,16 +12,16 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
 #include <Graphic3d_ArrayOfTriangles.hxx>
 #include <Graphic3d_StructureManager.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
-#include <StdPrs_ToolShadedShape.hxx>
+#include <StdPrs_ToolTriangulatedShape.hxx>
 #include <Poly_Connect.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <Poly_Triangulation.hxx>
 #include <TColgp_Array1OfDir.hxx>
 #include <GProp_PGProps.hxx>
 #include <Graphic3d_Array1OfVertex.hxx>
-#include <Aspect_Array1OfEdge.hxx>
 #include <Quantity_Color.hxx>
 #include <BRepMesh_IncrementalMesh.hxx>
+#include <Prs3d.hxx>
 
 #include <AIS_GraphicTool.hxx>
 
@@ -34,7 +34,6 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant)
   BRepPrimAPI_MakeCylinder S(R,H);
   myShape = S.Shape();
   SetHilightMode(0);
-  SetSelectionMode(0);
   myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
   myPlanarFaceColor = Quantity_NOC_FIREBRICK3;
   myCylindricalFaceColor = Quantity_NOC_GRAY;
@@ -48,19 +47,18 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant)
   BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape());
   myShape = aNurbsConvert.Shape();
   SetHilightMode(0);
-  SetSelectionMode(0);
   myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
   myPlanarFaceColor = Quantity_NOC_FIREBRICK3;
   myCylindricalFaceColor = Quantity_NOC_KHAKI4;
 }
 
-void User_Cylinder::Compute(const Handle_PrsMgr_PresentationManager3d& /*aPresentationManager*/,
-                            const Handle_Prs3d_Presentation& aPresentation,
+void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
+                            const Handle(Prs3d_Presentation)& aPresentation,
                             const Standard_Integer aMode ) 
 {
   switch (aMode) {
 case 0:
-  StdPrs_WFDeflectionShape::Add(aPresentation,myShape, myDrawer );
+  StdPrs_WFShape::Add(aPresentation,myShape, myDrawer );
   break;
 case 1:
   {
@@ -107,7 +105,7 @@ case 6: //color
     mygroup->SetPrimitivesAspect(myAspect);
     myAspect->SetEdgeOn();
 
-    myDeflection = AIS_Shape::GetDeflection(myShape,myDrawer);
+    myDeflection = Prs3d::GetDeflection(myShape,myDrawer);
     BRepMesh_IncrementalMesh(myShape,myDeflection);
 
     myX1OnOff = Standard_False;
@@ -240,7 +238,7 @@ case 6: //color
       const Poly_Array1OfTriangle& triangles = myT->Triangles();
       TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper());
 
-      StdPrs_ToolShadedShape::Normal(myFace, pc, myNormal);
+      StdPrs_ToolTriangulatedShape::Normal(myFace, pc, myNormal);
       BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax);
       dUmax = (Umax - Umin);
       dVmax = (Vmax - Vmin);
@@ -310,14 +308,14 @@ case 6: //color
   }
 }
 
-void User_Cylinder::Compute(const Handle_Prs3d_Projector& aProjector,
-                            const Handle_Prs3d_Presentation& aPresentation)
+void User_Cylinder::Compute(const Handle(Prs3d_Projector)& aProjector,
+                            const Handle(Prs3d_Presentation)& aPresentation)
 {
   myDrawer->EnableDrawHiddenLine();
   StdPrs_HLRPolyShape::Add(aPresentation,myShape,myDrawer,aProjector);
 }
 
-void User_Cylinder::ComputeSelection(const Handle_SelectMgr_Selection& aSelection,
+void User_Cylinder::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
                                     const Standard_Integer aMode)
 {
   switch(aMode)