]> OCCT Git - occt.git/commitdiff
0028990: Coding Rules - deprecate redundant class Prs3d_Root
authorkgv <kgv@opencascade.com>
Fri, 28 Aug 2020 13:02:18 +0000 (16:02 +0300)
committerkgv <kgv@opencascade.com>
Sun, 30 Aug 2020 16:04:53 +0000 (19:04 +0300)
Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.

79 files changed:
dox/dev_guides/upgrade/upgrade.md
samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp
samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp
samples/mfc/standard/01_Geometry/src/StdAfx.h
samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp
samples/mfc/standard/02_Modeling/src/StdAfx.h
samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp
samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp
samples/mfc/standard/Common/StdAfx.h
samples/mfc/standard/Common/User_Cylinder.cxx
src/AIS/AIS_ColorScale.cxx
src/AIS/AIS_ColoredShape.cxx
src/AIS/AIS_Manipulator.cxx
src/AIS/AIS_Plane.cxx
src/AIS/AIS_Point.cxx
src/AIS/AIS_PointCloud.cxx
src/AIS/AIS_RubberBand.cxx
src/AIS/AIS_Shape.cxx
src/AIS/AIS_TextLabel.cxx
src/AIS/AIS_TexturedShape.cxx
src/AIS/AIS_Triangulation.cxx
src/AIS/AIS_Trihedron.cxx
src/AIS/AIS_ViewCube.cxx
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs_AnglePresentation.cxx
src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx
src/DsgPrs/DsgPrs_ConcentricPresentation.cxx
src/DsgPrs/DsgPrs_DatumPrs.cxx
src/DsgPrs/DsgPrs_DiameterPresentation.cxx
src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx
src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FixPresentation.cxx
src/DsgPrs/DsgPrs_IdenticPresentation.cxx
src/DsgPrs/DsgPrs_LengthPresentation.cxx
src/DsgPrs/DsgPrs_MidPointPresentation.cxx
src/DsgPrs/DsgPrs_OffsetPresentation.cxx
src/DsgPrs/DsgPrs_ParalPresentation.cxx
src/DsgPrs/DsgPrs_PerpenPresentation.cxx
src/DsgPrs/DsgPrs_RadiusPresentation.cxx
src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx
src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx
src/DsgPrs/DsgPrs_SymbPresentation.cxx
src/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/DsgPrs/DsgPrs_TangentPresentation.cxx
src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx
src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx
src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_MeshEntityOwner.cxx
src/MeshVS/MeshVS_MeshPrsBuilder.cxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/MeshVS/MeshVS_PrsBuilder.cxx
src/MeshVS/MeshVS_TextPrsBuilder.cxx
src/MeshVS/MeshVS_VectorPrsBuilder.cxx
src/Prs3d/Prs3d_Arrow.hxx
src/Prs3d/Prs3d_BndBox.cxx
src/Prs3d/Prs3d_Point.hxx
src/Prs3d/Prs3d_Root.hxx
src/Prs3d/Prs3d_Text.hxx
src/PrsDim/PrsDim_AngleDimension.cxx
src/PrsDim/PrsDim_Dimension.cxx
src/QABugs/QABugs_19.cxx
src/StdPrs/StdPrs_Curve.cxx
src/StdPrs/StdPrs_DeflectionCurve.cxx
src/StdPrs/StdPrs_HLRPolyShape.cxx
src/StdPrs/StdPrs_HLRShape.cxx
src/StdPrs/StdPrs_Plane.cxx
src/StdPrs/StdPrs_PoleCurve.cxx
src/StdPrs/StdPrs_ShadedShape.cxx
src/StdPrs/StdPrs_ShadedSurface.cxx
src/StdPrs/StdPrs_WFDeflectionSurface.cxx
src/StdPrs/StdPrs_WFPoleSurface.cxx
src/StdPrs/StdPrs_WFSurface.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XCAFPrs/XCAFPrs_AISObject.cxx

index 68b48e7014d0e33f37badb7c5b066bbf1c22668a..75d4062ba77244abd45a72ef795478897497dd61 100644 (file)
@@ -1980,6 +1980,10 @@ Previously, sub-classes of *Message_Printer* have to provide a triplet of *Messa
 *Message_Printer* interface has been changed, so that sub-classes now have to implement only single method *Message_Printer::send()* accepting TCollection_AsciiString argument and having no Endl flag, which has been removed.
 Old three Message_Printer::Send() methods remain defined virtual with unused last argument and redirecting to new send() method by default.
 
+@subsection upgrade_750_prd3d_root Prs3d_Root deprecation
+
+Redundant class Prs3d_Root has been marked as deprecated - Prs3d_Presentation::NewGroup() should be called directly.
+
 @subsection upgrade_750_draw_hotkeys Draw Harness hotkeys
 
 Draw Harness hotkeys **W** (Wireframe) and **S** (Shaded) have been re-mapped to **Ctrl+W** and **Ctrl+S**.
index 30fa4da9c79079904fa72ed2b275e40780796762..a6a65127702dcaec9a3eaf7a142180571fd150be 100755 (executable)
@@ -30,7 +30,7 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
                                const Handle(Prs3d_Presentation)& thePrs,
                                const Standard_Integer )
 {
-  Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::CurrentGroup (thePrs);
+  Handle(Graphic3d_Group) aPrsGroup = thePrs->CurrentGroup();
   aPrsGroup->SetGroupPrimitivesAspect (myDrawer->LineAspect()->Aspect());
   aPrsGroup->SetGroupPrimitivesAspect (myDrawer->PointAspect()->Aspect());
 
index ab9e6030eb59e560410edc8a9fa25f3e14ac8603..e281c9cab03e1df93fb7f6904de026b2539b063a 100755 (executable)
@@ -84,10 +84,10 @@ void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments (2);
   aPrims->AddVertex (myPnt);
   aPrims->AddVertex (aLastPoint);
-  Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
-  Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->AddPrimitiveArray (aPrims);
   // Draw arrow
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
                      aLastPoint,
                      myDir,
                      anArrowAspect->Angle(),
@@ -97,7 +97,7 @@ void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
   if (myText.Length() != 0)
   {
     gp_Pnt aTextPosition = aLastPoint;
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(),
                       myDrawer->TextAspect(),
                       myText,
                       aTextPosition);
index 24161de902aad08ed260d4963d32f6cdfa8dc352..bf7d6259e5c06ce1f168051c6448972fb6cd5f39 100755 (executable)
 #include <Precision.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_Drawer.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <Prs3d_ArrowAspect.hxx>
 #include <Prs3d_IsoAspect.hxx>
index 833f4ba8169bb16a1ddf71d09c30817f75f4a08f..8e1f8771fe5eeaa773d8339641412c2acecc156d 100755 (executable)
@@ -42,10 +42,10 @@ void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*a
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments (2);
   aPrims->AddVertex (myStartPnt);
   aPrims->AddVertex (myEndPnt);
-  Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
-  Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->AddPrimitiveArray (aPrims);
   // Draw arrow
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
                      myEndPnt,
                      gp_Dir (gp_Vec(myStartPnt, myEndPnt)),
                      anArrowAspect->Angle(),
index 69183439b8d16534cb239c3e0370ab96f15d5b48..2fece811c0d2c454396b52b6093168062ae665e1 100755 (executable)
 #include <Plate_GtoCConstraint.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <GeomPlate_Surface.hxx>
 #include <GeomProjLib.hxx>
 #include <GCE2d_MakeSegment.hxx>
index a6d774f33891aa48ce21f8115b1a7fae0f496aec..42d6c5e83810fb6f969b782c22b849906656006b 100755 (executable)
@@ -46,7 +46,7 @@ void Sample2D_Face::DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, cons
     anArrow->AddVertex(aPoint);
     anArrow->AddVertex(aRight);
 
-    Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(anArrow);
+    thePresentation->CurrentGroup()->AddPrimitiveArray(anArrow);
   }
 }
 
@@ -212,19 +212,19 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
       {
       case TopAbs_FORWARD: {
 
-        Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD);  
+        thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD);  
         DrawMarker(aTrimmedCurve, thePresentation);
         break;
                            }
       case TopAbs_REVERSED: {
 
-        Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED);  
+        thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED);  
         DrawMarker(aTrimmedCurve, thePresentation);
         break;
                             }
       case TopAbs_INTERNAL: {
 
-        Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL);  
+        thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL);  
         DrawMarker(aTrimmedCurve, thePresentation);
 
         mySeq_INTERNAL.Append(aCurve3d);
@@ -232,7 +232,7 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
                             }
       case TopAbs_EXTERNAL: {
 
-        Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL);  
+        thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL);  
         DrawMarker(aTrimmedCurve, thePresentation);
         break;
                             }
@@ -242,17 +242,17 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
     ex.Next();
   }
   //add all primitives to the presentation
-  Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD);  
-  Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myForwardArray);
+  thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD);  
+  thePresentation->CurrentGroup()->AddPrimitiveArray(myForwardArray);
 
-  Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED);
-  Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myReversedArray);
+  thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED);
+  thePresentation->CurrentGroup()->AddPrimitiveArray(myReversedArray);
 
-  Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL);
-  Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myInternalArray);
+  thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL);
+  thePresentation->CurrentGroup()->AddPrimitiveArray(myInternalArray);
 
-  Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL);
-  Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myExternalArray);
+  thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL);
+  thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray);
 }
 
 //Method for advanced customizable selection of picked object
@@ -275,8 +275,7 @@ void Sample2D_Face::HilightSelected
   aSelectionPrs->Clear();
   FillData();
 
-  Prs3d_Root::NewGroup ( aSelectionPrs );
-  Handle (Graphic3d_Group) aSelectGroup = Prs3d_Root::CurrentGroup ( aSelectionPrs);
+  Handle (Graphic3d_Group) aSelectGroup = aSelectionPrs->NewGroup();
 
   for(Standard_Integer i=1; i<=aLength; ++i)
   {
@@ -344,8 +343,7 @@ void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationMana
   FillData();
 
   //Direct highlighting
-  Prs3d_Root::NewGroup ( aHighlightPrs );
-  Handle (Graphic3d_Group) aHilightGroup = Prs3d_Root::CurrentGroup(aHighlightPrs);
+  Handle (Graphic3d_Group) aHilightGroup = aHighlightPrs->NewGroup();
   Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theStyle->Color(), Aspect_TOL_SOLID,2);
   switch(theOwner->Priority())
index 0977780c3866736b86df6d476fdbe9777ed5d7d6..d858dc7843b80dd449bbc1efbf0c2857ff2f210a 100755 (executable)
@@ -43,15 +43,15 @@ void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aP
   if(myMarkerType == Aspect_TOM_USERDEFINED)
   {
     Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetGroupPrimitivesAspect(aMarker);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (myArrayOfPoints);
+    aPresentation->CurrentGroup()->SetGroupPrimitivesAspect(aMarker);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (myArrayOfPoints);
   }
   else
   {
     Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex);
-    Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect(aMarker);
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(aMarker);
     Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
     anArrayOfPoints->AddVertex (myXPosition, myYPosition, 0);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
   }
 }
index b20c7dd570f1d5f7413ac31c78a9bf38516117c2..562c85e14712021e918b031b420735d2b7942935 100755 (executable)
@@ -66,7 +66,6 @@
 #include <gp_Pnt2d.hxx>
 
 #include <OpenGl_GraphicDriver.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
index b2c482024b520cf39d3dd1a7fc97cd40e756f6b9..c427005c2caa2d70229923b23cbef8607d9a3f9f 100755 (executable)
@@ -76,7 +76,7 @@ case 6: //color
 
     Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager();
 
-    Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation);
+    Handle(Graphic3d_Group) mygroup = aPresentation->CurrentGroup();
     myAspect = (new Prs3d_ShadingAspect())->Aspect();
     Graphic3d_MaterialAspect material = myAspect->FrontMaterial();
     material.SetAmbientColor (Quantity_NOC_BLACK);
@@ -281,7 +281,7 @@ case 6: //color
         } // end of "if the triangle is valid
       } // end of the "parcours" of the triangles
 
-      Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aOP);
+      aPresentation->CurrentGroup()->AddPrimitiveArray (aOP);
 
       mygroup->SetGroupPrimitivesAspect(myAspect);
     }// end of the exploration of the shape in faces
index afaba07c7fee171c78521c05fbde55530ed209dd..8d0fd4837eb8b9c8b8f51c0499daa59ac0509ca4 100644 (file)
@@ -28,7 +28,6 @@
 #include <Graphic3d_ArrayOfTriangles.hxx>
 #include <Graphic3d_Text.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_Text.hxx>
 #include <Prs3d_TextAspect.hxx>
index 22b58730a0a55bbf88c9e68d7e3c7351e0a159da..19a62d355f2143a864e69fa5f84a204d4f8117ca 100644 (file)
@@ -33,7 +33,6 @@
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_ShadingAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <StdSelect_BRepSelectionTool.hxx>
index bb0ced8bdf333d50a4481c40e6b4764e51cb2a08..c3e89ecd3574422f284f6a400cae4cca326c099d 100644 (file)
@@ -21,7 +21,6 @@
 #include <gce_MakeDir.hxx>
 #include <IntAna_IntConicQuad.hxx>
 #include <Prs3d_Arrow.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_ToolDisk.hxx>
 #include <Prs3d_ToolSector.hxx>
@@ -1387,7 +1386,7 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
       myHighlightTranslator->Clear();
     }
     {
-      Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightTranslator);
+      Handle(Graphic3d_Group) aGroup = myHighlightTranslator->CurrentGroup();
       aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
       aGroup->AddPrimitiveArray (myTriangleArray);
     }
@@ -1411,7 +1410,7 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
       myHighlightScaler->Clear();
     }
     {
-      Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightScaler);
+      Handle(Graphic3d_Group) aGroup = myHighlightScaler->CurrentGroup();
       aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
       aGroup->AddPrimitiveArray (myCube.Array());
     }
@@ -1434,7 +1433,7 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
       myHighlightRotator->Clear();
     }
     {
-      Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightRotator);
+      Handle(Graphic3d_Group) aGroup = myHighlightRotator->CurrentGroup();
       aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
       aGroup->AddPrimitiveArray (myCircle.Array());
     }
@@ -1466,7 +1465,7 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
       myHighlightDragger->Clear();
     }
     {
-      Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(myHighlightDragger);
+      Handle(Graphic3d_Group) aGroup = myHighlightDragger->CurrentGroup();
       aGroup->SetGroupPrimitivesAspect(aFillArea);
       aGroup->AddPrimitiveArray(mySector.Array());
     }
index b46b9aae204a308bb6b79b5006b82c05bbf6289e..fabb54d82615cd457b40d45453d43105e967f88a 100644 (file)
@@ -258,7 +258,7 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
       {
         ComputeFrame();
         Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
-        Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+        Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
         TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
         gp_Pnt p1;
         const Standard_Real Xmax = 0.5*Standard_Real(theaspect->PlaneXLength());
index 4ac15e329aa90fad5d1f2d46c3d95aeed4427aaf..e9e8711b3045c41f83abbbd509007770ff453905 100644 (file)
@@ -91,7 +91,7 @@ void AIS_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
     StdPrs_Point::Add(aPresentation,myComponent,myDrawer);
   else if (aMode== -99)
     {
-      Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+      Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
       TheGroup->SetPrimitivesAspect (myHilightDrawer->PointAspect()->Aspect());
       Handle(Graphic3d_ArrayOfPoints) aPoint = new Graphic3d_ArrayOfPoints (1);
       aPoint->AddVertex (myComponent->X(),myComponent->Y(),myComponent->Z());
index b3a2727a236f56025bdb2c231e172324f481431f..c2d8a73ab1c9cf4d78c3de47b06a29a80c97f47c 100644 (file)
@@ -22,7 +22,6 @@
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <PrsMgr_Presentations.hxx>
 #include <Select3D_SensitiveBox.hxx>
index 80641f00fd299aeb95ffafef2d0be68ef0a15def..94fbbffaec10594309f228eecb148b1fbc7c7f23 100644 (file)
@@ -24,7 +24,6 @@
 #include <Graphic3d_TransModeFlags.hxx>
 #include <Graphic3d_ZLayerId.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <V3d_Viewer.hxx>
index b1afa4ba8005a052a766208d9f97f2f1f811883c..0dee3f34c4a8f3197b8a2b9bf8f062faa3d25a9a 100644 (file)
@@ -42,7 +42,6 @@
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_BndBox.hxx>
 #include <StdPrs_ToolTriangulatedShape.hxx>
index 3217ebf65c0fddcbe715088ecc911520a44a913f..f387fafe56baa1ec9202c571c3a0f4688e17fb0d 100644 (file)
@@ -299,7 +299,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
         if (myHasFlipping)
         {
           gp_Ax2 aFlippingAxes (aCenterOfLabel, myOrientation3D.Direction(), myOrientation3D.XDirection());
-          Prs3d_Root::CurrentGroup (thePrs)->SetFlippingOptions (Standard_True, aFlippingAxes);
+          thePrs->CurrentGroup()->SetFlippingOptions (Standard_True, aFlippingAxes);
         }
         gp_Ax2 anOrientation = myOrientation3D;
         anOrientation.SetLocation (aPosition);
@@ -308,15 +308,15 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
         {
           aHasOwnAnchor = Standard_False; // always not using own anchor if flipping
         }
-        Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, anOrientation, aHasOwnAnchor);
+        Prs3d_Text::Draw (thePrs->CurrentGroup(), anAsp, myText, anOrientation, aHasOwnAnchor);
         if (myHasFlipping && isInit)
         {
-          Prs3d_Root::CurrentGroup (thePrs)->SetFlippingOptions (Standard_False, gp_Ax2());
+          thePrs->CurrentGroup()->SetFlippingOptions (Standard_False, gp_Ax2());
         }
       }
       else
       {
-        Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, aPosition);
+        Prs3d_Text::Draw (thePrs->CurrentGroup(), anAsp, myText, aPosition);
       }
 
       if (isInit)
@@ -328,7 +328,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
         gp_Pnt aMinPnt = gp_Pnt (-aDx, -aDy, 0.0).Transformed (aLabelPlane);
         gp_Pnt aMaxPnt = gp_Pnt ( aDx,  aDy, 0.0).Transformed (aLabelPlane);
 
-        Graphic3d_BndBox4f& aBox = Prs3d_Root::CurrentGroup (thePrs)->ChangeBoundingBox();
+        Graphic3d_BndBox4f& aBox = thePrs->CurrentGroup()->ChangeBoundingBox();
         aBox.Add (Graphic3d_Vec4 ((float) aMinPnt.X(), (float) aMinPnt.Y(), (float) aMinPnt.Z(), 1.0));
         aBox.Add (Graphic3d_Vec4 ((float) aMaxPnt.X(), (float) aMaxPnt.Y(), (float) aMaxPnt.Z(), 1.0));
       }
index a764719debb22ed639bbb4ffd9a15740f8912505..74136aea543e02c26eba05465505a4eadfd68a0e 100644 (file)
@@ -28,7 +28,6 @@
 #include <Precision.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
index dfc0d1e8f10ba18e4bdd7d53f175156dc31455d3..b8559671d877c90cd797b90f22b8ef9a765e68a6 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <AIS_DisplayMode.hxx>
 #include <AIS_Triangulation.hxx>
+
+#include <AIS_DisplayMode.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <Standard_Type.hxx>
 #include <Poly_Array1OfTriangle.hxx>
 #include <Poly_Triangulation.hxx>
 #include <Prs3d_Drawer.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <TShort_Array1OfShortReal.hxx>
 #include <TColgp_Array1OfPnt.hxx>
@@ -131,7 +131,7 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
 
       Handle(Graphic3d_ArrayOfTriangles) anArray = new Graphic3d_ArrayOfTriangles (myNbNodes, myNbTriangles * 3,
                                                                                    hasVNormals, hasVColors, Standard_False);
-      Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+      Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
       Handle(Graphic3d_AspectFillArea3d) aspect = myDrawer->ShadingAspect()->Aspect();
 
       Standard_Integer i;
index 5105e8391c1fad0d78862e97ebefce6b4ec8b092..def2623aee01505c3c2a4c8c86d4d51d972f8837 100644 (file)
@@ -298,7 +298,7 @@ void AIS_Trihedron::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManag
 
   aPresentation->Clear();
   const Prs3d_DatumParts aPart = anOwner->DatumPart();
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+  Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
   if (aPart >= Prs3d_DP_XOYAxis && aPart <= Prs3d_DP_XOZAxis)
   {
     // planes selection is equal in both shading and wireframe mode
@@ -443,7 +443,7 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
   // display origin
   {
     // Origin is visualized only in shading mode
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+    Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
     const Prs3d_DatumParts aPart = Prs3d_DP_Origin;
     if (anAspect->DrawDatumPart(aPart))
     {
@@ -470,7 +470,7 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
         continue;
       }
 
-      Handle(Graphic3d_Group) anAxisGroup = Prs3d_Root::NewGroup (thePrs);
+      Handle(Graphic3d_Group) anAxisGroup = thePrs->NewGroup();
       myPartToGroup.Bind (aPart, anAxisGroup);
       if (isShadingMode)
       {
@@ -489,7 +489,7 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
         continue;
       }
 
-      Handle(Graphic3d_Group) anArrowGroup = Prs3d_Root::NewGroup (thePrs);
+      Handle(Graphic3d_Group) anArrowGroup = thePrs->NewGroup();
       anArrowGroup->SetGroupPrimitivesAspect (anAspect->ArrowAspect()->Aspect());
       anArrowGroup->AddPrimitiveArray (arrayOfPrimitives (anArrowPart));
     }
@@ -518,7 +518,7 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
         case Prs3d_DP_ZAxis: aDir = aComponent->Direction();  break;
         default: break;
       }
-      Handle(Graphic3d_Group) aLabelGroup = Prs3d_Root::NewGroup (thePrs);
+      Handle(Graphic3d_Group) aLabelGroup = thePrs->NewGroup();
       const gp_Pnt aPoint = anOrigin.XYZ() + aDir.XYZ() * anAxisLength;
       Prs3d_Text::Draw (aLabelGroup, anAspect->TextAspect(), aLabel, aPoint);
     }
@@ -533,7 +533,7 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
       continue;
     }
 
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+    Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
     myPartToGroup.Bind (aPart, aGroup);
 
     aGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
index a8c7cef02d2e6a73d077c20c2f9e1582413c827f..ff60577ad1bda858091b8e94663021ed82275742 100644 (file)
@@ -24,7 +24,6 @@
 #include <Prs3d.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_DatumAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <Prs3d_ToolDisk.hxx>
 #include <Prs3d_ToolSphere.hxx>
index 38aece8c4369481f816b56275b03bcd8a6b8e344..ee8b6b451b6e9fc793d2288cfabb4216ad9dd01e 100644 (file)
@@ -42,7 +42,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Quantity_Color.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -109,7 +108,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
       {
         Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
         anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
-        Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+        aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
       }
       break;
     }
@@ -119,7 +118,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
       // On dessine un rond 
       Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
       anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
-      Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+      aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
       break;
     }
 
index f71d8d7964931c776362f1c639ab4c06c85b51d7..e467f3663b2f2e77e5d84832dac482d714930664 100644 (file)
@@ -161,7 +161,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(12);
   for( i = 0; i <= 11; i++ )
     aPrims->AddVertex(ElCLib::Value(param + angle/11 * i, aCircle2));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   DsgPrs::ComputeSymbol(aPresentation, aDimensionAspect, AttachmentPnt,
                         AttachmentPnt, aDir, aDir, DsgPrs_AS_LASTAR);
@@ -171,7 +171,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   param = ElCLib::Parameter(aCircle2, tmpPnt);
   tmpPnt = ElCLib::Value(param, aCircle2);
   tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -2));
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), aDimensionAspect->TextAspect(), txt, tmpPnt);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), aDimensionAspect->TextAspect(), txt, tmpPnt);
 
   angle = 2. * M_PI - param ; 
   if( param > OppParam )
@@ -180,7 +180,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     aPrims = new Graphic3d_ArrayOfPolylines(12);
     for( i = 11; i >= 0; i-- )
       aPrims->AddVertex(ElCLib::Value(-angle/11 * i, aCircle2));
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 
   if( AboveInBelowCone( VmaxCircle, VminCircle, myCircle ) == 1 && !IsConeTrimmed )         //above
@@ -204,7 +204,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     aPrims->AddVertex(OppositePnt);
     aPrims->AddVertex(( aPnt.Distance(P1) < aPnt.Distance(P2) )? P11 : P12);
   }
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 
@@ -230,7 +230,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   sprintf(valcar,"%5.2f",theval);
 
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+  Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
   aGroup->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Ax2 ax(CenterPoint,axisdir,dir1);
@@ -343,7 +343,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   sprintf(valcar,"%5.2f",theval);
   
   Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
+  aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   gp_Circ AngleCirc, AttachCirc;
   Standard_Real FirstParAngleCirc, LastParAngleCirc, FirstParAttachCirc, LastParAttachCirc;
@@ -385,7 +385,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     for (Standard_Integer i = 0; i < NodeNumber; i++, FirstParAngleCirc += delta)
       aPrims->AddVertex(ElCLib::Value( FirstParAngleCirc, AngleCirc ));
 
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
     aPrims = new Graphic3d_ArrayOfSegments(4);
   }
   else // null angle
@@ -399,7 +399,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow1, EndOfArrow2, DirOfArrow1, DirOfArrow2, ArrowPrs );
   
   // Drawing the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
   
   // Line from AttachmentPoint1 to end of Arrow1
   aPrims->AddVertex(AttachmentPoint1);
@@ -408,7 +408,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPrims->AddVertex(ProjAttachPoint2);
   aPrims->AddVertex(EndOfArrow2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Line or arc from AttachmentPoint2 to its "projection"
   if (AttachmentPoint2.Distance( ProjAttachPoint2 ) > Precision::Confusion())
@@ -431,7 +431,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
          for (Standard_Integer i = 0; i < NodeNumber; i++, FirstParAttachCirc += delta)
         aPrims->AddVertex(ElCLib::Value( FirstParAttachCirc, AttachCirc ));
        }
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
 
@@ -457,7 +457,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   sprintf(valcar,"%5.2f",theval);
   
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Dir Norm;
   if (!dir1.IsParallel(dir2, Precision::Angular())) {
@@ -515,7 +515,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
   
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText,OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText,OffsetPoint);
   
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -534,7 +534,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Vec v2(ptarr,ptarr3);
   const Standard_Real beta = v1.Angle(v2);
   dirarr.Rotate(ax1, beta);
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint1);
@@ -545,13 +545,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   ax1.SetLocation(ptarr);
   gp_Dir dirarr2(vecarr);
   dirarr2.Rotate(ax1,  - beta);
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
   
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(ptarr);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 
@@ -576,7 +576,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   sprintf(valcar,"%5.2f",theval);
   
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Dir Norm = dir1.Crossed(dir2);
   if (Abs(theval) > M_PI) Norm.Reverse();
@@ -626,7 +626,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
   
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -662,7 +662,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(ptarr1);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // One traces the arrows
   DsgPrs::ComputeSymbol(aPresentation,LA,ptarr,ptarr1,dirarr,dirarr2,ArrowPrs);
@@ -692,7 +692,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   TCollection_ExtendedString aText(valas);
 
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Dir Norm = dir1.Crossed(dir2);
   if (Abs(theval) > M_PI) Norm.Reverse();
@@ -742,7 +742,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
 
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -762,7 +762,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   const Standard_Real beta = v1.Angle(v2);
   dirarr.Rotate(ax1, beta);
 
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint1);
@@ -773,13 +773,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Dir dirarr2(vecarr);
   dirarr2.Rotate(ax1, -beta);
 
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
   
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(ptarr);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentation,
@@ -791,7 +791,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
                                     const DsgPrs_ArrowSide ArrowSide)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   gp_Dir dir1(gp_Vec(CenterPoint, AttachmentPoint1));
   gp_Ax2 ax(CenterPoint,theAxe.Direction(),dir1);
@@ -803,7 +803,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(dteta*(i-1),cer));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   Standard_Real uc1 = 0.;
   Standard_Real uc2 = ElCLib::Parameter(cer,AttachmentPoint1.Rotated(theAxe,theval));
@@ -818,21 +818,21 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     case DsgPrs_AS_FIRSTAR:
     {
       ElCLib::D1(uc1,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
+      Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     case DsgPrs_AS_LASTAR:
     {
       ElCLib::D1(uc2,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
+      Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     case DsgPrs_AS_BOTHAR:
     {
       ElCLib::D1(uc1,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
+      Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
       ElCLib::D1(uc2,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
+      Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     default: break;
index 83be3638d83900481b18549f611652ddab155cff..884540cd48ba40ce90e3904ccb27d5db25555f66 100644 (file)
@@ -38,17 +38,17 @@ void DsgPrs_Chamf2dPresentation::Add(
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(aPntAttach);
   aPrims->AddVertex(aPntEnd);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPntAttach, ArrowDir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPntAttach, ArrowDir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
                     
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntEnd);
 }
 
 
@@ -67,14 +67,14 @@ void DsgPrs_Chamf2dPresentation::Add(
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(aPntAttach);
   aPrims->AddVertex(aPntEnd);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntEnd);
 
   gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
   gp_Dir ArrowDir1 = ArrowDir;
index 905550a1f284ded452e4ce3f96d22be2f30588f6..5424082130e57e57cd5c0bd2afcbe05bfd5d9b2a 100644 (file)
@@ -14,7 +14,6 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-
 #include <DsgPrs_ConcentricPresentation.hxx>
 #include <ElCLib.hxx>
 #include <gp_Circ.hxx>
@@ -26,7 +25,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 
 void DsgPrs_ConcentricPresentation::Add(
                           const Handle(Prs3d_Presentation)& aPresentation,
@@ -43,7 +41,7 @@ void DsgPrs_ConcentricPresentation::Add(
   const Standard_Integer nbp = 50;
   const Standard_Real dteta = (2. * M_PI)/nbp;
 
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(2*nbp+6,4);
 
@@ -90,5 +88,5 @@ void DsgPrs_ConcentricPresentation::Add(
   aPrims->AddVertex(p1);
   aPrims->AddVertex(p2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
index ee90be8687d4e2415c069a17d818552e1490f998..6c122d87d1758b22c38568e386ba7c9df2260ecb 100644 (file)
@@ -34,7 +34,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
                            const Handle(Prs3d_Drawer)& theDrawer)
 {
   Handle(Prs3d_DatumAspect) aDatumAspect = theDrawer->DatumAspect();
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+  Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
 
   gp_Ax2 anAxis (theDatum);
   gp_Pnt anOrigin = anAxis.Location();
index ecd6d42f7fd857ca29ae35a456ec44e48128623a..ce6a1ca5758bae21a8ee29dc3a37649e7c0621e4 100644 (file)
@@ -48,7 +48,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
                                       const Standard_Boolean IsDiamSymbol )
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Standard_Real parat    = ElCLib::Parameter(aCircle, AttachmentPoint);
   gp_Pnt        ptoncirc = ElCLib::Value    (parat, aCircle);
@@ -73,13 +73,13 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(pt1);
   aPrims->AddVertex(OppositePoint);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // value
   TCollection_ExtendedString Text = aText;
   if(IsDiamSymbol) 
     Text = TCollection_ExtendedString("\330  ") +  aText; // VRO (2007-05-17) inserted a blank.
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, AttachmentPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, AttachmentPoint);
 
   // arrows
   gp_Dir arrdir (vecrap);
@@ -144,7 +144,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   }
 
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   Standard_Real parEndOfArrow = ElCLib::Parameter(aCircle,AttachmentPoint);
   gp_Pnt EndOfArrow;
   gp_Pnt DrawPosition = AttachmentPoint;// point of attachment
@@ -185,13 +185,13 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(DrawPosition);
   aPrims->AddVertex(EndOfArrow);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // text
   TCollection_ExtendedString Text = aText;
   if(IsDiamSymbol)
     Text = TCollection_ExtendedString("\330 ") +  Text;//  => \330 | \370?
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, DrawPosition);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, DrawPosition);
 
   // Add presentation of arrow 
   gp_Dir DirOfArrow(gp_Vec(DrawPosition, EndOfArrow).XYZ()); 
index e6deeea7bb31ffaeb19d30fca38c115162e74dbd..8267a21809db116dabb7dc90245d4c300cb625e3 100644 (file)
@@ -57,7 +57,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
                                            const DsgPrs_ArrowSide ArrowPrs)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
  
   const Standard_Real dist = aCenter.Distance( aPosition );
   const Standard_Boolean inside = ( dist <= theval );
@@ -66,12 +66,12 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(aCenter);
   aPrims->AddVertex(EndPoint);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // value
   TCollection_ExtendedString Text(IsMaxRadius? "a = " : "b = ");
   Text += aText;
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, aPosition);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, aPosition);
 
   // arrows
   gp_Dir arrdir( gp_Vec( aCenter, anEndOfArrow));
@@ -99,7 +99,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
                                            const DsgPrs_ArrowSide ArrowPrs)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   if(!IsInDomain)
   {
@@ -115,7 +115,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
     Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
     for (Standard_Integer i = 0 ; i < NodeNumber; i++, parFirst += delta)
          aPrims->AddVertex(ElCLib::Value( parFirst, anEllipse ));
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   DsgPrs_EllipseRadiusPresentation::Add(aPresentation, aDrawer, theval, aText,
                                         aPosition, anEndOfArrow, aCenter, IsMaxRadius, ArrowPrs);
@@ -141,7 +141,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
                                            const DsgPrs_ArrowSide ArrowPrs)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   if(!IsInDomain)
   {
@@ -167,7 +167,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
          aCurve->D0( parFirst, p1 );
          aPrims->AddVertex(p1);
        }
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   DsgPrs_EllipseRadiusPresentation::Add(aPresentation, aDrawer, theval, aText,
                                         aPosition, anEndOfArrow, aCenter, IsMaxRadius, ArrowPrs);
index b255d3ba029d44682ae9be39390036bc7ba36f39..c6a7281a60a4b15b8a9fa60b87ff1e04bc4cc05b 100644 (file)
@@ -32,7 +32,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <TCollection_ExtendedString.hxx>
 
@@ -48,7 +47,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
                                            const Handle( Geom_Plane )& Plane )
 {
   Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
+  aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   // Line between two middles
   gp_Pnt Middle12( (Point1.XYZ() + Point2.XYZ()) * 0.5 ), Middle34( (Point3.XYZ() + Point4.XYZ()) * 0.5 );
@@ -56,7 +55,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(Middle12);
   aPrims->AddVertex(Middle34);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Add presentation of arrows (points)
   gp_Dir aDir( 0, 0, 1 );
@@ -112,7 +111,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   TCollection_ExtendedString aText("==");
 
   //Draw the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),LA->TextAspect(), aText, aTextPos);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(),LA->TextAspect(), aText, aTextPos);
 }
 
 
@@ -132,7 +131,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
                                                    gp_Pnt& aProj2) 
 {
   const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   gp_Lin L1 (aPoint1,aDirection);
   gp_Lin L2 (aPoint2,aDirection);
@@ -144,7 +143,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   aPrims->AddVertex(aProj1);
   aPrims->AddVertex(aProj2);
   aPrims->AddVertex(aPoint2);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   //add arrows presentation
   gp_Dir aDir(aProj2.XYZ() - aProj1.XYZ());
@@ -170,7 +169,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
                                                              const DsgPrs_ArrowSide anArrowSide) 
 {
   const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Standard_Real aPar11, aPar12, aPar21, aPar22;
   if(aCirc1.Radius() > Precision::Confusion()){
@@ -193,7 +192,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(aPoint2);
   aPrims->AddVertex(aPoint4);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   Standard_Integer i, aNodeNb;
   Standard_Real aDelta, aCurPar;
@@ -208,7 +207,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
     for (i = 1; i<= aNodeNb; aCurPar += aDelta, i++)
       aPrims->AddVertex(ElCLib::Value( aCurPar, aCirc1));
     aPrims->AddVertex(aPoint2);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   if (aPar22 < aPar21) aPar22 += 2.*M_PI;
   if ( Abs(aPar22 - aPar21) > Precision::Confusion())
@@ -221,7 +220,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
     for (i = 1; i<= aNodeNb; aCurPar += aDelta, i++)
       aPrims->AddVertex(ElCLib::Value( aCurPar, aCirc2));
     aPrims->AddVertex(aPoint4);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 
   //get the direction of interval
index b3349ea347ae07d22d58b609ede2651ed0a498b6..2d1e9825beafc0662709d8b7b06df98eef36a137 100644 (file)
@@ -29,7 +29,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <TCollection_ExtendedString.hxx>
 
@@ -42,14 +41,14 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
                                          const Handle( Geom_Plane )& Plane )
 {
   Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
+  aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(4);
   aPrims->AddVertex(FirstPoint);
   aPrims->AddVertex(FirstCenter);
   aPrims->AddVertex(SecondCenter);
   aPrims->AddVertex(SecondPoint);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Add presentation of arrows
   gp_Dir FirstDir = gce_MakeDir( FirstCenter, FirstPoint ), SecondDir = gce_MakeDir( SecondCenter, SecondPoint );
@@ -91,6 +90,6 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
   }
   
   //Draw the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aTextPos);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aTextPos);
 //ota === end ===     
 }
index 6c4ffe263d0e83bb7921a55726e920f97f318168..19c260c761f04a9396a32c13cb09a8b286e694db 100644 (file)
@@ -71,7 +71,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
   gp_Circ FilletCirc;
   //  gp_Pnt NewPosition, EndOfArrow;
   Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
+  aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   Standard_Real ArrowLength = LA->ArrowAspect()->Length();
   DsgPrs::ComputeFilletRadiusPresentation( ArrowLength,
@@ -101,7 +101,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
     Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
     for (Standard_Integer i = 0 ; i < NodeNumber; i++, FirstParCirc += delta)
          aPrims->AddVertex(ElCLib::Value( FirstParCirc, FilletCirc ));
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
     HasCircle = Standard_True;
     Handle(Geom_Circle) Circle = new Geom_Circle( FilletCirc );
@@ -116,10 +116,10 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(DrawPosition);
   aPrims->AddVertex(EndOfArrow);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Drawing the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, DrawPosition);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, DrawPosition);
    
   // Add presentation of arrows
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow, EndOfArrow, DirOfArrow, DirOfArrow, ArrowPrs );
index 32f717ff75d7fa96841619553e49ed9b18e252b5..faaf7dd2d6bfa101be960ca99f35bb51f4bfd0cb 100644 (file)
@@ -28,7 +28,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 
 //=======================================================================
 //function : Add
@@ -43,7 +42,7 @@ void DsgPrs_FixPresentation::Add(
                       const Standard_Real symbsize)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(10);
 
@@ -90,14 +89,14 @@ void DsgPrs_FixPresentation::Add(
   aPrims->AddVertex(PF);
   aPrims->AddVertex(PL);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
   Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
   Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
   anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+  aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 }
index 9c197a6c7be81faafcd1810f9ce356672047fe51..a71850ce0afc74f7117d8bf9c1c2d26bbb39370c 100644 (file)
@@ -43,24 +43,24 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
                                      const gp_Pnt& aPntOffset)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(aPntAttach);
   aPrims->AddVertex(aPntOffset);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
   Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
   Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
   anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+  aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 
   // texte 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
 }
 
 
@@ -72,7 +72,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
                                      const gp_Pnt& aPntOffset)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(4);
 
@@ -93,10 +93,10 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
   else
     aPrims->AddVertex(aSAttach);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
 }
 
 
@@ -110,7 +110,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& aPntOffset)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Ax2 ax = theAxe;
   ax.SetLocation(aCenter);
@@ -141,10 +141,10 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),CC));
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
 }
 
 // jfa 16/10/2000
@@ -159,7 +159,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& aPntOnCirc)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Ax2 ax = theAxe;
   ax.SetLocation(aCenter);
@@ -190,10 +190,10 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),CC));
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
 }
 // jfa 16/10/2000 end
 
@@ -208,7 +208,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& aPntOnElli)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Standard_Real pFAttach =  ElCLib::Parameter(anEllipse, aFAttach);
   Standard_Real pSAttach =  ElCLib::Parameter(anEllipse, aSAttach);
@@ -235,9 +235,9 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),anEllipse));
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
 }
 // jfa 10/10/2000 end
index 6518940d2a79d99ae25b2725e6a2048cd3aa4330..933e8ba0c551f294b854d930abc3cfb1b0a01519 100644 (file)
@@ -34,7 +34,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -48,7 +47,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& OffsetPoint)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Lin L1 (AttachmentPoint1,aDirection);
   gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -91,20 +90,20 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     arrdir.Reverse();
 
   // arrow 1 : 2nd group
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   // arrow 2 : 3rd group
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
-  Prs3d_Root::NewGroup(aPresentation);
+  aPresentation->NewGroup();
   
   // text : 4th group
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
   
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   // processing of call 1 : 5th group
   aPrims->AddVertex(AttachmentPoint1);
@@ -114,7 +113,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 //==================================================================================
@@ -133,7 +132,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
                                     const DsgPrs_ArrowSide ArrowPrs ) 
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Pnt EndOfArrow1, EndOfArrow2;
   gp_Dir DirOfArrow1;
@@ -175,7 +174,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow1, EndOfArrow2, DirOfArrow1, DirOfArrow1.Reversed(), ArrowPrs );
  
   // Drawing the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
 
   // Line from AttachmentPoint1 to end of Arrow1
   aPrims->AddVertex(AttachmentPoint1);
@@ -185,7 +184,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(EndOfArrow2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 
@@ -204,7 +203,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
                                     const DsgPrs_ArrowSide ArrowPrs) 
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Lin L1 (AttachmentPoint1,aDirection);
   gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -255,10 +254,10 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // text 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
 
   // symbols at the extremities of the face
   DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);
@@ -281,7 +280,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
                                     const DsgPrs_ArrowSide ArrowPrs ) 
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Pnt EndOfArrow2;
   gp_Dir DirOfArrow1;
@@ -320,13 +319,13 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(FirstPoint);
   aPrims->AddVertex(LastPoint);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Add presentation of arrows
   DsgPrs::ComputeSymbol( aPresentation, LA, AttachmentPoint1, EndOfArrow2, DirOfArrow1, DirOfArrow1.Reversed(), ArrowPrs );
  
   // Drawing the text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
  
   // Two curves from end of Arrow2 to AttachmentPoint2
   Standard_Real Alpha, delta;
@@ -340,7 +339,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
     aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
     for (Standard_Integer i = 1; i <= NodeNumber; i++, FirstU += delta)
       aPrims->AddVertex(VCurve->Value( FirstU ));
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   Alpha  = Abs( deltaV );
   if (Alpha > Precision::Angular() && Alpha<Precision::Infinite())
@@ -350,7 +349,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
     aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
     for (Standard_Integer i = 1; i <= NodeNumber; i++, FirstV += delta)
       aPrims->AddVertex(UCurve->Value( FirstV ));
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
 
@@ -369,27 +368,27 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPrs,
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(Pt1);
   aPrims->AddVertex(Pt2);
-  Prs3d_Root::CurrentGroup(aPrs)->AddPrimitiveArray(aPrims);
+  aPrs->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   gp_Vec V ;
   switch(ArrowPrs)
   {
     case DsgPrs_AS_LASTAR:
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(gp_Vec(Pt1,Pt2)), 
+    Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt2, gp_Dir(gp_Vec(Pt1,Pt2)), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
     case DsgPrs_AS_FIRSTAR:
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(gp_Vec(Pt2,Pt1)), 
+    Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt1, gp_Dir(gp_Vec(Pt2,Pt1)), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
     case DsgPrs_AS_BOTHAR:
     V = gp_Vec(Pt1,Pt2);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(V), 
+    Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt2, gp_Dir(V), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(V.Reversed()), 
+    Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt1, gp_Dir(V.Reversed()), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
index e4a037c3672757413a521ea726d5e8fd5b16458f..cd98ec06105a3ddae520de263d3389fed41f37c1 100644 (file)
@@ -32,7 +32,6 @@
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <TCollection_ExtendedString.hxx>
 
@@ -59,8 +58,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   if ( first )
   {
     // center of the symmetry - circle around the MidPoint
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     const Standard_Real alpha = 2. * M_PI;
     const Standard_Integer nbp = 100;
@@ -76,26 +75,26 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
     aPrims->AddVertex(Position); // text position
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
     // texte 
     TCollection_ExtendedString aText(" (+)");
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
   {
     if ( !first )
     {
-      Prs3d_Root::NewGroup(aPresentation);
-      Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+      aPresentation->NewGroup();
+      aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
     }
 
     // segment from mid point to the geometry
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
     aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
     aPrims->AddVertex(AttachPoint); // attach point to the geometry
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
   
@@ -123,13 +122,13 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   gp_Circ aCircleM (ax,rad);
 
   // segment on line
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(Point1);
   aPrims->AddVertex(Point2);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   if ( first )
   {
@@ -148,11 +147,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
     aPrims->AddVertex(Position); // text position
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
     // texte
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -161,7 +160,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims = new Graphic3d_ArrayOfSegments(2);
     aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM));
     aPrims->AddVertex(AttachPoint); // attach point to the geometry
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
   
@@ -189,8 +188,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   gp_Circ aCircleM (ax,rad);
 
   // segment on circle
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   const Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
   const Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
@@ -203,7 +202,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
   for (Standard_Integer i = 1; i <= nbp; i++)
     aPrims->AddVertex(ElCLib::Value(pf + dteta*(i-1),aCircle));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   if ( first )
   {
@@ -222,11 +221,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
     aPrims->AddVertex(Position); // text position
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
     // texte 
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -235,7 +234,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims = new Graphic3d_ArrayOfSegments(2);
     aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
     aPrims->AddVertex(AttachPoint); // attach point to the geometry
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
   
@@ -265,8 +264,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   gp_Circ aCircleM (ax,rad);
 
   // segment on ellipse
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   const Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
   const Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
@@ -279,7 +278,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
   for (Standard_Integer i = 1; i <= nbp; i++)
     aPrims->AddVertex(ElCLib::Value(pf + dteta*(i-1),aCircle));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   if ( first )
   {
@@ -298,11 +297,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
        aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
     aPrims->AddVertex(Position); // text position
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
     // texte 
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -311,6 +310,6 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
     aPrims = new Graphic3d_ArrayOfSegments(2);
     aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
     aPrims->AddVertex(AttachPoint); // attach point to the geometry
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 }
index 2cf70834f027cd66ed67374149d5b2b4549306b5..22a8c2cd264ba434cc3e3595a6e5f253b96e1633 100644 (file)
@@ -46,7 +46,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& OffsetPoint)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Lin L1 (AttachmentPoint1,aDirection);
   gp_Lin L2 (AttachmentPoint2,aDirection2);
@@ -93,13 +93,13 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(PointMin);
   aPrims->AddVertex(PointMax);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   if (DimNulle)
   {
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), offp, L4.Direction(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), offp, L4.Direction().Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), offp, L4.Direction(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), offp, L4.Direction().Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   }
   else
   {
@@ -110,27 +110,27 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
       arrdir.Reverse();
 
     // fleche 1 : 2eme groupe
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
     
     // ball 1 : 3eme groupe
     Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
     Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
+    aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
     Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
     anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 
-    Prs3d_Root::NewGroup(aPresentation);
+    aPresentation->NewGroup();
 
     // texte : 4eme groupe
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
+    Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
   }
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   // trait de rappel 1 : 5eme groupe
   aPrims->AddVertex(AttachmentPoint1);
@@ -140,7 +140,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPresentation,
@@ -165,47 +165,47 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
 
   Handle(Graphic3d_AspectLine3d) AxeAsp = new Graphic3d_AspectLine3d (acolor, atype, awidth);
   AxeAsp->SetType( Aspect_TOL_DOTDASH);
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(AxeAsp);
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(AxeAsp);
 
   // trait d'axe : 1er groupe
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(AttachmentPoint1);
   aPrims->AddVertex(Proj1);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Root::NewGroup(aPresentation);
+  aPresentation->NewGroup();
 
   Handle(Graphic3d_AspectLine3d) Axe2Asp = new Graphic3d_AspectLine3d (acolor, atype, awidth);
   Axe2Asp->SetType  ( Aspect_TOL_DOTDASH);
   Axe2Asp->SetWidth ( 4.);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(Axe2Asp);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(Axe2Asp);
 
   // trait d'axe: 2eme groupe
   aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // anneau : 3eme et 4eme groupes
   Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
   anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
 
-  Prs3d_Root::NewGroup(aPresentation);
+  aPresentation->NewGroup();
   Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
   MarkerAsp->SetType(Aspect_TOM_O);
   MarkerAsp->SetScale(4.);
   //MarkerAsp->SetColor(Quantity_Color(Quantity_NOC_RED));
   MarkerAsp->SetColor(acolor);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(MarkerAsp);
+  aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 
-  Prs3d_Root::NewGroup(aPresentation);
+  aPresentation->NewGroup();
   Handle(Graphic3d_AspectMarker3d) Marker2Asp = new Graphic3d_AspectMarker3d();
   Marker2Asp->SetType(Aspect_TOM_O);
   Marker2Asp->SetScale(2.);
   //Marker2Asp->SetColor(Quantity_Color(Quantity_NOC_GREEN));
   Marker2Asp->SetColor(acolor);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(Marker2Asp);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(Marker2Asp);
+  aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 }
index c391aa068b1c14d52532e6da71cb1eb85a868e77..83e3b3c7ae494d7d7892e8e041a9c358bf9030ab 100644 (file)
@@ -43,7 +43,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
                                    const gp_Pnt& OffsetPoint)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   gp_Lin L1 (AttachmentPoint1,aDirection);
   gp_Lin L2 (AttachmentPoint2,aDirection);
   gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
@@ -77,8 +77,8 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPrims->AddVertex(PointMin);
   aPrims->AddVertex(PointMax);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
     outside = Standard_True;
@@ -87,20 +87,20 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     arrdir.Reverse();
 
   // arrow 1 : 2nd group
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   // arrow 2 : 3rd group
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
-  Prs3d_Root::NewGroup(aPresentation);
+  aPresentation->NewGroup();
   
   // text : 4th group
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   // processing of call 1 : 5th group
   aPrims->AddVertex(AttachmentPoint1);
@@ -110,7 +110,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 
@@ -128,7 +128,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
                                    const DsgPrs_ArrowSide ArrowPrs)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Lin L1 (AttachmentPoint1,aDirection);
   gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -177,10 +177,10 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(Proj2);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // text 
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
   
   //arrows
   DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);
index 156ea7b1732faf90bd03aa25dda492c4ec99e7cf..be1028ff2d0135d1794601a6a6dc06e28cff68bf 100644 (file)
@@ -50,7 +50,7 @@ void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   LA->LineAspect()->SetTypeOfLine(Aspect_TOL_SOLID); // ou DOT ou DOTDASH
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   // segments
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(6,2);
@@ -75,26 +75,26 @@ void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   aPrims->AddVertex(p_symb);
   aPrims->AddVertex(pAx22);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // points attache
   if (intOut1 || intOut2)
   {
     LA->LineAspect()->SetTypeOfLine(Aspect_TOL_DOT); // ou DOT ou DOTDASH
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     if (intOut1) {
       aPrims = new Graphic3d_ArrayOfSegments(2);
       aPrims->AddVertex(pAx1);
       aPrims->AddVertex(pnt1);
-      Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+      aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
     }
     if (intOut2) {
       aPrims = new Graphic3d_ArrayOfSegments(2);
       aPrims->AddVertex(pAx2);
       aPrims->AddVertex(pnt2);
-      Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+      aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
     }
   }
 }
index 48dd7cb8919f61026a70986b9bcde95b0f4bda65..b16d0da39cc5bf6f8c0bfb510a608ceb6bcd9cc4 100644 (file)
@@ -70,7 +70,7 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     lpara -= 2.*M_PI;
   }
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Standard_Real parat = ElCLib::Parameter(aCircle,AttachmentPoint);
   gp_Pnt attpoint = AttachmentPoint;
@@ -114,17 +114,17 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(firstpoint);
   aPrims->AddVertex(drawtopoint);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   gp_Dir arrdir = L.Direction();
   if (reverseArrow)
     arrdir.Reverse();
 
   // fleche
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptoncirc, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptoncirc, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   // texte
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, attpoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, attpoint);
 }
 
 //=======================================================================
@@ -144,7 +144,7 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
                                     const Standard_Boolean reverseArrow)
 {
   Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
+  aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   gp_Pnt LineOrigin, LineEnd;
   DsgPrs::ComputeRadiusLine(Center, EndOfArrow, AttachmentPoint, drawFromCenter, LineOrigin, LineEnd);
@@ -152,10 +152,10 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(LineOrigin);
   aPrims->AddVertex(LineEnd);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // text
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, AttachmentPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, AttachmentPoint);
 
   gp_Dir ArrowDir = gce_MakeDir( LineOrigin , LineEnd );
   if (reverseArrow)
index e71fbe74f072770cd4a5bf3641123418ca549d71..73c89714599468673f67bfb5edfcc3902175f599 100644 (file)
@@ -22,7 +22,6 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_PlaneAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 
 //=======================================================================
@@ -35,14 +34,14 @@ void DsgPrs_ShadedPlanePresentation::Add(const Handle(Prs3d_Presentation)& aPres
                                         const gp_Pnt& aPt2,
                                         const gp_Pnt& aPt3)
 {
-  Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
-  TheGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
-  TheGroup->SetPrimitivesAspect(aDrawer->ShadingAspect()->Aspect());
+  Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
+  aGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
+  aGroup->SetPrimitivesAspect(aDrawer->ShadingAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfPolygons) aPrims = new Graphic3d_ArrayOfPolygons(4);
   aPrims->AddVertex(aPt1);
   aPrims->AddVertex(aPt2);
   aPrims->AddVertex(aPt3);
   aPrims->AddVertex(aPt1);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aGroup->AddPrimitiveArray(aPrims);
 }
index b86ed2cb4827dd8287755fa3dbc91fd3a5d7ea6a..2e8988ba1f7d1cf7c62f0dee4eab0348cb206d76 100644 (file)
@@ -249,12 +249,12 @@ void DsgPrs_ShapeDirPresentation::Add(const Handle(Prs3d_Presentation)& prs,
 
   gp_Pnt pt2(pt.XYZ()+leng*dir.XYZ());
 
-  Prs3d_Root::CurrentGroup(prs)->SetPrimitivesAspect(drawer->LineAspect()->Aspect());
+  prs->CurrentGroup()->SetPrimitivesAspect(drawer->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(pt);
   aPrims->AddVertex(pt2);
-  Prs3d_Root::CurrentGroup(prs)->AddPrimitiveArray(aPrims);
+  prs->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (prs), pt2, dir, M_PI/180.*10., leng*0.3);
+  Prs3d_Arrow::Draw (prs->CurrentGroup(), pt2, dir, M_PI/180.*10., leng*0.3);
 }
index 98cb2e5fc542a3075274774c07639ad5eb816312..39b42cc6bb42ba41cfb5b2219042ecccda4d38c3 100644 (file)
@@ -37,7 +37,7 @@ void DsgPrs_SymbPresentation::Add (const Handle(Prs3d_Presentation)& aPresentati
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   Handle(Prs3d_TextAspect) TA = LA->TextAspect();
   TA->SetColor(Quantity_NOC_GREEN);
-  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), TA, aText, OffsetPoint);
+  Prs3d_Text::Draw (aPresentation->CurrentGroup(), TA, aText, OffsetPoint);
   
   // 2eme groupe : marker
   Handle(Geom_CartesianPoint) theP = new Geom_CartesianPoint(OffsetPoint);
index f3891557eee404dab9acdc332aa9b459b52e7444..8772f9bc41b143ae9286cc58f6fd6a531726076f 100644 (file)
@@ -59,7 +59,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
                                        const gp_Pnt& OffsetPoint)
 { 
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Pnt ProjOffsetPoint = ElCLib::Value(ElCLib::Parameter(aAxis,OffsetPoint),aAxis);
   gp_Pnt PjAttachPnt1    = ElCLib::Value(ElCLib::Parameter(aAxis,AttachmentPoint1),aAxis);
@@ -158,8 +158,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   if(aAxis.Distance(P1) > D1*(1 + coeff) && !Cross){
 
     //==== PROCESSING OF FACE ===========
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Pj_P1 = ElCLib::Value(ElCLib::Parameter(aAxis,P1),aAxis);
     gp_Vec Vp(Pj_P1,P1);
@@ -222,7 +222,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(Sym_pint);
     aPrims->AddVertex(P2);
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 
   /*===================================
@@ -236,8 +236,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   else if (aAxis.Distance(P1) < D1*(1 - coeff) || Cross) {
 
     //------ PROCESSING OF FACE ------------
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Pj_P1 = ElCLib::Value(ElCLib::Parameter(aAxis,P1),aAxis);
     gp_Vec VpInf(Pj_P1,P1);
@@ -301,13 +301,13 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(Sym_pint);
     aPrims->AddVertex(P2);
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   else {
     
     //==== PROCESSING OF FACE ===========
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(6);
 
@@ -322,21 +322,21 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(AttachmentPoint2);
     aPrims->AddVertex(P2);
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+       aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
 
   //==== ARROWS ================
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
   gp_Dir arrdir = L3.Direction().Reversed();
   if (outside) arrdir.Reverse();
   // arrow 1 ----
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
   // arrow 2 ----
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   //-------------------------------------------------------------------------------------
   //|                                SYMBOL OF SYMMETRY                                 |
@@ -371,8 +371,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   //Calculate the extremities of the symbol axis
   gp_Vec vecAxe = vecA.Multiplied(.7);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(13,5);
 
@@ -426,7 +426,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   aPrims->AddVertex(pm.Translated(vsym));
   aPrims->AddVertex(pm.Translated(vsym.Reversed()));
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
   
 //===================================================================
@@ -442,7 +442,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
                                        const gp_Pnt&  OffsetPoint)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());  
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());  
 
   gp_Pnt OffsetPnt(OffsetPoint.X(),OffsetPoint.Y(),OffsetPoint.Z());
   gp_Pnt Center1 = aCircle1.Location();
@@ -491,7 +491,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(PointMin);
   aPrims->AddVertex(PointMax);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   //==== PROCESSING OF CALL 1 =====
   Standard_Integer nbp = 10;
@@ -530,7 +530,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   Standard_Integer i;
   for(i = 2; i <= nbp; i++, alphaIter += Dalpha)
     aPrims->AddVertex(ElCLib::Value(ParamPAttach1 + alphaIter,aCircle1));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   
   //==== PROCESSING OF CALL 2 =====
   gp_Pnt Center2 = ProjCenter1.Translated(Vp.Reversed());
@@ -570,20 +570,20 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   alphaIter = Dalpha;
   for(i = 2; i <= nbp; i++, alphaIter += Dalpha)
     aPrims->AddVertex(ElCLib::Value(ParamPAttach2 + alphaIter,aCircle2));
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   //==== ARROWS ================
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
   gp_Dir arrdir = L3.Direction().Reversed();
   if (outside) arrdir.Reverse();
   // arrow 1 ----
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
   // arrow 2 ----
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   //-------------------------------------------------------------------------------------
   //|                                SYMBOL OF SYMMETRY                                 |
@@ -609,8 +609,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   //Calculation of extremas of the axis of the symbol
   gp_Vec vecAxe = vecA.Multiplied(.7);
 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   aPrims = new Graphic3d_ArrayOfPolylines(13,5);
 
@@ -665,7 +665,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   aPrims->AddVertex(pm.Translated(vsym));
   aPrims->AddVertex(pm.Translated(vsym.Reversed()));
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 //===================================================================
@@ -680,7 +680,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
                                        const gp_Pnt&  OffsetPoint)
 {
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());  
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());  
 
   if (AttachmentPoint1.IsEqual(AttachmentPoint2,Precision::Confusion()))
   {
@@ -690,15 +690,15 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     //Marker of localisation of the face
     Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
     Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
+    aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
     Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
     anArrayOfPoints->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
 
 
     //Trace of the linking segment 
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(8);
 
@@ -737,7 +737,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(sgP21);
     aPrims->AddVertex(sgP22);
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
   }
   //==============================================================
   //  OTHER CASES                                                 :
@@ -773,8 +773,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     gp_Pnt PointMax = ElCLib::Value(parmax,L3);
 
     //==== PROCESSING OF FACE ===========
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(6);
 
@@ -789,36 +789,36 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(AttachmentPoint2);
     aPrims->AddVertex(P2);
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
  
     //==== ARROWS ================
     if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
     gp_Dir arrdir = L3.Direction().Reversed();
     if (outside) arrdir.Reverse();
     // arrow 1 ----
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
     // arrow 2 ----
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
     
     //==== POINTS ================
     //Marker of localization of attachment points:
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
     Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
     Handle(Graphic3d_AspectMarker3d) aMarkerAspAtt = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
+    aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAspAtt);
     Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
     anArrayOfPoints1->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints1);
 
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAspAtt);
     Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
     anArrayOfPoints2->AddVertex (AttachmentPoint2.X(), AttachmentPoint2.Y(), AttachmentPoint2.Z());
-    Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
+    aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints2);
       
     //-------------------------------------------------------------------------------------
     //|                                SYMBOL OF SYMMETRY                                 |
@@ -842,8 +842,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     //Calculate the extremas of the axis of the symbol
     gp_Vec vecAxe = vecA.Multiplied(.7);
 
-    Prs3d_Root::NewGroup(aPresentation);
-    Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+    aPresentation->NewGroup();
+    aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
        aPrims = new Graphic3d_ArrayOfPolylines(13,5);
 
@@ -898,6 +898,6 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     aPrims->AddVertex(pm.Translated(vsym));
     aPrims->AddVertex(pm.Translated(vsym.Reversed()));
 
-       Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
-  } 
+    aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
+  }
 }
index 417c9ec9fd67bcffaea00ab4d18d31b93bdde79d..c3d6bbad6ff31d8d5c3a2b3d282a842fbc1bb1ee 100644 (file)
@@ -52,20 +52,20 @@ void DsgPrs_TangentPresentation::Add (const Handle(Prs3d_Presentation)& aPresent
   ARR2->SetLength(length/5);
 
   // Array1OfVertex
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
   aPrims->AddVertex(p1);
   aPrims->AddVertex(p2);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // fleche 1 : 
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, aDirection, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, aDirection, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   // fleche 2
-  Prs3d_Root::NewGroup(aPresentation);
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p2, aDirection.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  aPresentation->NewGroup();
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p2, aDirection.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 }
index f17f840d11577651427b7cf7e109e5a23fcc3e07..fd0b03c9ff8c0775d2391b785fda69eea53e7975 100644 (file)
@@ -25,7 +25,6 @@
 #include <Prs3d_ArrowAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_TextAspect.hxx>
 
 //=======================================================================
@@ -41,7 +40,7 @@ void DsgPrs_XYZAxisPresentation::Add(
                       const gp_Pnt& aPfirst,
                       const gp_Pnt& aPlast)
 {
-  Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPresentation);
+  Handle(Graphic3d_Group) G = aPresentation->CurrentGroup();
   G->SetPrimitivesAspect(aLineAspect->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
@@ -49,14 +48,14 @@ void DsgPrs_XYZAxisPresentation::Add(
   aPrims->AddVertex(aPlast);
   G->AddPrimitiveArray(aPrims);
  
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast,aDir, M_PI/180.*10., aVal/10.);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPlast,aDir, M_PI/180.*10., aVal/10.);
 
   if (*theText != '\0')
   {
     Handle(Graphic3d_Text) aText = new Graphic3d_Text (1.0f/81.0f);
     aText->SetText (theText);
     aText->SetPosition (aPlast);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddText (aText);
+    aPresentation->CurrentGroup()->AddText (aText);
   }
 }
 
@@ -71,7 +70,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
                                     const gp_Pnt& aPfirst,
                                     const gp_Pnt& aPlast)
 {
-  Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPresentation);
+  Handle(Graphic3d_Group) G = aPresentation->CurrentGroup();
   G->SetPrimitivesAspect(aLineAspect->Aspect());
 
   Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
@@ -80,7 +79,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   G->AddPrimitiveArray(aPrims);
 
   G->SetPrimitivesAspect( anArrowAspect->Aspect() );
-  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast, aDir, anArrowAspect->Angle(), aVal/10.);
+  Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPlast, aDir, anArrowAspect->Angle(), aVal/10.);
 
   G->SetPrimitivesAspect(aTextAspect->Aspect());
 
@@ -89,6 +88,6 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
     Handle(Graphic3d_Text) aText = new Graphic3d_Text (1.0f/81.0f);
     aText->SetText (theText);
     aText->SetPosition (aPlast);
-    Prs3d_Root::CurrentGroup(aPresentation)->AddText(aText);
+    aPresentation->CurrentGroup()->AddText(aText);
   }
 }
index bb6f82a6af6a3657097547ec3f0f0bd96dd97076..74f48370c46a70c164a2622f6109bb79e0d1c1d2 100644 (file)
@@ -22,7 +22,6 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_PlaneAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 
 //=======================================================================
 //function : Add
@@ -35,7 +34,7 @@ void DsgPrs_XYZPlanePresentation::Add(
                       const gp_Pnt& aPt2,
                       const gp_Pnt& aPt3)
 {
-  Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+  Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
   TheGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
 
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(4);
index 7ceb2696f31912283ae1d37b11afde6fb55a6c6a..5e622d8a087448a097e69ea6e6ee04ddc9f32060 100644 (file)
@@ -38,7 +38,6 @@
 #include <MeshVS_MeshPrsBuilder.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Quantity_Color.hxx>
 #include <Standard_Type.hxx>
@@ -250,14 +249,14 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)&
   Handle(Graphic3d_Group) aGGroup, aGroup2, aLGroup, aSGroup;
   if (!aTwoColorsOfElements.IsEmpty())
   {
-    aGroup2 = Prs3d_Root::NewGroup (Prs);
+    aGroup2 = Prs->NewGroup();
   }
   if (!aColorsOfElements.IsEmpty())
   {
     Handle(Graphic3d_AspectFillArea3d) aGroupFillAspect = new Graphic3d_AspectFillArea3d (Aspect_IS_SOLID, anInteriorColor, anEdgeColor,
                                                                                           anEdgeType, anEdgeWidth, aMaterial[0], aMaterial[1]);
-    aGGroup = Prs3d_Root::NewGroup (Prs);
-    aLGroup = Prs3d_Root::NewGroup (Prs);
+    aGGroup = Prs->NewGroup();
+    aLGroup = Prs->NewGroup();
     aGGroup->SetClosed (toSupressBackFaces == Standard_True);
     aGGroup->SetGroupPrimitivesAspect (aGroupFillAspect);
   }
@@ -265,7 +264,7 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)&
   if (anEdgeOn)
   {
     Handle(Graphic3d_AspectLine3d) anEdgeAspect = new Graphic3d_AspectLine3d (anEdgeColor, anEdgeType, anEdgeWidth);
-    aSGroup = Prs3d_Root::NewGroup (Prs);
+    aSGroup = Prs->NewGroup();
     aSGroup->SetGroupPrimitivesAspect (anEdgeAspect);
   }
 
index e1cf1692819806f65395f031948ea31f47750c7d..51a50391583c85d545d05bffa786f894a51e9418 100644 (file)
@@ -42,7 +42,6 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 #include <Select3D_SensitiveBox.hxx>
index b3fad6fca5ad388129e1f0dc2c24702fab40b33b..092bb0b4d43330bf4b853f5d069b4a903e7bc6c1 100644 (file)
@@ -17,7 +17,6 @@
 #include <Graphic3d_Group.hxx>
 #include <MeshVS_Mesh.hxx>
 #include <MeshVS_MeshEntityOwner.hxx>
-#include <Prs3d_Root.hxx>
 #include <PrsMgr_PresentationManager.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 #include <SelectMgr_SelectableObject.hxx>
index 7f7d01a5c507667291d919a768f348b2af4f9010..22ebe1ed2b6f023ebedba6cb669072e94c5f47bf 100644 (file)
@@ -39,7 +39,6 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Quantity_NameOfColor.hxx>
 #include <Select3D_SensitivePoint.hxx>
@@ -158,8 +157,7 @@ void MeshVS_MeshPrsBuilder::BuildNodes ( const Handle(Prs3d_Presentation)& Prs,
 
   if ( k>0 )
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle (Graphic3d_Group) aNodeGroup = Prs3d_Root::CurrentGroup ( Prs );
+    Handle (Graphic3d_Group) aNodeGroup = Prs->NewGroup();
     aNodeGroup->SetPrimitivesAspect ( aNodeMark );
     aNodeGroup->AddPrimitiveArray (aNodePoints);
   }
@@ -551,8 +549,7 @@ void MeshVS_MeshPrsBuilder::BuildHilightPrs ( const Handle(Prs3d_Presentation)&
   if ( !aSource->GetGeom ( ID, IsElement, aCoords, NbNodes, aType ) )
     return;
 
-  Prs3d_Root::NewGroup ( Prs );
-  Handle (Graphic3d_Group) aHilightGroup = Prs3d_Root::CurrentGroup ( Prs );
+  Handle (Graphic3d_Group) aHilightGroup = Prs->NewGroup();
 
   switch ( aType )
   {
@@ -1065,8 +1062,7 @@ void MeshVS_MeshPrsBuilder::DrawArrays( const Handle(Prs3d_Presentation)& Prs,
 
   if ( IsPolygons && theFillAsp->FrontMaterial().Transparency()<0.01 )
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup ( Prs );
+    Handle (Graphic3d_Group) aGroup = Prs->NewGroup();
     aGroup->SetClosed (isSupressBackFaces == Standard_True);
     Handle(Graphic3d_AspectFillArea3d) aFillAsp = new Graphic3d_AspectFillArea3d (*theFillAsp);
     //if ( IsPolygonsEdgesOff )
@@ -1094,8 +1090,7 @@ void MeshVS_MeshPrsBuilder::DrawArrays( const Handle(Prs3d_Presentation)& Prs,
 
   if ( IsPolylines && !IsPolygonsEdgesOff )
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle (Graphic3d_Group) aLGroup = Prs3d_Root::CurrentGroup ( Prs );
+    Handle (Graphic3d_Group) aLGroup = Prs->NewGroup();
 
     if ( IsSelected )
       aLGroup->SetPrimitivesAspect ( theLineAsp );
@@ -1110,8 +1105,7 @@ void MeshVS_MeshPrsBuilder::DrawArrays( const Handle(Prs3d_Presentation)& Prs,
 
   if ( IsLinkPolylines )
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle (Graphic3d_Group) aBeamGroup = Prs3d_Root::CurrentGroup ( Prs );
+    Handle (Graphic3d_Group) aBeamGroup = Prs->NewGroup();
     if ( !IsSelected )
       aBeamGroup->SetPrimitivesAspect ( theFillAsp );
     aBeamGroup->SetPrimitivesAspect ( theLineAsp );
@@ -1120,8 +1114,7 @@ void MeshVS_MeshPrsBuilder::DrawArrays( const Handle(Prs3d_Presentation)& Prs,
 
   if ( IsPolygons && theFillAsp->FrontMaterial().Transparency()>=0.01 )
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup ( Prs );
+    Handle (Graphic3d_Group) aGroup = Prs->NewGroup();
     aGroup->SetClosed (isSupressBackFaces == Standard_True);
     Handle(Graphic3d_AspectFillArea3d) aFillAsp = new Graphic3d_AspectFillArea3d (*theFillAsp);
     //if ( IsPolygonsEdgesOff )
index 8856854542223bf73fa28bd9a7bf6f4c592abff0..f20aa4848cb2c5917486f4f0a9a962e0e9fa7974 100644 (file)
@@ -47,7 +47,6 @@
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 #include <Quantity_Array1OfColor.hxx>
@@ -465,7 +464,7 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
   Handle(Graphic3d_AspectLine3d) anLAsp =
     new Graphic3d_AspectLine3d( anEdgeColor, anEdgeType, anEdgeWidth );
 
-  Handle(Graphic3d_Group) aGroup1 = Prs3d_Root::NewGroup (Prs);
+  Handle(Graphic3d_Group) aGroup1 = Prs->NewGroup();
 
   Standard_Boolean toSupressBackFaces = Standard_False;
   aDrawer->GetBoolean (MeshVS_DA_SupressBackFaces, toSupressBackFaces);
@@ -477,8 +476,7 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
 
   if (aShowEdges)
   {
-    Prs3d_Root::NewGroup ( Prs );
-    Handle(Graphic3d_Group) aGroup2 = Prs3d_Root::CurrentGroup ( Prs );
+    Handle(Graphic3d_Group) aGroup2 = Prs->NewGroup();
 
     Handle(Graphic3d_AspectFillArea3d) anAspCopy = new Graphic3d_AspectFillArea3d (*anAsp);
     anAspCopy->SetTextureMapOff();
index 991a8a0732ed61396eb3d6ec09437c899eb06e0b..16f865f3b778afb0eaff8326467fb4019f1b9e5a 100644 (file)
@@ -19,7 +19,6 @@
 #include <MeshVS_Drawer.hxx>
 #include <MeshVS_Mesh.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(MeshVS_PrsBuilder,Standard_Transient)
index 92725ea070353bdfe2bcf4932b346d89132dcdc3..02213e1cfffb83cd958fa63775fd9d87f25235f2 100644 (file)
@@ -29,7 +29,6 @@
 #include <MeshVS_Mesh.hxx>
 #include <MeshVS_TextPrsBuilder.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_TextAspect.hxx>
 #include <Quantity_Color.hxx>
 #include <Standard_Type.hxx>
index a68a322c751a8b1787cc0267a26333dc0422074e..eeba1000c33320131be38587a8dce33a59dc8c6e 100644 (file)
@@ -39,7 +39,6 @@
 #include <MeshVS_VectorPrsBuilder.hxx>
 #include <Precision.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Quantity_Color.hxx>
 #include <Standard_Type.hxx>
 #include <TColgp_Array1OfPnt.hxx>
@@ -319,8 +318,7 @@ void MeshVS_VectorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
       }
   }
 
-  Prs3d_Root::NewGroup ( Prs );
-  Handle (Graphic3d_Group) aVGroup = Prs3d_Root::CurrentGroup ( Prs );
+  Handle (Graphic3d_Group) aVGroup = Prs->NewGroup();
 
   Quantity_Color aColor;
   aDrawer->GetColor ( MeshVS_DA_VectorColor, aColor );
index 06ce991ec2575df64b3a50971d0b67e81aa47d28..3e4e185eaba014f2c5ca7c8707f40c503eeb16e3 100644 (file)
 #ifndef _Prs3d_Arrow_HeaderFile
 #define _Prs3d_Arrow_HeaderFile
 
-#include <Prs3d_Root.hxx>
-
 #include <Graphic3d_ArrayOfTriangles.hxx>
 #include <Graphic3d_ArrayOfSegments.hxx>
+#include <Prs3d_Presentation.hxx>
 
 class gp_Ax1;
 class gp_Pnt;
 class gp_Dir;
 
 //! Provides class methods to draw an arrow at a given location, along a given direction and using a given angle.
-class Prs3d_Arrow : public Prs3d_Root
+class Prs3d_Arrow
 {
 public:
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the representation of the arrow as shaded triangulation.
   //! @param theAxis       axis definition (arrow origin and direction)
@@ -78,7 +78,7 @@ public:
                     const Standard_Real theAngle,
                     const Standard_Real theLength)
   {
-    Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
+    Draw (thePrs->CurrentGroup(), theLocation, theDirection, theAngle, theLength);
   }
 
 };
index c29b38c8bbd8fe6074e42509eba8b08b7408c66a..1476a4688489bd131fa9194bb7b668ea41857895 100644 (file)
@@ -27,7 +27,7 @@ void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
 {
   if (!theBndBox.IsVoid())
   {
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+    Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
     aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
                                                                   Aspect_TOL_DOTDASH,
                                                                   theDrawer->LineAspect()->Aspect()->Width()));
@@ -45,7 +45,7 @@ void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
 {
   if (!theBndBox.IsVoid())
   {
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+    Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
     aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
                                                                   Aspect_TOL_DOTDASH,
                                                                   theDrawer->LineAspect()->Aspect()->Width()));
index 4d2b25bc99c6949ef8a5324abc3f6ac8d4e7e382..1c5ce9ea9ebfc83b305c52d89089e8acc9098f05 100755 (executable)
 #include <Graphic3d_Group.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_PointAspect.hxx>
-#include <Prs3d_Root.hxx>
 
 template <class AnyPoint, class PointTool>
-class Prs3d_Point : Prs3d_Root
+class Prs3d_Point
 {
 public:
   DEFINE_STANDARD_ALLOC
@@ -41,11 +40,11 @@ private:
 
 public:
   Standard_EXPORT static void Add
-                 (const Handle (Prs3d_Presentation)& thePresentation,
+                 (const Handle (Prs3d_Presentation)& thePrs,
                   const AnyPoint& thePoint,
                   const Handle (Prs3d_Drawer)& theDrawer)
   {
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
+    Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
     aGroup->SetPrimitivesAspect(theDrawer->PointAspect()->Aspect());
     DrawPoint(thePoint, aGroup);
   }
index 691c9ae828013f82d6ec28bac18087d62cf0db7b..af834b0cb76de04a92f6f1d02babaa957919157a 100644 (file)
@@ -30,15 +30,13 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  //! Returns the current (last created) group of primititves inside graphic objects in the display.
-  //! A group also contains the attributes whose ranges are limited to the primitives in it.
+  Standard_DEPRECATED("This method is deprecated - Prs3d_Presentation::CurrentGroup() should be called instead")
   static Handle(Graphic3d_Group) CurrentGroup (const Handle(Prs3d_Presentation)& thePrs3d)
   {
     return thePrs3d->CurrentGroup();
   }
 
-  //! Returns the new group of primitives inside graphic objects in the display.
-  //! A group also contains the attributes whose ranges are limited to the primitives in it.
+  Standard_DEPRECATED("This method is deprecated - Prs3d_Presentation::NewGroup() should be called instead")
   static Handle(Graphic3d_Group) NewGroup (const Handle(Prs3d_Presentation)& thePrs3d)
   {
     return thePrs3d->NewGroup();
index ea2f98c886e22e3ed6b8aaa90201dbcde032a342..6a26365d3c7e7ec226417cc454f0b4c556e6e55f 100644 (file)
 #ifndef _Prs3d_Text_HeaderFile
 #define _Prs3d_Text_HeaderFile
 
-#include <Prs3d_Root.hxx>
+#include <gp_Ax2.hxx>
 #include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
 #include <Prs3d_TextAspect.hxx>
 
-#include <gp_Ax2.hxx>
-
 class TCollection_ExtendedString;
 class gp_Pnt;
 
 //! A framework to define the display of texts.
-class Prs3d_Text : public Prs3d_Root
+class Prs3d_Text
 {
 public:
 
@@ -64,7 +63,7 @@ public:
                     const TCollection_ExtendedString& theText,
                     const gp_Pnt& theAttachmentPoint)
   {
-    Draw (Prs3d_Root::CurrentGroup (thePrs), theDrawer->TextAspect(), theText, theAttachmentPoint);
+    Draw (thePrs->CurrentGroup(), theDrawer->TextAspect(), theText, theAttachmentPoint);
   }
 
   //! Alias to another method Draw() for backward compatibility.
@@ -75,7 +74,7 @@ public:
                     const gp_Ax2&                     theOrientation,
                     const Standard_Boolean            theHasOwnAnchor = Standard_True)
   {
-    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theOrientation, theHasOwnAnchor);
+    Draw (thePrs->CurrentGroup(), theAspect, theText, theOrientation, theHasOwnAnchor);
   }
 
   //! Alias to another method Draw() for backward compatibility.
@@ -85,7 +84,7 @@ public:
                     const TCollection_ExtendedString& theText,
                     const gp_Pnt& theAttachmentPoint)
   {
-    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theAttachmentPoint);
+    Draw (thePrs->CurrentGroup(), theAspect, theText, theAttachmentPoint);
   }
 
 };
index 41702f5268e81a4fb23be2ffb7b6bede3988be0c..d3e9c16b51e2fe9e0f55aca56bbb0be259ecbfa7 100644 (file)
@@ -41,7 +41,6 @@
 #include <Graphic3d_ArrayOfPolylines.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
 #include <ProjLib.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 #include <Select3D_SensitiveGroup.hxx>
@@ -433,14 +432,14 @@ void PrsDim_AngleDimension::DrawArc (const Handle(Prs3d_Presentation)& thePresen
   // add display presentation
   if (!myDrawer->DimensionAspect()->IsText3d() && theMode == ComputeMode_All)
   {
-    Prs3d_Root::CurrentGroup (thePresentation)->SetStencilTestOptions (Standard_True);
+    thePresentation->CurrentGroup()->SetStencilTestOptions (Standard_True);
   }
   Handle(Graphic3d_AspectLine3d) aDimensionLineStyle = myDrawer->DimensionAspect()->LineAspect()->Aspect();
-  Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aDimensionLineStyle);
-  Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments);
+  thePresentation->CurrentGroup()->SetPrimitivesAspect (aDimensionLineStyle);
+  thePresentation->CurrentGroup()->AddPrimitiveArray (aPrimSegments);
   if (!myDrawer->DimensionAspect()->IsText3d() && theMode == ComputeMode_All)
   {
-    Prs3d_Root::CurrentGroup (thePresentation)->SetStencilTestOptions (Standard_False);
+    thePresentation->CurrentGroup()->SetStencilTestOptions (Standard_False);
   }
 }
 
@@ -638,7 +637,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
   // Parameters for presentation
   Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
 
-  Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect());
+  thePresentation->CurrentGroup()->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect());
 
   Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length();
 
@@ -696,7 +695,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
   aSecondArrowEnd   = aSecondAttach.Translated (-aSecondArrowVec);
 
   // Group1: stenciling text and the angle dimension arc
-  Prs3d_Root::NewGroup (thePresentation);
+  thePresentation->NewGroup();
 
   Standard_Integer aHPosition = aLabelPosition & LabelPosition_HMask;
 
@@ -778,7 +777,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
   // dimension arc without text
   if ((theMode == ComputeMode_All || theMode == ComputeMode_Line) && aHPosition != LabelPosition_HCenter)
   {
-    Prs3d_Root::NewGroup (thePresentation);
+    thePresentation->NewGroup();
 
     DrawArc (thePresentation,
              (isArrowsExternal || !isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First)) ? aFirstAttach  : aFirstArrowEnd,
@@ -791,7 +790,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
   // arrows and arrow extensions
   if (theMode == ComputeMode_All || theMode == ComputeMode_Line)
   {
-    Prs3d_Root::NewGroup (thePresentation);
+    thePresentation->NewGroup();
 
     if (isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First))
       DrawArrow (thePresentation, aFirstArrowBegin,  gp_Dir (aFirstArrowVec));
@@ -801,7 +800,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
 
   if ((theMode == ComputeMode_All || theMode == ComputeMode_Line) && isArrowsExternal)
   {
-    Prs3d_Root::NewGroup (thePresentation);
+    thePresentation->NewGroup();
 
     if (aHPosition != LabelPosition_Left && isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First))
     {
@@ -831,7 +830,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
   // flyouts
   if (theMode == ComputeMode_All)
   {
-    Prs3d_Root::NewGroup (thePresentation);
+    thePresentation->NewGroup();
 
     Handle(Graphic3d_ArrayOfSegments) aPrimSegments = new Graphic3d_ArrayOfSegments (4);
     aPrimSegments->AddVertex (myCenterPoint);
@@ -840,8 +839,8 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager3d)&
     aPrimSegments->AddVertex (aSecondAttach);
 
     Handle(Graphic3d_AspectLine3d) aFlyoutStyle = myDrawer->DimensionAspect()->LineAspect()->Aspect();
-    Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aFlyoutStyle);
-    Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments);
+    thePresentation->CurrentGroup()->SetPrimitivesAspect (aFlyoutStyle);
+    thePresentation->CurrentGroup()->AddPrimitiveArray (aPrimSegments);
   }
 
   mySelectionGeom.IsComputed = Standard_True;
index 9589d7d0626f96a83ac538fa10306163d2ff509a..42ea09f41783c35f2506553618669920b5a41f98 100644 (file)
@@ -44,7 +44,6 @@
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_Text.hxx>
 #include <SelectMgr_EntityOwner.hxx>
@@ -354,7 +353,7 @@ void PrsDim_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentat
                                   const gp_Pnt& theLocation,
                                   const gp_Dir& theDirection)
 {
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
+  Handle(Graphic3d_Group) aGroup = thePresentation->NewGroup();
 
   Standard_Real aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
   Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
@@ -537,7 +536,7 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati
         aGroup->AddPrimitiveArray (anEdges);
       }
     }
-    Prs3d_Root::CurrentGroup (thePresentation)->SetFlippingOptions (Standard_False, gp_Ax2());
+    thePresentation->CurrentGroup()->SetFlippingOptions (Standard_False, gp_Ax2());
 
     mySelectionGeom.TextPos    = aCenterOfLabel;
     mySelectionGeom.TextDir    = aTextDir;
index 6fdd11282e693a2dc31485afcc84b52c45790147..80ac0b3d144f0c5b8c8649d14bd8f2df3468eeaf 100644 (file)
@@ -5057,14 +5057,14 @@ public:
     aFillAspect->SetInteriorStyle (Aspect_IS_POINT);
 
     // create separate group for frame elements
-    Handle(Graphic3d_Group) aFrameGroup = Prs3d_Root::NewGroup (thePresentation);
+    Handle(Graphic3d_Group) aFrameGroup = thePresentation->NewGroup();
     aFrameGroup->AddPrimitiveArray (aFrame);
     aFrameGroup->SetGroupPrimitivesAspect (aFillAspect);
 
     // create separate group for text elements
-    Handle(Graphic3d_Group) aTextGroup = Prs3d_Root::NewGroup (thePresentation);
+    Handle(Graphic3d_Group) aTextGroup = thePresentation->NewGroup();
     TCollection_ExtendedString aString ("YOU SHOULD SEE THIS TEXT", Standard_True);
-    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation), myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
+    Prs3d_Text::Draw (aTextGroup, myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
   }
 
   virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*theSelection*/,
index 058cb40ab8138d124d27867a47682ef9b913bf58..d1c4f07ed9e30a34fd33b8f1572c40c2252e8f1a 100644 (file)
@@ -219,20 +219,20 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
                         const Handle (Prs3d_Drawer)&       aDrawer,
                         const Standard_Boolean drawCurve)
 {
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
 
   Standard_Real V1, V2;
   FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
 
   const Standard_Integer NbPoints =  aDrawer->Discretisation();
   TColgp_SequenceOfPnt Pnts;
-  DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Pnts,drawCurve);
+  DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Pnts,drawCurve);
 
   if (aDrawer->LineArrowDraw()) {
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Location, gp_Dir(Direction),
                        aDrawer->ArrowAspect()->Angle(),
                        aDrawer->ArrowAspect()->Length());
   }
@@ -253,7 +253,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
   FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
 
   const Standard_Integer NbPoints =  aDrawer->Discretisation();
-  DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Points,drawCurve);
+  DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Points,drawCurve);
 }
 
 //==================================================================
@@ -268,7 +268,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
                         const Standard_Integer             NbPoints,
                         const Standard_Boolean             drawCurve)
 {
-  DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,U1,U2,Points,drawCurve);
+  DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,U1,U2,Points,drawCurve);
 }
 
 //==================================================================
@@ -282,7 +282,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
                         const Handle (Prs3d_Drawer)&       aDrawer,
                         const Standard_Boolean drawCurve)
 {
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
 
   Standard_Real V1 = U1;
   Standard_Real V2 = U2;  
@@ -292,13 +292,13 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
 
   const Standard_Integer NbPoints = aDrawer->Discretisation();
   TColgp_SequenceOfPnt Pnts;
-  DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Pnts,drawCurve);
+  DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Pnts,drawCurve);
     
   if (aDrawer->LineArrowDraw()) {
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Location, gp_Dir(Direction),
                        aDrawer->ArrowAspect()->Angle(),
                        aDrawer->ArrowAspect()->Length());
   }
index 8b4ea4aea72abb64cb2cc50bcd7b9911a60f6234..e54668ffe2bd1d1f22bb1d55a4b8245686c4d42f 100644 (file)
@@ -288,7 +288,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
   Handle(Graphic3d_Group) aGroup;
   if (theToDrawCurve)
   {
-    aGroup = Prs3d_Root::CurrentGroup(aPresentation);
+    aGroup = aPresentation->CurrentGroup();
     aGroup->SetPrimitivesAspect (aDrawer->LineAspect()->Aspect());
   }
 
@@ -332,7 +332,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
   Handle(Graphic3d_Group) aGroup;
   if (theToDrawCurve)
   {
-    aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+    aGroup = aPresentation->CurrentGroup();
     aGroup->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
   }
 
@@ -379,7 +379,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
   Handle(Graphic3d_Group) aGroup;
   if (theToDrawCurve)
   {
-    aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+    aGroup = aPresentation->CurrentGroup();
   }
 
   drawCurve (aCurve, aGroup, aDeflection, anAngle, U1, U2, Points);
@@ -405,7 +405,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
   Handle(Graphic3d_Group) aGroup;
   if (theToDrawCurve)
   {
-    aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+    aGroup = aPresentation->CurrentGroup();
   }
 
   TColgp_SequenceOfPnt Points;
@@ -433,7 +433,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
   Handle(Graphic3d_Group) aGroup;
   if (theToDrawCurve)
   {
-    aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+    aGroup = aPresentation->CurrentGroup();
   }
   drawCurve (aCurve, aGroup, aDeflection, aDrawer->DeviationAngle(), V1, V2, Points);
 }
index 9fc6a82d7c04a7e403bb9f2a2b3f65b8381d57f4..116b34aa02459e8a44149330907313a81b026d79 100644 (file)
@@ -59,7 +59,7 @@ void StdPrs_HLRPolyShape::ComputeHLR (const Handle(Prs3d_Presentation)& aPresent
   aTrsf.SetTransformation (anAx3);
   const HLRAlgo_Projector aProj (aTrsf, !theProjector->IsOrthographic(), theProjector->Scale());
 
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(aPresentation);
+  Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
 
   TopExp_Explorer ex;
 
index 34fa73dcc79c7d5642fae74c712030fe8b8552fb..b00d4288f021d165c765681ed8911a5ab0b72f95 100755 (executable)
@@ -48,7 +48,7 @@ void StdPrs_HLRShape::ComputeHLR (const Handle(Prs3d_Presentation)& thePresentat
   Standard_Real anU1, anU2;
   BRepAdaptor_Curve aCurve;
   Standard_Real aDeviation = theDrawer->MaximalChordialDeviation();
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
+  Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
 
   aGroup->SetPrimitivesAspect(theDrawer->SeenLineAspect()->Aspect());
   
index 4d93e570e4dd4dd2b714e078c3a426a143fa2994..455cb4471f5d773d8e480eed5ac3339a98ff81be 100644 (file)
@@ -36,8 +36,8 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
                         const Adaptor3d_Surface&           aPlane,
                         const Handle (Prs3d_Drawer)&       aDrawer)
 {
-//  Prs3d_Root::NewGroup(aPresentation);    
-  Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+//  aPresentation->NewGroup();
+  Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
   if (aPlane.GetType() != GeomAbs_Plane) return;
   Handle(Geom_Plane) thegeom = new Geom_Plane(aPlane.Plane());
 
@@ -95,7 +95,7 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
     TheGroup->AddPrimitiveArray(aPrims);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
   }
   if (theaspect->DisplayEdgesArrows()) {
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(8);
@@ -104,25 +104,25 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
     //
     thegeom->D0(-Xmax,Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
     //
     thegeom->D0(Xmax,Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
     //
     thegeom->D0(Xmax,-Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
     //
     TheGroup->AddPrimitiveArray(aPrims);
   }
index 9d7116130efff8158988bc1d97a5d2b45b980448..787ef66dd5be18e06f749a33f0d33bd2a27efefa 100644 (file)
@@ -38,7 +38,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
                            const Adaptor3d_Curve&               aCurve,
                            const Handle (Prs3d_Drawer)&       aDrawer) 
 {
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
 
   GeomAbs_CurveType CType = aCurve.GetType();
   if (CType == GeomAbs_BezierCurve || CType == GeomAbs_BSplineCurve) {
@@ -49,7 +49,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
       Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(Nb);
       for (i = 1; i <= Nb; i++)
         aPrims->AddVertex(Bz->Pole(i));
-      Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+      aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
     }
     else if (CType == GeomAbs_BSplineCurve) {
       Handle(Geom_BSplineCurve) Bs = aCurve.BSpline();
@@ -57,7 +57,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
       Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(Nb);
       for (i = 1; i <= Nb; i++)
         aPrims->AddVertex(Bs->Pole(i));
-      Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+      aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
     }
   }
   
@@ -65,7 +65,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+    Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
                       Location,
                       gp_Dir(Direction),
                       aDrawer->ArrowAspect()->Angle(),
index ca30cd58ac851d93c5a495b01576da85356ef37c..bc4cfece0ee855afe7251c300741ad337b56a67e 100644 (file)
@@ -297,7 +297,7 @@ namespace
       return Standard_False;
     }
 
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+    Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
     aGroup->SetClosed (theIsClosed);
     aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
     aGroup->AddPrimitiveArray (aPArray);
index c09daad55ac7d1d877d90ec7515c62a802b5b6be..b8ef0d5a29c60e6fd94baae51b595b21ccb97745 100644 (file)
@@ -42,7 +42,7 @@ void StdPrs_ShadedSurface::Add (const Handle(Prs3d_Presentation)& thePrs,
   N2 = N2 < 3 ? 3 : N2;
 
   // If the surface is closed, the faces from back-side are not traced:
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
   aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
   aGroup->SetClosed (theSurface.IsUClosed() && theSurface.IsVClosed());
 
index c4e83c249117d9910904c17f9fdcf7912fc63d60..15707d55b28d99205c7bc91090a1ed2cb232e599 100644 (file)
@@ -170,9 +170,7 @@ void StdPrs_WFDeflectionSurface::Add (
     // *********************
     //
     if ( !(UClosed && VClosed) ) {
-       
-      (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
-       (aDrawer->FreeBoundaryAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
       if ( !UClosed ) 
        { 
          anIso.Load(GeomAbs_IsoU,U1,V1,V2);
@@ -194,9 +192,7 @@ void StdPrs_WFDeflectionSurface::Add (
     //
     Standard_Integer fin = aDrawer->UIsoAspect()->Number();
     if ( fin != 0) {
-      
-      (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
-       (aDrawer->UIsoAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
       
       Standard_Real du= UClosed ? (U2-U1)/fin : (U2-U1)/(1+fin);
       for (Standard_Integer i=1; i<=fin;i++){
@@ -206,9 +202,7 @@ void StdPrs_WFDeflectionSurface::Add (
     }
     fin = aDrawer->VIsoAspect()->Number();
     if ( fin != 0) {
-      
-      (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
-       (aDrawer->VIsoAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
       
       Standard_Real dv= VClosed ?(V2-V1)/fin : (V2-V1)/(1+fin);
       for (Standard_Integer i=1; i<=fin;i++){
@@ -217,7 +211,3 @@ void StdPrs_WFDeflectionSurface::Add (
       }
     }
   }
-
-
-
-
index e63493d88766f62b48f17c3d76211fa38efb08e2..5e2e8a0864aa7bc30b7d679ab19f1caf4d1d9808 100644 (file)
@@ -33,23 +33,23 @@ static void AddPoles(const Handle (Prs3d_Presentation)& aPresentation,
   const Standard_Integer n = A.ColLength();
   const Standard_Integer m = A.RowLength();
 
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());    
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(n*m,n);
   for (i=1; i<=n; i++){
     aPrims->AddBound(m);
     for (j=1; j<=m; j++)
       aPrims->AddVertex(A(i,j));
   }
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());    
+  aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());
   aPrims = new Graphic3d_ArrayOfPolylines(n*m,m);
   for (j=1; j<=m; j++){
     aPrims->AddBound(n);
     for (i=1; i<=n; i++)
       aPrims->AddVertex(A(i,j));
   }
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 }
 
 
index 781454ee05f39fa8db9ca432dc73744ad19c7738..29c5c3080aa30e32e339b80fda3e51cf0a6b7db9 100644 (file)
@@ -154,7 +154,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
     //
     if (!(UClosed && VClosed))
     {
-      Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
       if (!UClosed)
       {
         anIso.Load (GeomAbs_IsoU, U1, V1, V2);
@@ -187,7 +187,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
     Standard_Integer fin = aDrawer->UIsoAspect()->Number();
     if (fin != 0)
     {
-      Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
 
       Standard_Real du= UClosed ? (U2-U1) / fin : (U2-U1) / (1 + fin);
       for (Standard_Integer i = 1; i <= fin; i++)
@@ -201,7 +201,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
     fin = aDrawer->VIsoAspect()->Number();
     if (fin != 0)
     {
-      Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
+      aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
       
       Standard_Real dv = VClosed ? (V2 - V1) / fin : (V2 - V1) / (1 + fin);
       for (Standard_Integer i = 1; i <= fin; i++)
@@ -228,7 +228,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
        for(int i=1; i<=Pnts->Length(); i++)
          UIsoArray->AddVertex(Pnts->Value(i));
       }      
-      Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+      Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
       TheGroup->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());
       TheGroup->AddPrimitiveArray(UIsoArray);
     }
@@ -246,7 +246,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
        for(int i=1; i<=Pnts->Length(); i++)
          VIsoArray->AddVertex(Pnts->Value(i));
       }
-      Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+      Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
       TheGroup->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());
       TheGroup->AddPrimitiveArray(VIsoArray);
     } 
@@ -263,7 +263,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
        for(int i=1; i<=Pnts->Length(); i++)
          freeArray->AddVertex(Pnts->Value(i));
       }
-      Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+      Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
       TheGroup->SetPrimitivesAspect(aDrawer->FreeBoundaryAspect()->Aspect());
       TheGroup->AddPrimitiveArray(freeArray);
     }
index 472bc26b87edeb2ae8cd9fa2d95cf8f87e17adc2..b853fbada941c80b0aabe981d0c52ee8f0319f65 100644 (file)
@@ -5224,9 +5224,9 @@ void ViewerTest_MarkersArrayObject::Compute (const Handle(PrsMgr_PresentationMan
   aPresentation->Clear();
   if (!myMarkerAspect.IsNull())
   {
-    Prs3d_Root::CurrentGroup (aPresentation)->SetGroupPrimitivesAspect (myMarkerAspect);
+    aPresentation->CurrentGroup()->SetGroupPrimitivesAspect (myMarkerAspect);
   }
-  Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (anArray);
+  aPresentation->CurrentGroup()->AddPrimitiveArray (anArray);
 }
 
 void ViewerTest_MarkersArrayObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
@@ -6268,7 +6268,7 @@ protected:
       DBRep_DrawableShape::addSurfaceNormals (aNormalMap, myshape, NormalLength, NbAlongU, NbAlongV);
     }
 
-    Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::NewGroup (thePrs);
+    Handle(Graphic3d_Group) aPrsGroup = thePrs->NewGroup();
     aPrsGroup->SetGroupPrimitivesAspect (myDrawer->ArrowAspect()->Aspect());
 
     const Standard_Real aArrowAngle  = myDrawer->ArrowAspect()->Angle();
index cf0ff6255be90a3e778f5946b4f6cc158462d479..626bf7c073defff422c0fcde74aadba944fbe44f 100644 (file)
@@ -35,7 +35,6 @@
 #include <OSD_OpenFile.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Select3D_SensitiveCurve.hxx>
index c605fe9b3ffc311ff456e9e2d16a0e11eefa06d1..d92d51a0415c8d3d9a214e4a7b21b2eb86b44ae5 100644 (file)
@@ -63,7 +63,6 @@
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_Text.hxx>
 #include <Select3D_SensitivePrimitiveArray.hxx>
 #include <TColStd_HSequenceOfAsciiString.hxx>
@@ -5795,7 +5794,7 @@ void V3d_LineItem::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePre
   Quantity_Color aColor (Quantity_NOC_RED);
   Standard_Integer aWidth, aHeight;
   ViewerTest::CurrentView()->Window()->Size (aWidth, aHeight);
-  Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+  Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
   Handle(Graphic3d_ArrayOfPolylines) aPrim = new Graphic3d_ArrayOfPolylines(5);
   aPrim->AddVertex(myX1, aHeight-myY1, 0.);
   aPrim->AddVertex(myX2, aHeight-myY2, 0.);
index cfad0b0330f298ca7e1263a70e423580ca6b00e7..4d0ad7272dad460787e62a54ca4e191ade4dfc88 100644 (file)
@@ -80,7 +80,7 @@ static void DisplayText (const TDF_Label& aLabel,
        Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
        aBox.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
        gp_Pnt aPnt (0.5 * (aXmin + aXmax), 0.5 * (aYmin + aYmax), 0.5 * (aZmin + aZmax));
-       Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPrs), anAspect, aName->Get(), aPnt);
+       Prs3d_Text::Draw (aPrs->CurrentGroup(), anAspect, aName->Get(), aPnt);
       }
     }
   }